DEV Community

Cover image for I built a VS Code extension to replace paid AI coding agents by exploiting free chatbots 😈
EffessDev for Necoz

Posted on

I built a VS Code extension to replace paid AI coding agents by exploiting free chatbots 😈

Clipboard-driven agent loop avoids API costs

Here's a simplified look at what happens behind the scenes when an AI agent works:

  1. You type a prompt and hit Send.
  2. The harness adds additional context such as project details, tools, and instructions to your prompt.
  3. The LLM processes everything and generates structured output.
  4. The harness executes that output, collects the results, and sends them back to the LLM.
  5. The cycle repeats until the task is complete.

Traditionally, getting this kind of workflow meant paying for API access or a subscription to an AI agent platform.

But here's the interesting part: any free AI chatbot you could find online can generate structured output, too. What if we built a tool that generates the context and instructions that chatbot needs, and then executes the structured output it returns?

We'd have something fairly close to an AI agent, except that we have to manually paste the outputs back and forth. That's not as inconvenient as it sounds, if you use your clipboard as the transport medium.

So I decided to try it out. The result is a VS Code extension called ReptClip.

How it works

Once installed, ReptClip adds a tab to the bottom panel in VS Code.

  1. Click the Context button to copy the initial context to your clipboard. Paste it into your chatbot, enter your prompt, and hit Send.
  2. The chatbot generates the required structured output in a single code block.
  3. Copy that code block and click Execute.

There are two main types of output:

  1. Edit Block (header: block-type: edit): This can edit, move, rename, delete, and create files.
  2. Read Block (header: block-type: read): This can read files (either fully or partially) and perform searches.

Clicking Execute copies the results to your clipboard, so you can paste them back into the chatbot and continue the conversation.

The chatbot is also instructed to guide you through this process when necessary, so it can tell you when to copy a code block and click Execute.

How we made it safe to trust

Since this tool can modify files in your workspace, we wanted to make sure there were some safeguards in place.

The main design decision is:

ReptClip only touches tracked files. Anything covered by .gitignore cannot be seen or modified by the chatbot through ReptClip.

Edit Blocks also support Undo and Redo.

There are many other checks, too. For example, ReptClip validates search operations before applying changes, applies edits atomically, and aborts if a file changes unexpectedly before the final write.

You can find the implementation details in the README.

Other features

A few other things we have implemented:

  • Toggleable context sections and rough token estimates.
  • Per-project saved UI state and customizable defaults for new projects.
  • Adaptive UI (works in sidebar, panel, under the explorer, etc.).
  • Live autocomplete dropdowns and green/yellow syntax highlighting.
  • Zero runtime dependencies (no Git, a .git folder, grep, whatever).

There's more, but those are the main things worth mentioning.

Acknowledgements

A special thanks to @mansio for his significant contributions to ReptClip. He helped identify and address numerous edge cases and contributed several features that wouldn't have been possible without his contributions!

Trying it out

You can find ReptClip by searching for it in VS Code (or any VS Code-compatible editor) and clicking Install.

I'm particularly curious about what people think of this approach. Would you trust a workflow like this with your codebase? Are there any obvious problems or missing safeguards? Or is manually copying and pasting between the chatbot and the extension too inconvenient to be practical?

Personally, I've been genuinely surprised by how well this works. I even stopped using GitHub Copilot even though it has a free tier, because it felt slower than using a faster Chatbot with ReptClip. In fact, now I build even ReptClip entirely with ReptClip!

I'd love to hear what you think, especially if you spot something we haven't considered!

Links

Thanks for reading! 😊

Top comments (54)

Collapse
 
francistrdev profile image
FrancisTRᴅᴇᴠ Necoz • • Edited

Collapse
 
effessdev profile image
EffessDev Necoz •

I didn't understand that quite well hehe but I am soo happy to see your comment here ☺️

Collapse
 
technogamerz profile image
𝐓𝐡𝐞 𝐋𝐚𝐳𝐲 𝐆𝐢𝐫𝐥 Necoz •

wow❤️

Collapse
 
effessdev profile image
EffessDev Necoz •

Hi didi! 🙂 Is your fever gone now?

Collapse
 
technogamerz profile image
𝐓𝐡𝐞 𝐋𝐚𝐳𝐲 𝐆𝐢𝐫𝐥 Necoz •

I might recover soon, bye.
Have a great days ❤️🤲🏻

Thread Thread
 
effessdev profile image
EffessDev Necoz •

