browse-code 0.1.1__tar.gz → 0.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- Metadata-Version: 2.4
2
- Name: browse_code
3
- Version: 0.1.1
4
- Summary: A local AI bridge package
5
- Requires-Dist: fastapi
6
- Requires-Dist: uvicorn
7
- Requires-Dist: pydantic
8
- Dynamic: requires-dist
9
- Dynamic: summary
1
+ Metadata-Version: 2.4
2
+ Name: browse_code
3
+ Version: 0.1.3
4
+ Summary: A local AI bridge package
5
+ Requires-Dist: fastapi
6
+ Requires-Dist: uvicorn
7
+ Requires-Dist: pydantic
8
+ Dynamic: requires-dist
9
+ Dynamic: summary
@@ -0,0 +1,106 @@
1
+ # Browse Code
2
+
3
+ ![PyPI version](https://badge.fury.io/py/browse-code.svg)
4
+ ![Python Version](https://img.shields.io/badge/python-3.8%2B-blue)
5
+ ![License](https://img.shields.io/badge/license-MIT-green)
6
+
7
+ **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.
8
+
9
+ ## How It Works
10
+
11
+ Browse Code has two parts:
12
+
13
+ 1. **A local server** that exposes your file system and terminal to the AI via a secure API.
14
+ 2. **A Chrome extension** that injects agent capabilities into AI chat interfaces.
15
+
16
+ When connected, you can ask ChatGPT/Gemini/Claude to edit files, run scripts, search code, and more — all executed locally on your machine.
17
+
18
+ ## Setup
19
+
20
+ ### Step 1: Install the package
21
+
22
+ ```bash
23
+ pip install browse-code
24
+ ```
25
+
26
+ ### Step 2: Run the CLI
27
+
28
+ ```bash
29
+ bc
30
+ ```
31
+
32
+ > If `bc` is not found, add your Python Scripts folder to PATH:
33
+ > ```bash
34
+ > # Windows (PowerShell)
35
+ > $env:Path += ";$env:APPDATA\Python\Python312\Scripts"
36
+ >
37
+ > # Or run directly
38
+ > python -m browse_code.cli
39
+ > ```
40
+
41
+ ### Step 3: First-run extension setup
42
+
43
+ On the first run, `bc` will guide you through a one-time Chrome extension setup:
44
+
45
+ 1. It asks for your permission to extract the extension files.
46
+ 2. It copies the extension to `~/.browse_code/extension/` and copies the path to your clipboard.
47
+ 3. It opens `chrome://extensions/` in your browser automatically.
48
+ 4. You enable **Developer mode** (top-right toggle), click **Load unpacked**, and paste the path.
49
+ 5. Press Enter in the terminal and the server starts.
50
+
51
+ **You only do this once.** The extension stays loaded in Chrome across sessions.
52
+
53
+ ### Step 4: Start an AI session
54
+
55
+ 1. Open any supported AI chat (ChatGPT, Gemini, Claude, or HuggingFace Chat).
56
+ 2. Click the Browse Code Bridge extension icon and set your workspace directory.
57
+ 3. Click "Initialize Agent in Chat".
58
+ 4. Start coding with AI — it now has full access to your local environment.
59
+
60
+ ## Subsequent Usage
61
+
62
+ After the first-time setup, just run:
63
+
64
+ ```bash
65
+ bc
66
+ ```
67
+
68
+ The server starts immediately. Open your AI chat tab and you're ready to go. The server terminal will show:
69
+ - A startup banner with your workspace and endpoint
70
+ - `[+] Extension connected` when the browser extension connects
71
+ - Real-time logs of every file read, write, command execution, and diff
72
+
73
+ ## Features
74
+
75
+ - **File Operations:** Read, write, and patch files with inline terminal diffs
76
+ - **Code Search:** Search across your entire codebase by keyword
77
+ - **Terminal Commands:** Run shell commands with full stdout/stderr capture
78
+ - **Background Processes:** Start, monitor, and kill long-running processes
79
+ - **Multi-Platform AI:** Works with ChatGPT, Gemini, Claude, and HuggingFace Chat
80
+ - **Extension Heartbeat:** Server detects when the browser extension connects/disconnects
81
+
82
+ ## For Developers
83
+
84
+ 1. Clone the repository:
85
+ ```bash
86
+ git clone https://github.com/Dedeep007/browse_code.git
87
+ cd browse_code
88
+ ```
89
+ 2. Install in editable mode:
90
+ ```bash
91
+ pip install -e .
92
+ ```
93
+
94
+ ## Contributing
95
+
96
+ Contributions are welcome! Please feel free to submit a Pull Request.
97
+
98
+ 1. Fork the repository.
99
+ 2. Create your feature branch (`git checkout -b feature/AmazingFeature`).
100
+ 3. Commit your changes (`git commit -m 'Add some AmazingFeature'`).
101
+ 4. Push to the branch (`git push origin feature/AmazingFeature`).
102
+ 5. Open a Pull Request.
103
+
104
+ ## License
105
+
106
+ Distributed under the MIT License.
@@ -0,0 +1 @@
1
+ __version__ = "0.1.3"