Developer Portal
CLI Reference v1.0.1
Source on GitHub

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:

Global Installation (npm):
npm install -g zynocode
Run on-demand with npx:
npx zynocode --help

Command Reference

zynocode login <api-key>

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.
zynocode doctor

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 ✓
zynocode tools [--category=X] [--json]

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 payload
zynocode search <query>

Fuzzy 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 one
zynocode run <slug> [--param key=value]

Executes 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
    }
zynocode mcp-serve

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 / SettingDefaultDescription
ZYNOCODE_API_URLhttps://labs.zynocode.comOverrides 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.jsonLocal JSON storePersistent configuration file managed by `zynocode config set/get`.
← Model Context Protocol (MCP) GuideREST API Reference