I wanted to use web-based AI chatbots — Claude, Gemini, ChatGPT, Qwen — for actual development work, not just Q&A. The free tiers are generous, and I didn't want to be locked into a single coding agent or pay for API access just to get an assistant to touch my code. But the moment you try to actually use a web chat for real dev work, you hit the same wall every time: you either paste in your whole codebase manually every session, or you give up and reach for a paid extension with an API key behind it.
So I built AI Bridge — a CLI tool that bridges a local codebase and any browser-based AI chatbot. No API keys, no extensions running in the background, no vendor lock-in. You pack your code, paste it into whichever AI chat you're using, and apply the changes back with a command.
Why not just use Copilot, Cursor, or an API key?
Coding agent apps and API-based tools work, but they come with tradeoffs I wanted to avoid:
- Web-based AI chat plans are usually more generous on the free tier than API usage
- I'm not locked into one provider — I can switch models mid-project depending on which one is handling a task better
- There's no background agent or extension — it's just a CLI and whatever chat tab I already have open
The tradeoff is that browser chats don't have direct filesystem access. AI Bridge closes that gap without turning it into full manual copy-pasting.
How it works
There are two modes, depending on project size.
Simple Mode is for projects small enough to fit in a single prompt. You pack the codebase, upload it along with a couple of prompt templates, and apply the AI's response back to your files:
dotnet tool install --global Tools.AIBridge
cd /path/to/your-project
ai-bridge init
ai-bridge pack
# Upload ai-bridge/1-SimpleMode/*.md + the generated context files to your AI
# Copy the AI's response, then:
ai-bridge apply --paste
Advanced Mode is for larger codebases, where uploading everything every time burns tokens and adds noise. Instead, you generate a one-time index.xml map of the project. From then on, the AI requests only the specific files it needs for a given task, and AI Bridge gathers and bundles just those into context — so you're not re-uploading the whole repo on every prompt.
It respects .gitignore automatically (via git ls-files), and there's an .aiignore file for excluding things like test fixtures or generated code that the AI doesn't need to see.
It's also not tied to .NET specifically — it detects your ecosystem (.csproj, package.json, pyproject.toml, go.mod, Cargo.toml) and groups context files accordingly, so it works with Node.js, Python, Go, and Rust projects too.
Applying changes back works the same way regardless of mode — copy the AI's XML response and run ai-bridge apply --paste, which reads straight from your clipboard on Windows, macOS, and Linux (X11/Wayland), with a stdin fallback for headless/SSH setups.
Quick demo
Here's a short demo of Simple Mode in action.
Try it
dotnet tool install --global Tools.AIBridge
Requires the .NET 10 SDK and Git on your PATH. Full setup and command reference are in the repo.
I built this mainly to solve my own workflow friction, but I'm curious whether it's useful outside that — if you try it, I'd genuinely like to know whether it fits how you work, or where it breaks down. It's MIT licensed, so issues and PRs are welcome too.
Top comments (0)