Skip to main content

Turn any AI chatbot into an autonomous coding agent

Project description

Browse Code

Browse Code

PyPI version Python Version License

Browse Code is a CLI tool that turns any AI chatbot (ChatGPT, Gemini, Claude, HuggingFace) into an autonomous coding agent. It bridges your browser and local terminal, letting AI read/write files, run commands, and manage processes on your machine.

How It Works

Browse Code has two parts:

  1. A local server that exposes your file system and terminal to the AI via a secure API.
  2. A Chrome extension that injects agent capabilities into AI chat interfaces.

When connected, you can ask ChatGPT/Gemini/Claude to edit files, run scripts, search code, and more — all executed locally on your machine.

Setup

Step 1: Install the package

pip install browse-code

Step 2: Run the CLI

bc

If bc is not found, add your Python Scripts folder to PATH:

# Windows (PowerShell)
$env:Path += ";$env:APPDATA\Python\Python312\Scripts"

# Or run directly
python -m browse_code.cli

Step 3: First-run extension setup

On the first run, bc will guide you through a one-time Chrome extension setup:

  1. It asks for your permission to extract the extension files.
  2. It copies the extension to ~/.browse_code/extension/ and copies the path to your clipboard.
  3. It opens chrome://extensions/ in your browser automatically.
  4. You enable Developer mode (top-right toggle), click Load unpacked, and paste the path.
  5. Press Enter in the terminal and the server starts.

You only do this once. The extension stays loaded in Chrome across sessions.

Step 4: Start an AI session

  1. Open any supported AI chat (ChatGPT, Gemini, Claude, or HuggingFace Chat).
  2. Click the Browse Code Bridge extension icon and set your workspace directory.
  3. Click "Initialize Agent in Chat".
  4. Start coding with AI — it now has full access to your local environment.

Subsequent Usage

After the first-time setup, just run:

bc

The server starts immediately. Open your AI chat tab and you're ready to go. The server terminal will show:

  • A startup banner with your workspace and endpoint
  • [+] Extension connected when the browser extension connects
  • Real-time logs of every file read, write, command execution, and diff

Features

  • File Operations: Read, write, and patch files with beautiful inline terminal diffs:
▶️ npm install next react react-dom✓ done · 22ms

STDOUT:

📝 Patch File portfolio-site/package.json

  {
    "name": "portfolio-site",
    "main": "index.js",
    "scripts": {
-     "test": "echo \"Error: no test specified\" && exit 1",
+     "dev": "next dev",
+     "build": "next build",
+     "start": "next start",
+     "lint": "next lint"
    },
    "keywords": [],
  }

done · 2ms — Patch applied successfully to portfolio-site/package.json.

📁 View Directory portfolio-sitedone · 195msportfolio-site/package-lock.json

  • Code Search: Search across your entire codebase by keyword
  • Terminal Commands: Run shell commands with full stdout/stderr capture
  • Background Processes: Start, monitor, and kill long-running processes
  • Multi-Platform AI: Works with ChatGPT, Gemini, Claude, and HuggingFace Chat
  • Extension Heartbeat: Server detects when the browser extension connects/disconnects

For Developers

  1. Clone the repository:
    git clone https://github.com/Dedeep007/browse_code.git
    cd browse_code
    
  2. Install in editable mode:
    pip install -e .
    

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/AmazingFeature).
  3. Commit your changes (git commit -m 'Add some AmazingFeature').
  4. Push to the branch (git push origin feature/AmazingFeature).
  5. Open a Pull Request.

License

Distributed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

browse_code-0.2.16.tar.gz (45.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

browse_code-0.2.16-py3-none-any.whl (43.7 kB view details)

Uploaded Python 3

File details

Details for the file browse_code-0.2.16.tar.gz.

File metadata

  • Download URL: browse_code-0.2.16.tar.gz
  • Upload date:
  • Size: 45.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for browse_code-0.2.16.tar.gz
Algorithm Hash digest
SHA256 e4cf49bc82f428efd5cfbc354cb13abab565e7eeebac5651185d4335335885bd
MD5 e60d86018d398f0fad32cdf4f596e319
BLAKE2b-256 60ee3ee87c565af94b47c205d62c454902a172b538f676f662ffa26c7b059466

See more details on using hashes here.

Provenance

The following attestation bundles were made for browse_code-0.2.16.tar.gz:

Publisher: publish.yml on Dedeep007/browse_code

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file browse_code-0.2.16-py3-none-any.whl.

File metadata

  • Download URL: browse_code-0.2.16-py3-none-any.whl
  • Upload date:
  • Size: 43.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for browse_code-0.2.16-py3-none-any.whl
Algorithm Hash digest
SHA256 4b8c5b72fd9b67e9bc5ff6ec023c6bbc185fde536cef0ff43768bcd93c04d8d4
MD5 1ce19eb24aa8d9df35130cd5e6296d69
BLAKE2b-256 575b9a629404958c4218ae9fa1c35d67eaeb037da750e2858a4995bec251fa9c

See more details on using hashes here.

Provenance

The following attestation bundles were made for browse_code-0.2.16-py3-none-any.whl:

Publisher: publish.yml on Dedeep007/browse_code

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page