Command Line Interface (CLI) Guide
The official zynocode command-line client provides terminal tool execution, workspace authentication, diagnostics, and Model Context Protocol (MCP) stdio serving for AI desktop assistants.
Server-Side Execution Notice
Commands executed via zynocode run or proxied through zynocode mcp-serve transmit request payloads to the Zynocode Labs REST API over HTTPS. Unlike our in-browser WebAssembly tools, CLI executions run remotely on Zynocode Labs backend servers.
Installation
Install the CLI globally from npm, or run on-demand with npx:
npm install -g zynocode
npx zynocode --help
Command Reference
Persists your API key to ~/.zynocode/config.json with permission verification.
$ zynocode login zyno_ak_live_abcdef1234567890 ✓ API key saved successfully. ✓ API URL: https://labs.zynocode.com ✓ Run 'zynocode doctor' to verify your connection.
Runs pre-flight connectivity, auth, and runtime checks against the platform API.
$ zynocode doctor Zynocode Doctor ✓ API key configured ✓ API URL: https://labs.zynocode.com ✓ API reachable — 76 tools available ✓ Node.js v20.18.0 All checks passed ✓
Lists tools registered in the catalog grouped by category or filters by category.
$ zynocode tools --category=developer
Zynocode Labs — 76 tools available
Category: developer (42 tools)
── DEVELOPER ──
json-formatter Format, validate, and beautify JSON strings instantly
base64-encoder Encode and decode text strings or binary files to Base64
jwt-decoder Decode JSON Web Tokens (JWT) locally to inspect header and payloadFuzzy searches tools by name, description, slug, and keywords.
$ zynocode search pdf
Found 6 tool(s) matching "pdf":
pdf-compressor Compress PDF documents while preserving quality
pdf-splitter Extract or split pages from PDF files
pdf-merger Combine multiple PDF documents into oneExecutes a tool on the backend engine and formats the returned payload directly in stdout.
$ zynocode run word-counter --param text="Antigravity developer tools"
▸ Running word-counter...
✓ Success
⏱ 18ms
Output:
{
"words": 3,
"characters": 27,
"sentences": 1,
"paragraphs": 1
}Spawns a stdio JSON-RPC 2.0 Model Context Protocol server. Used by Cursor and Claude Desktop to connect tools to AI chats.
# Connects via stdin/stdout:
$ zynocode mcp-serve
{"jsonrpc":"2.0","id":1,"method":"initialize"}
{"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2024-11-05","capabilities":{"tools":{"listChanged":false}},"serverInfo":{"name":"zynocode-labs","version":"1.0.0"}}}Configuration & Environment Variables
| Variable / Setting | Default | Description |
|---|---|---|
| ZYNOCODE_API_URL | https://labs.zynocode.com | Overrides backend API destination for staging/local development. |
| ZYNOCODE_API_KEY | (none) | Fallback API key if no key is configured in ~/.zynocode/config.json. |
| ~/.zynocode/config.json | Local JSON store | Persistent configuration file managed by `zynocode config set/get`. |