Good luck didi! 🙋‍♂️

Thread Thread
 
star123 profile image
Sᴛᴀʀ⭐ Necoz •

Good luck why 🤔

Thread Thread
 
effessdev profile image
EffessDev Necoz •

To recover... :)

Thread Thread
 
star123 profile image
Sᴛᴀʀ⭐ Necoz •

Bro didi doesn't have a fever.🤔

Thread Thread
 
effessdev profile image
EffessDev Necoz •

What?

Thread Thread
 
star123 profile image
Sᴛᴀʀ⭐ Necoz •

Image descripthhion

Bro new banner 😀

Thread Thread
 
effessdev profile image
EffessDev Necoz •

New banner means? Which banner? 🤔

Thread Thread
 
star123 profile image
Sᴛᴀʀ⭐ Necoz •

Youtube banner I mean 😀

Thread Thread
 
effessdev profile image
EffessDev Necoz •

Oooh your channel? The one @akhourianmolkumar and you were talking about? 🤔

Thread Thread
 
akhourianmolkumar profile image
Akhouri Anmol Kumar Necoz •

bro come online discord urgent.

Thread Thread
 
effessdev profile image
EffessDev Necoz •

Ok coming... 👍

Thread Thread
 
star123 profile image
Sᴛᴀʀ⭐ Necoz •

No, this is a different one this one is just for fun.😀 But bro I have only 300 subs 😑

Thread Thread
 
effessdev profile image
EffessDev Necoz •

Only 300 subs? 300 subs is a lot lol 🤯 You just started out and already 300 subs???

Thread Thread
 
star123 profile image
Sᴛᴀʀ⭐ Necoz •

Not right now, I've been doing it since May or June, bro :(

Thread Thread
 
effessdev profile image
EffessDev Necoz •

Still... it's a lot 😯

Thread Thread
 
akhourianmolkumar profile image
Akhouri Anmol Kumar Necoz •

channel link dedo mujhe mai aashirvaad dunga

Thread Thread
 
effessdev profile image
EffessDev Necoz •

Whatever that means 🤣

Thread Thread
 
star123 profile image
Sᴛᴀʀ⭐ Necoz •

Bro aap hasoge 😂

Thread Thread
 
akhourianmolkumar profile image
Akhouri Anmol Kumar Necoz •

Nhi hasunga I'm serious person very serious when I'm sleeping

Collapse
 
akhourianmolkumar profile image
Akhouri Anmol Kumar Necoz •

cover image
🔥🔥

Collapse
 
effessdev profile image
EffessDev Necoz •

Broo I tried to make that cover image with APIC STUDIO but there is one feature missing so I had to fall back to Affinity...

Collapse
 
akhourianmolkumar profile image
Akhouri Anmol Kumar Necoz •

damn it.

Thread Thread
 
effessdev profile image
EffessDev Necoz •

DEV.to banner size is 1000 × 420 pixels right? But how do I create an empty banner of that size in APIC STUDIO? Is it possible? 🤔

Thread Thread
 
akhourianmolkumar profile image
Akhouri Anmol Kumar Necoz •

yeah custom size in social.

Thread Thread
 
effessdev profile image
EffessDev Necoz •

Before opening an image? 🤔 I wanted an empty image of that size...

Thread Thread
 
effessdev profile image
EffessDev Necoz •

Bro it came on my home feed!!!

Only for me or everybody? 🤔

Thread Thread
 
akhourianmolkumar profile image
Akhouri Anmol Kumar Necoz •

for me too, bro apic v2 to be released tomorrow or guaranteed sunday
like sunday guaranteed and it may be released tomorrow too
come discord for strategic talk(CTO-CEO) and then 50% (BRO-BRO hehe)

Thread Thread
 
effessdev profile image
EffessDev Necoz •

Ok, tomorrow! 🥳

Thread Thread
 
akhourianmolkumar profile image
Akhouri Anmol Kumar Necoz •

yeah maybe 70%

Thread Thread
 
effessdev profile image
EffessDev Necoz •

Bro why this much uncertainty? 🤔

Thread Thread
 
akhourianmolkumar profile image
Akhouri Anmol Kumar Necoz •

idk hehe but sunday for sure tomorrow 70% chance
come online discord by 8:50 pls

Thread Thread
 
effessdev profile image
EffessDev Necoz •

👍 (70%)

Thread Thread
 
akhourianmolkumar profile image
Akhouri Anmol Kumar Necoz •

yeah i can maybe..

Thread Thread
 
