Tools.AIBridge 1.0.11

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global Tools.AIBridge --version 1.0.11
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Tools.AIBridge --version 1.0.11
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Tools.AIBridge&version=1.0.11
                    
nuke :add-package Tools.AIBridge --version 1.0.11
                    

AI Bridge

NuGet .NET License: MIT

Pack your code → Paste into any AI chatbot → Apply changes back. No API keys, no extensions, no lock-in.

AI Bridge is a lightweight CLI tool that bridges your local codebase and browser-based AI chatbots (Claude, Gemini, Qwen, ChatGPT). It works with any language or technology — .NET, Node.js, Python, React, Go, Rust, or any project with a sensible folder structure.


💡 Why AI Bridge?

  • No API keys — Use the free tiers of Claude, Gemini, Qwen, or ChatGPT directly in your browser.
  • No vendor lock-in — Switch AI providers mid-conversation. Your workflow stays the same.
  • Language-agnostic — Works with any language or framework, not just the ones your IDE supports.
  • No extensions or agents — Just a CLI tool and a browser-based AI chat. Nothing running in the background.
  • You stay in control — Every change is explicit: you see it, you paste it, you apply it.

🎬 Quick Demo

AI Bridge Simple Mode Demo

🎥 Watch on YouTube →


🌟 The Big Picture

AI Bridge offers two modes depending on your project size:

  1. Simple Mode (Quick Start): Perfect for small projects. You pack your entire codebase, give it to the AI, and get code back.

  2. Advanced Mode (Index Flow): Designed for large codebases. You map your project once, and then only upload the specific files the AI requests — saving tokens and reducing noise.

  3. Optional: MCP Server: A local .NET server you can run alongside the CLI to let AI clients (like Claude Desktop) connect directly and apply changes without you having to copy/paste. Read the MCP Guide here.


⚙️ Prerequisites & Installation

  • .NET 10 SDK installed on your machine.
  • Git installed and on your PATH. AI Bridge uses git ls-files to automatically respect your .gitignore rules.
  • A browser AI account (Claude, Gemini, Qwen, or ChatGPT).

Which AI model should I use? Pick a thinking or reasoning "High" model (e.g., Claude 4.6 Sonnet, Gemini 3.1 Pro, Qwen 3.7 Max/Plus) — they produce significantly better, bug-free code.

Install the tool globally using the .NET CLI:

dotnet tool install --global Tools.AIBridge

(To update later: dotnet tool update --global Tools.AIBridge) — View on NuGet →

<details> <summary><b>⚡ TL;DR — Try it in 60 seconds</b></summary>

dotnet tool install --global Tools.AIBridge
cd /path/to/your-project
ai-bridge init
ai-bridge pack
# Upload ai-bridge/1-SimpleMode/*.md + ai-bridge/artifacts/*-context.txt to your AI
# Copy the AI's XML response, then:
ai-bridge apply --paste

</details>


🚀 Getting Started

Open your terminal, navigate to your project directory, and run the init command.

cd /path/to/your-project
ai-bridge init

What it does: It scaffolds the following structure in your project:

YourProjectRoot/
├── .aiignore                           <-- Custom exclusion rules (Tracked)
└── ai-bridge/                          <-- The AI Bridge workspace
    ├── 1-SimpleMode/                   <-- Templates for quick, small tasks
    ├── 2-AdvancedMode/                 <-- Templates for large project mapping
    └── artifacts/                      <-- Scratchpad for context and AI responses

Excluding Files with .aiignore

The .aiignore file (created by ai-bridge init) works like .gitignore — add glob patterns to exclude files from being packed into AI context. Use it for test fixtures, generated code, large data files, or anything the AI doesn't need to see.


🟢 Simple Mode (For Small Projects)

Use this mode if your codebase is small enough to fit comfortably inside a single AI prompt window.

flowchart LR
    A["🗂️ Codebase"] -- "ai-bridge pack" --> B["📄 *-context.txt"]
    B -- "Upload + Prompts" --> C["🤖 AI Chatbot"]
    C -- "Copy XML Response" --> D["ai-bridge apply --paste"]
    D --> E["✅ Files Updated"]

1. Pack Your Project

Run the pack command to bundle your codebase into text files.

ai-bridge pack

This generates *-context.txt files inside ai-bridge/artifacts/. (It automatically respects .gitignore, skips binary files, and applies .aiignore).

2. Chat with the AI

  1. Open your AI (Claude, Gemini, Qwen, or ChatGPT).
  2. Upload the System Prompt: ai-bridge/1-SimpleMode/ai-system-prompt.md
  3. Upload the Protocol Skill: ai-bridge/1-SimpleMode/ai-response-skill.md
  4. Upload your Context Files: The *-context.txt files from the artifacts/ folder. (Skip this step if starting a brand new project!)
  5. Ask the AI to write your feature or fix a bug.

