cli-bridge
Serves as a runtime backend for the code.run operation, executing JavaScript/TypeScript snippets via Bun.
Primary backend for the http.request, http.download and web.search operations, enabling HTTP calls, file downloads, and web searches against any endpoint.
Serves as a runtime backend for the code.run operation, executing scripts via Deno.
Backend for the container.list operation, listing containers through the Docker CLI.
One of the database backends for the db.query operation, running SQL queries against DuckDB.
Target of the web.search operation, which queries the DuckDuckGo HTML search endpoint via curl.
Backend for the media.info and media.convert operations, inspecting and transcoding media using FFmpeg/ffprobe.
Backend for the vcs.log and vcs.status operations, retrieving commit history and working-tree status from Git repositories.
Alternative backend for the http.request operation, performing HTTP requests via HTTPie.
One of the database backends for the db.query operation, running SQL queries against MySQL.
Runtime backend for the code.run operation, executing JavaScript code with Node.js.
Backend for the container.list operation, listing containers through Podman.
Runtime backend for the code.run operation, executing Python scripts.
One of the database backends for the db.query operation, running SQL queries against SQLite.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cli-bridgefetch the stargazers count for nodejs/node and save it to stars.txt"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
cli-bridge
Cihazınızdaki her CLI aracını, diğer tüm CLI araçlarına ve AI ajanlarına bağlayan yerel köprü (bridge).
cli-bridge iki yönlü bir köprüdür:
Araçlar arası —
curlçıktısınıjq'ya,git log'ujq'ya,ffmpegçıktısınıpdftotext'e akıtabilirsiniz. Herhangi bir işi anlamsal operasyon olarak tanımlayıp zincirleyebilirsiniz.AI ajanları arası — MCP (Model Context Protocol) sunucusu ile Claude Code, opencode, Cursor, Gemini CLI gibi ajanlar makinenizdeki her CLI aracını çağırabilir.
Katalogda 170+ popüler araç tanımlıdır, ama katalog bir beyaz liste değildir: PATH'te bulunan her binary, katalogda olmasa bile çağrılabilir. Katalog sadece zengin açıklama, semantik yetenek ve kurulum tarifi ekler.
Hızlı başlangıç
npm install -g cli-bridge # veya: npm install && npm run build
bridge doctor # ortam raporu
bridge list # keşfedilen araçlar
bridge search json # araç arama
bridge op http.request --url https://api.github.com
bridge chain "http.request url=https://api.github.com/repos/nodejs/node | json.query filter=.stargazers_count"AI ajanına bağlamak
bridge init # istemciye özel MCP yapılandırmasını yazdırırClaude Code için:
claude mcp add cli-bridge -- node "C:\...\cli-bridge\dist\mcp\main.js"Ajan artık bridge_search, bridge_call, bridge_run_op, bridge_chain araçlarını ve keşfedilen her CLI aracını (cli_git, cli_docker, ...) kullanabilir.
Related MCP server: cli2mcp
Üç katmanlı model
Katman | Ne işe yarar | Örnek |
Tool | Makinenizdeki somut binary |
|
Operation | Araçtan bağımsız, zincirlenebilir anlamsal eylem |
|
Chain | Birden fazla operasyonun veri akışı |
|
Operasyonlar birden fazla aracı destekler ve işe yaramazsa saf Node.js'e düşer. Yani jq kurulu değilse bile json.query çalışır (dahili JSONPath motoru ile).
Komutlar
discover
list [--all] [--category X] [--json] keşfedilen araçları listele
search <sorgu> ada/yeteneğe göre ara
describe <araç> detay, sürüm, kurulum tarifi
ops zincirlenebilir operasyonlar
doctor ortam raporu
rescan PATH'i yeniden tara
run
call [bayraklar] <araç> [args...] bir CLI aracını çalıştır
op <operasyon> --anahtar değer anlamsal operasyon çalıştır
chain "op a=b | op c=d" boru hattı çalıştır
connect
serve [--port 8791] yerel HTTP hub
mcp MCP sunucusu (stdio)
init MCP istemci yapılandırması
manage
install <araç> eksik aracı kur
policy allow|deny|show <araç> izin listeleri
completions <shell> kabuk tamamlamalarıÖnemli:
bridge calliçinde bridge bayrakları araç adından önce yazılır. Araç adından sonrası birebir araca geçer:bridge call git log --oneline -10 # git'e "log --oneline -10" gider bridge call --json git log --oneline # JSON çıktı isterseniz bayrağı önce yazın
Operasyonlar
Operasyon | Araçlar (öncelik sırasıyla) | Dahili yedek |
| curl, httpie, wget | Node |
| curl, wget | Node |
| jq, gojq, jaq | JSONPath motoru |
| yq | — |
| — | Node |
| ripgrep, ag | Node regex walker |
| node, python, deno, bun | Node |
| git | — |
| docker, podman, nerdctl | — |
| kubectl | — |
| psql, mysql, sqlite3, duckdb | — |
| ffprobe, ffmpeg | — |
| magick | — |
| pdftotext, tesseract | — |
| tar, 7z, zip | — |
| nslookup, dig | — |
| tasklist, ps | — |
| — | Node |
| curl | DuckDuckGo HTML |
Zincirleme (pipeline)
# Kısa yazım
bridge chain "http.request url=https://api.github.com/repos/nodejs/node | json.query filter=.stargazers_count"
# Uzun yazım (JSON)
bridge chain --file chain.jsonchain.json:
{
"input": { "repo": "nodejs/node" },
"steps": [
{ "id": "fetch", "op": "http.request", "with": { "url": "https://api.github.com/repos/{{input.repo}}" } },
{ "id": "stars", "op": "json.query", "with": { "filter": "$.stargazers_count" } },
{ "id": "save", "op": "file.write", "with": { "path": "stars.txt", "content": "{{steps.stars.stdout}}" } }
]
}Kullanılabilir referanslar:
Referans | Anlamı |
| adımın ham çıktısı |
| adımın ayrıştırılmış JSON çıktısı |
| JSON içindeki alan ( |
| çıkış kodu |
| zincir girişi |
| ortam değişkeni |
Bir adımın stdout'u, sonraki adımın stdin'i olarak otomatik aktarılır.
HTTP API
bridge serve --port 8791Uç nokta | Açıklama |
| durum |
| araç listesi / arama |
| araç detayı (sürüm dahil) |
| operasyon listesi + mevcut arka uçlar |
| operasyon detayı |
| araç çağır ( |
| operasyon çalıştır ( |
| boru hattı çalıştır ( |
| SSE canlı olay akışı |
curl -s http://127.0.0.1:8791/v1/op -H "Content-Type: application/json" \
-d '{"op":"json.query","input":{"json":"{\"a\":1}","filter":"$.a"}}'Güvenlik
Shell yok. Argümanlar
spawnile dizi olarak geçer; enjeksiyon mümkün değildir.Tehlikeli komut engeli.
rm -rf /,format C:,dd of=/dev/sda, fork bomb gibi kalıplar çalıştırılmadan reddedilir.İzin listesi.
bridge policy allow <araç>ile sadece izin verilen arağa daraltın (mode: allowlist).Sır temizleme. Çıktılardaki API anahtarları, GitHub token'ları, JWT'ler ve özel anahtarlar otomatik maskelenir.
Yerel varsayılan. Sunucu
127.0.0.1'e bağlanır.config.jsoniçineserver.tokeneklerseniz tüm isteklerAuthorization: Bearer <token>ister.Kayıt. Her çağrı
~/.cli-bridge/altında önbelleklenir;~/.cli-bridge/config.jsontüm ayarları barındırır.
Kurulum
bridge install <araç> mevcut paket yöneticisini otomatik seçer:
Windows: winget → scoop → choco
macOS/Linux: brew → apt/dnf
Hepsi: npm → pipx → pip → gem → cargo → go
bridge install jq # otomatik kurar
bridge describe jq # kurulum planını gösterirYapılandırma
~/.cli-bridge/config.json:
{
"server": { "host": "127.0.0.1", "port": 8791 },
"exec": { "timeoutMs": 60000, "maxBuffer": 4194304 },
"policy": {
"mode": "denylist",
"allowed": [],
"denied": [],
"allowShell": false,
"blockDangerous": true
},
"redact": true,
"mcp": { "exposeTools": true, "maxTools": 150 },
"discovery": { "includeSystem": false, "scanTimeoutMs": 5000 }
}Kütüphane olarak kullanımı
import { registry, runOperation, runChain } from 'cli-bridge';
await registry.load();
const res = await runOperation('http.request', {
input: { url: 'https://api.github.com/repos/nodejs/node' },
});
const piped = await runChain({
steps: [
{ id: 'a', op: 'http.request', with: { url: 'https://api.github.com/repos/nodejs/node' } },
{ id: 'b', op: 'json.query', with: { filter: '$.stargazers_count' } },
],
});
console.log(piped.steps[1]?.json);Geliştirme
npm install
npm run build # TypeScript -> dist
npm test # 30 birim testi
node scripts/mcp-smoke.mjs # MCP el sıkışma testiLisans
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
- LogRackOAuthai.lograck
Shared memory for your AI tools: tasks, notes and context every tool can read and write over MCP.
The OpenRouter for tools. One MCP connection gives any AI agent 254 hosted tools, pay per call.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA general-purpose MCP gateway that exposes your local CLI skills to any AI assistant.11 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to call any CLI tool by scanning its help output and serving it as an MCP server.1GPL 3.0
- AlicenseNot gradedqualityCmaintenanceUniversal MCP server that wraps any CLI tool, enabling AI assistants to run commands via natural language.1MIT
- AlicenseNot gradedqualityAmaintenanceTurns any command-line tool into an MCP server by parsing its --help, enabling AI assistants to discover and safely invoke CLI tools with validation, allow-listing, and sandboxing.MIT