effessdev profile image
EffessDev Necoz •

🤔

Thread Thread
 
akhourianmolkumar profile image
Akhouri Anmol Kumar Necoz •

bro come online

Collapse
 
nyaomaru profile image
nyaomaru Necoz •

Hey! 😸

The changelog is finally ready! 🎉

I went through all 31 releases and put together a complete changelog for ReptClip. Now nobody can complain about the missing changelog anymore! 😹

I also added changelog-bot through PR #50.

Once it's merged, you can create a proper Git tag, write your release notes, and run changelog-bot through GitHub Actions to generate future changelog updates.

No AI API keys needed!

Hope you enjoy it! 💚

Collapse
 
effessdev profile image
EffessDev Necoz •

Wow thank you so much @nyaomaru!!! 😸😸😸😸😸 This is really good! Already merged!!! Thanks again! ReptClip finally has a proper CHANGELOG!

Collapse
 
nyaomaru profile image
nyaomaru Necoz •

Happy to help! 😸💚

By the way, enabling AI in changelog-bot allows for more refined classification!

Since we were backfilling historical releases, I kept the changelog relatively flat this time. Normally, changelog-bot organizes changes into sections such as Added, Fixed, Changed, Docs, Test, and Chore.

You can also use engines like Jev to extract the WHY behind changes from PR descriptions!

If you have any questions about changelog-bot, feel free to ask me anytime! 🐈🚀

Thread Thread
 
effessdev profile image
EffessDev Necoz •

Thanks! I remember seeing a post with a similar title. Was it yours?

Anyway, thank you so much! I have to figure out how this works a bit more! I'll try adding AI. I have a $0.32 credit balance!

Thread Thread
 
nyaomaru profile image
nyaomaru Necoz •

That might have been mine! 😹
Let's see how far your $0.32 can take you! 😹
Feel free to ask me if you run into any problems! Let's go! 😸💚

Collapse
 
antonioprosperi2svg profile image
Antonio Necoz •

Congratulations, I took a peek at the beautiful presentation, it's clear, I sincerely want to try it this evening when I get back from work 🐞🐞🐞

Collapse
 
effessdev profile image
EffessDev Necoz •

Thank you so much!!! 😊 Me and @mansio are working on adding previews when we click "Execute"! Please try it and let me know what you think! 😸 Any features missing that might stop you from using it? Please let me know!

Collapse
 
sharksevenro profile image
Umasou •

“Only touches tracked files” is a useful blast-radius reduction, but I would avoid treating .gitignore as the trust boundary. A repository can contain tracked files that are still sensitive, and path handling through symlinks or case/normalization differences can surprise otherwise careful edit code.

For a clipboard-driven agent, I’d consider the returned block untrusted input even after the user clicks Execute. A strong UX would show the exact affected paths and a diff preview before the first write, require confirmation again for deletes/moves, and resolve every target against a canonical workspace-root allowlist. Your atomic write and changed-file checks are especially important here.

Have you tested symlinked files/directories and a stale read block followed by an edit? Those seem like high-value adversarial cases for this architecture.

Collapse
 
effessdev profile image
EffessDev Necoz •

Yes yes! Many of @mansio's PR addresses issues related to symlinks! Also, we have the option to add .reptclipignore for exclusions on top of .gitignore. .reptclipignore cannot un-exclude something that .gitignore excludes as well (unless you disable it in settings). We are working on adding a full diff preview before applying. I am doing my final tests and also fixing a small issue. It has confirmation before deletes/moves already (but we'll be removing it in the next version since we already have a full diff preview before applying). Thank you so much for the comment! Anything else you would like to know? 😊 Your diff preview point is correct! We are working on it and will be live soon! ⚡

Collapse
 
pratyush_ranjan_roul profile image
Pratyush Ranjan Roul Necoz •

The cover image took my attention 😂

Collapse
 
effessdev profile image
EffessDev Necoz •

👍😆

Collapse
 
peter7865 profile image
Peter •

Using clipboard handoffs with strict file checks reminds me of passing dielines between design and press at The Printing World. Keeping ignored files out and checking changes before writing saves a lot of mess.

Collapse
 
effessdev profile image
EffessDev Necoz •

😅

Collapse
 
wangchen_happydev profile image
Wang Chen •

Sorry, I think I didn't have full understanding of this tool. 🥲
so does that mean your tool just pates the context from the free ai chatbot and build the project? 🤠

Some comments may only be visible to logged-in visitors. Sign in to view all comments.