3. Apply the Changes

Option 1 — Clipboard: Copy the AI's XML response and run:

ai-bridge apply --paste

Option 2 — File: Save the XML to ai-bridge/artifacts/ai-response.xml and run:

ai-bridge apply

🔴 Advanced Mode (For Large Projects)

If you have a large codebase, uploading your entire project every time uses more tokens and can reduce AI response quality. Advanced Mode solves this by creating a lightweight index.xml map of your project.

Phase 1: Create the Index (One-Time Setup)

Starting a brand new project? Skip Phase 1 entirely and jump straight to Phase 2 — no index needed when there's no existing code to map.

Before chatting, the AI needs to map out your existing project.

  1. Run ai-bridge pack to gather your full context.
  2. Start a new AI chat and upload:
    • ai-bridge/2-AdvancedMode/Phase1-CreateIndex/ai-create-index-system-prompt.md
    • All the *-context.txt files from artifacts/.
  3. The AI will output an XML map of your project. Save this output exactly as ai-bridge/index.xml.

Phase 2: The Daily Workflow

Now that you have an index, you never need to upload huge context files again!

flowchart LR
    A["💬 Ask feature"] -->|AI requests files| B["ai-bridge apply --paste"]
    B -->|Upload context| C["🤖 AI generates code"]
    C -->|Copy response| D["ai-bridge apply --paste"]
    D --> E["✅ Updated"]
  1. Start a fresh AI Chat.
  2. Upload the System Prompt and your Index:
    • ai-bridge/2-AdvancedMode/Phase2-DailyChat/ai-index-system-prompt.md
    • ai-bridge/index.xml (Skip uploading this if starting a brand new project)
  3. Upload the 3 Required Skills (so the AI knows how to communicate):
    • ai-bridge/2-AdvancedMode/Phase2-DailyChat/ai-request-skill.md
    • ai-bridge/2-AdvancedMode/Phase2-DailyChat/ai-response-skill.md
    • ai-bridge/2-AdvancedMode/Phase2-DailyChat/ai-update-index-skill.md
  4. Ask for a feature.
  5. Fulfill the Request:
    • The AI will output an XML request for files (e.g., <ai-request><file>src/app.js</file></ai-request>).
    • Copy the request and run ai-bridge apply --paste.
    • The tool will automatically gather those files and bundle them into ai-bridge/artifacts/ai-requested-context.txt.
    • Upload or paste that context back into the AI chat.
  6. The AI generates the final code changes. Copy them and run ai-bridge apply --paste.

📖 Command Reference

Command Description
ai-bridge init Scaffolds the ai-bridge/ workspace, .aiignore, and templates
ai-bridge pack Packs source files into *-context.txt for AI consumption
ai-bridge apply Applies ai-response.xml patches from the artifacts folder
ai-bridge apply --paste Reads the AI response directly from clipboard
ai-bridge apply --watch Watches ai-response.xml and auto-applies on save

🛠️ Ecosystem Detection

When you run ai-bridge pack, it groups files intelligently based on your ecosystem to keep contexts organized:

Ecosystem Detected By Grouping
.NET .csproj files One context file per project
Node.js package.json One context file per package
Python pyproject.toml One context file per package
Go go.mod One context file per module
Rust Cargo.toml One context file per crate
Other (fallback) One context file per top-level folder

📋 Clipboard Support

ai-bridge apply --paste uses native OS commands — no external dependencies required.

Platform Clipboard Tool Notes
Windows Built-in (powershell.exe / clip.exe) Works out of the box.
macOS Built-in (pbpaste / pbcopy) Works out of the box.
Linux (X11) xclip Install: sudo apt install xclip
Linux (Wayland) wl-clipboard Install: sudo apt install wl-clipboard
WSL2 Windows bridge Works automatically.
Headless / SSH stdin fallback Prompts you to manually paste into terminal.

🤝 Contributing

See CONTRIBUTING.md for build instructions and how to submit a PR.

📄 License

This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
2.0.0 41 10/23/2026
1.0.13 93 10/21/2026
1.0.12 133 9/21/2026
1.0.11 102 9/21/2026
1.0.10 105 9/21/2026
1.0.9 152 7/19/2026
1.0.8 130 7/5/2026
1.0.7 130 6/25/2026
1.0.6 134 6/17/2026
1.0.5 124 6/13/2026
1.0.4 121 6/13/2026
1.0.3 130 6/13/2026
1.0.2 126 6/10/2026
1.0.1 128 6/10/2026
1.0.0 136 6/8/2026