aicbridge-pro
v2.1.5
Published
Professional CLI & API Bridge for Web-based AI Providers (ChatGPT, Gemini, Claude, DeepSeek, etc.)
Downloads
1,363
Maintainers
Readme
🤖 AI Chat Bridge
Professional CLI & REST API for Web-based AI Providers
AI Chat Bridge (aicb) allows you to interact with the world's most powerful AI models (ChatGPT, Gemini, Claude, DeepSeek, and more) directly from your terminal or via a REST API. It uses browser automation (Playwright) to bridge the gap without needing expensive official API keys.
✨ Features
- 🖥️ Full-featured CLI: Interactive REPL with syntax highlighting and message bubbles.
- 🚀 Background Server: Seamlessly starts a background bridge server on first run.
- 📦 API Key Management: Built-in system to generate and manage keys for secure API access.
- 🔄 Multi-Provider Support: Switch between 7+ providers on the fly.
- 🌊 Streaming Support: Real-time response streaming for both CLI and API.
- 🔧 Autonomous Tool Use: The AI can use filesystem and shell tools when enabled — no special mode needed.
- 🌍 Cross-Platform: Works on Linux, macOS, and Windows.
- 🔀 Multi-Browser: Supports Chrome, Edge, Chromium, Firefox, and WebKit.
- 🔍 Smart Detection: Auto-detects installed browsers (filesystem, registry, PATH).
🚀 Quick Start
Installation
Install globally via NPM:
npm install -g aicbridge-proInitialize your browser environment:
# Install Chromium (default)
aicb setup
# Or install Firefox/WebKit
npx playwright install firefox
npx playwright install webkitLaunch Interactive CLI
Simply run:
aicb🛠️ Supported Providers
| Provider | Command | Web Interface |
|---|---|---|
| ChatGPT | aicb chatgpt | chat.openai.com |
| Gemini | aicb gemini | gemini.google.com |
| Claude | aicb claude | claude.ai |
| DeepSeek | aicb deepseek | chat.deepseek.com |
| Qwen AI | aicb qwen | chat.qwen.ai |
| HuggingChat | aicb huggingchat | huggingface.co/chat |
| GLM AI | aicb glm | chat.z.ai |
🔑 Login & Authentication
Most providers require a one-time login. aicb makes this easy:
- Run the login command for your provider:
aicb login gemini - A visible browser window will open. Perform your login manually.
- Once logged in, go back to the terminal and type
/login done. - Your session is now saved and can be used in headless mode!
🌐 API Usage
aicb stands as a bridge. The background server exposes a professional REST API.
Authentication
First, generate an API key in the terminal:
aicb keygen MyCoolAppSend a Chat Message
curl -X POST http://localhost:3333/chat \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{"provider": "deepseek", "message": "Explain quantum physics."}'Chat with Tools
Enable tool access (filesystem, shell) for the AI:
curl -X POST http://localhost:3333/chat \
-H "Content-Type: application/json" \
-d '{"provider": "chatgpt", "message": "List all JS files in this project.", "tools": true, "workdir": "/path/to/project"}'Streaming JSON
Stream responses in real-time via SSE:
curl -X POST http://localhost:3333/chat/stream \
-H "Content-Type: application/json" \
-d '{"provider": "chatgpt", "message": "Write a long story."}'⌨️ CLI Commands (Inside REPL)
/help— Show help menu/new— Start a fresh conversation/switch <provider>— Change AI on the fly/tools— Toggle AI tool access (filesystem, shell)/status— View server and session health/clear— Clear terminal screen/exit— Exit the bridge
⚙️ Configuration
Settings can be configured via environment variables in .env:
| Variable | Description | Default |
|---|---|---|
| PORT | Server port | 3333 |
| HEADLESS | Run browser without window | true |
| BROWSER_TYPE | chromium, chrome, edge, firefox, webkit | chromium |
| BROWSER_PATH | Custom browser executable path | auto-detected |
| LOCALE | Browser locale | system default |
| TIMEZONE | Browser timezone | system default |
| TOOLS_ENABLED | Enable tool access by default | false |
| TOOLS_WORKDIR | Working directory for tools | current directory |
Tip for Windows users: Set
BROWSER_TYPE=edgeto use the pre-installed Microsoft Edge. Chrome and Edge use Playwright's Chromium engine — full compatibility guaranteed.
🖥️ Platform-Specific Setup
Linux
npm install -g aicbridge-pro
aicb setup
# Auto-detects: chromium, google-chrome, microsoft-edgemacOS
npm install -g aicbridge-pro
aicb setup
# Auto-detects: Google Chrome.app, Chromium.app, Microsoft Edge.appWindows
The app auto-detects installed browsers using 5 strategies:
- Standard install paths (
Program Files,LocalAppData) - Windows Registry (
App Paths) wherecommand (searches PATH)- Smart fallback chain: Edge → Chrome → Chromium
- Playwright's bundled browser as last resort
npm install -g aicbridge-pro
aicb setup
# Recommended: use Edge (pre-installed on Windows 10/11)
set BROWSER_TYPE=edge
# Or use Chrome
set BROWSER_TYPE=chromeNote: Edge is pre-installed on Windows 10/11. If no browser is found, Playwright's bundled Chromium will be downloaded and used automatically.
⚠️ Disclaimer
This project is for educational and personal use only. It is not affiliated with OpenAI, Google, Anthropic, or any other provider. Please respect the Terms of Service of each website.
Made with ❤️ by AI Chat Bridge Team
