Tools.AIBridge 1.0.8

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.8
                    
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.8
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Tools.AIBridge&version=1.0.8
                    
nuke :add-package Tools.AIBridge --version 1.0.8
                    

AI Bridge — Usage Guide

A no-agent, no-extension workflow for applying AI-generated code changes to any project directly from your browser using the ai-bridge .NET Global Tool.

Works with any language or technology — .NET, Node.js, Python, React, or any project with a sensible folder structure.


🌟 The Big Picture

AI Bridge is a fast, language-agnostic CLI tool that bridges the gap between your local codebase and web-based LLMs (like Claude, Gemini, Qwen, and ChatGPT).

It 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 millions of tokens and preventing AI confusion.

⚙️ 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).

💡 Model Recommendation: We highly recommend using thinking or reasoning "High" models (e.g., Claude 4.6 Sonnet, Gemini 3.1 Pro, Qwen 3.7 Max/Plus). Writing high-quality code and safely navigating complex logic requires exceptional reasoning capabilities. Weaker models may struggle to provide bug-free implementations.

Install the tool globally using the .NET CLI:

dotnet tool install --global Tools.AIBridge

(To update later: dotnet tool update --global Tools.AIBridge)


🚀 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 creates a clean, tracked ai-bridge/ folder in your project containing two paths you can take, plus a safe artifacts/ sandbox for the AI's inputs and outputs.

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

🟢 Simple Mode (For Small Projects)

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

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

Copy the XML response generated by the AI to your clipboard and run:

ai-bridge apply --paste

Alternatively: 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 wastes tokens and degrades AI reasoning. Advanced Mode solves this by creating a lightweight index.xml map of your project.

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

(Skip Phase 1 entirely if you are starting a brand new project from scratch) 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!

  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 that text file back to the AI chat.
  6. The AI generates the final code changes. Copy them and run ai-bridge apply --paste.

🛠️ 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.

🔄 Updating Templates

Because the AI prompts are closely tied to the CLI's parsing engine, you may need to update them when you upgrade the ai-bridge tool. If the tool detects a version mismatch, simply run:

ai-bridge update

This will refresh your 1-SimpleMode and 2-AdvancedMode folders with the latest prompts.

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
1.0.9 106 7/19/2026
1.0.8 105 7/5/2026
1.0.7 110 6/25/2026
1.0.6 115 6/17/2026
1.0.5 103 6/13/2026
1.0.4 103 6/13/2026
1.0.3 110 6/13/2026
1.0.2 108 6/10/2026
1.0.1 110 6/10/2026
1.0.0 120 6/8/2026