Documentation

Unlok CLI

A terminal-native coding agent routed through Unlok — one account, every model, plus MCP servers, chat channels, and scheduled runs. This page covers everything currently shipped.

Getting started

Install

The CLI ships as prebuilt binaries for macOS, Linux, and Windows (arm64 and x64), wrapped in a single npm package — no separate runtime required.

# Requires Node.js 22 or newernpm install -g unlok
unlok --help

Nightly builds are available on the nightly dist-tag: npm install -g unlok@nightly. The CLI checks for updates on every startup and installs them automatically once no other session is attached to your local hub — run unlok update to check manually.

Getting started

Authentication

There are two ways to connect a model — sign in with your Unlok account, or bring your own key.

Sign in with Unlok (recommended)
unlok auth

With no flags, unlok auth opens an interactive setup screen. To skip straight to the browser sign-in:

unlok auth cline

(The provider id for Unlok's hosted account is cline internally — that's expected, and it's what routes you through Unlok's model gateway.)

Bring your own key (BYOK)
unlok auth --provider anthropic --apikey sk-ant-xxxxx --modelid claude-sonnet-4-6

# OpenAI-compatible endpoints (including Azure) also workunlok auth --provider openai-compatible --apikey xxxx --modelid gpt-4o \
  --baseurl https://my-resource.openai.azure.com --azure-api-version 2024-10-21

Whatever you authenticate with is remembered for the next bare unlok run. Use --config <dir> to keep multiple separate configurations, or --data-dir <dir> to sandbox a run's local state entirely.

Getting started

Core usage

Once authenticated, drive the agent three ways:

Interactive TUI
unlok
unlok -i "fix the failing test in src/foo.ts"
One-shot (runs to completion, exits)
unlok "add error handling to the parseConfig function"
Piped stdin
git diff | unlok "review this diff for bugs"

Add --json to stream structured output instead of styled text, or -z, --zen to hand a task to the background hub and exit immediately — useful when you don't want to wait around for a long task. --worktree runs the task in a fresh, detached git worktree instead of your current one.

Extend the agent

MCP servers

Install, list, and remove MCP servers from the terminal — or just ask the agent to do it for you in chat ("install the GitHub MCP server"), since the same install/uninstall/list actions are also available as agent tools.

Local (stdio) server
unlok mcp install fs --yes -- npx -y @modelcontextprotocol/server-filesystem /tmp
Remote server (OAuth or token-based)
unlok mcp install github --transport http --yes \
  --header "Authorization: Bearer $GITHUB_TOKEN" \
  https://api.githubcopilot.com/mcp/

Drop --yes to open the install wizard instead of installing immediately — do this for a server that needs a browser OAuth flow rather than a static token. Re-run authorization any time from the wizard: unlok mcpAuthorize OAuth.

List and remove
unlok mcp list
unlok mcp uninstall github

A curated set of ready-to-install servers — GitHub, Linear, Notion, Context7, Exa, Figma, Stripe — is also browsable from the extension's MCP marketplace.

Configuration

Config

unlok config is the read side of everything the CLI picks up automatically — rules, skills, agents, plugins, hooks, MCP servers, and the built-in tool catalog.

unlok config
# interactive browser
unlok config rules
unlok config tools --json
TargetLists
workflowsEnabled workflow definitions
rulesActive rule files
skillsConfig-file skills (distinct from unlok skill below)
agentsConfigured sub-agent definitions
pluginsDiscovered installed plugins
hooksHook configs and the event each maps to
mcpConfigured MCP servers — same as unlok mcp list
toolsBuilt-in tool catalog plus plugin-provided tools
Extend the agent

Plugins & skills

Plugins extend the CLI itself (custom tools, MCP bundles). Install from an npm package, a git repo, or a local path:

unlok plugin install my-org/my-plugin --git
unlok plugin install some-npm-plugin --npm
unlok plugin uninstall some-npm-plugin

Skills are reusable prompt/workflow packages, managed through the open-source skills CLI (run on demand via npx, no separate install):

unlok skill add owner/repo
unlok skill list
unlok skill remove
Reach the agent anywhere

Connect a chat channel

Bridge the agent into a chat platform so a conversation thread there becomes a coding session, each with its own working directory and history. Supported channels: Telegram, Slack, Discord, WhatsApp, Linear, and Google Chat.

Telegram is the simplest to set up — no public URL required, just a bot token:

1. Create a bot
# In Telegram, message @BotFather, send /newbot, copy the token it gives you
2. Connect it
unlok connect telegram -k "$TELEGRAM_BOT_TOKEN"
Restrict access and pin a workspace
unlok connect telegram -k "$TELEGRAM_BOT_TOKEN" \
  --cwd /path/to/repo --allowed-user-id 12345

By default, anyone who can message the bot can run tasks on your machine — set --allowed-user-id (or run unlok connect with no arguments for the setup wizard, which asks for it) before connecting anything beyond a private test. Stop a channel with unlok connect --stop telegram.

Operate it

Hub, dashboard & updates

A local background hub daemon supervises connectors, scheduled runs, and cross-client session state so they keep running independent of any one terminal.

CommandWhat it does
unlok hub statusIs the hub reachable? Uptime, version.
unlok hub upgradeDrain, wait for idle, stop, and start a fresh hub — for swapping CLI versions without killing active sessions.
unlok dashboardOpen the Unlok Hub web dashboard in your browser.
unlok doctorReport stale local processes/daemons. Add fix to clean them up.
unlok updateCheck for and install a newer CLI version.
Automate it

Scheduling

Run agent tasks on a cron schedule against the hub's scheduler.

unlok schedule create "Daily summary" \
  --cron "0 9 * * *" \
  --prompt "Summarize yesterday's activity in this workspace." \
  --workspace /path/to/repo

unlok schedule list --json
unlok schedule trigger <schedule-id>

Run unlok schedule with no arguments for an interactive wizard, or see pause, resume, history, and upcoming for managing runs already created.

Reference

Full command reference

CommandDescription
unlok [prompt]Start a coding task — one-shot or interactive.
unlok auth [provider]Authenticate a provider and set the active model.
unlok config [target]Inspect current configuration.
unlok mcp [install|uninstall|list]Manage MCP servers, or open the wizard.
unlok plugin install|uninstallManage plugins.
unlok skill [args...]Manage skills via the open skills CLI.
unlok connect [channel]Connect a chat channel to the agent.
unlok hub <subcommand>Manage the local hub daemon.
unlok dashboardOpen the Unlok Hub web dashboard.
unlok doctor [fix|log]Diagnose or clean up stale local state.
unlok updateCheck for and install CLI updates.
unlok schedule <subcommand>Create and manage scheduled runs.
unlok historyList and manage saved session history.
unlok versionPrint the CLI version.
© 2026 HEX INNOVATION LIMITED. ALL RIGHTS RESERVED