# CLI

> The `jenks` command: every tool as a command, plus a local stdio MCP server.

## Install

```bash
curl -fsSL https://jenksguo.xyz/downloads/install.sh | sh     # macOS / Linux → ~/.local/bin/jenks
node jenks.mjs <command>                          # or run the single-file Node build (https://jenksguo.xyz/downloads/jenks.mjs)
```

Windows: download `jenks-windows-x64.exe` from https://jenksguo.xyz/agents.

## Global flags

| Flag | Env | Default |
| --- | --- | --- |
| `--api <url>` | `JENKS_API` | `https://jenksguo.xyz` |
| `--locale <code>` | `JENKS_LOCALE` | `en` |
| `--json` | — | human-readable output |
| `--branch main\|dev` | — | `main` (admin commands) |
| `--token <t>` | `JENKSGUO_ADMIN_TOKEN` | — (admin commands) |
| `--version`, `--help` | — | — |

## Commands

| Command | Tool |
| --- | --- |
| `jenks brief` | `get_brief` |
| `jenks list [--tag it] [--lens solution-architect] [--kind project]` | `list_experience` |
| `jenks get <slug>` | `get_entry` |
| `jenks lenses` | `list_lenses` |
| `jenks search "<query>"` | `search_jenks` |
| `jenks doc <name>` | `get_document` |
| `jenks ask "<question>"` | `ask_jenks` |
| `jenks admin schema` | `admin_schema` |
| `jenks admin ls [dir]` | `admin_list_files` |
| `jenks admin get <slug|path>` | `admin_read_file` |
| `jenks admin validate <path> <file>` | `admin_validate` |
| `jenks admin put <path> <file> -m <message>` | `admin_write_file` |
| `jenks admin rm <path> -m <message>` | `admin_delete_file` |
| `jenks admin commit <changes.json> -m <message>` | `admin_commit_changes` |
| `jenks admin ai-edit <slug|path> "<instruction>" [--apply]` | `admin_ai_edit` |
| `jenks admin deploys` | `admin_deploy_status` |
| `jenks admin promote` | `admin_promote` |
| `jenks admin whoami` | — |
| `jenks mcp [--admin]` | local MCP server on stdio (proxies to the remote server) |

## Local MCP

```json
{
  "mcpServers": {
    "jenks": {
      "command": "jenks",
      "args": [
        "mcp"
      ]
    },
    "jenks-admin": {
      "command": "jenks",
      "args": [
        "mcp",
        "--admin"
      ],
      "env": {
        "JENKSGUO_ADMIN_TOKEN": "<token>"
      }
    }
  }
}
```
