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.
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 --helpNightly 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.
There are two ways to connect a model — sign in with your Unlok account, or bring your own key.
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.)
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-21Whatever 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.
Once authenticated, drive the agent three ways:
unlok unlok -i "fix the failing test in src/foo.ts"
unlok "add error handling to the parseConfig function"
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.
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.
unlok mcp install fs --yes -- npx -y @modelcontextprotocol/server-filesystem /tmp
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 mcp → Authorize OAuth.
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.
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| Target | Lists |
|---|---|
| workflows | Enabled workflow definitions |
| rules | Active rule files |
| skills | Config-file skills (distinct from unlok skill below) |
| agents | Configured sub-agent definitions |
| plugins | Discovered installed plugins |
| hooks | Hook configs and the event each maps to |
| mcp | Configured MCP servers — same as unlok mcp list |
| tools | Built-in tool catalog plus plugin-provided tools |
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
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:
# In Telegram, message @BotFather, send /newbot, copy the token it gives youunlok connect telegram -k "$TELEGRAM_BOT_TOKEN"
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.
A local background hub daemon supervises connectors, scheduled runs, and cross-client session state so they keep running independent of any one terminal.
| Command | What it does |
|---|---|
unlok hub status | Is the hub reachable? Uptime, version. |
unlok hub upgrade | Drain, wait for idle, stop, and start a fresh hub — for swapping CLI versions without killing active sessions. |
unlok dashboard | Open the Unlok Hub web dashboard in your browser. |
unlok doctor | Report stale local processes/daemons. Add fix to clean them up. |
unlok update | Check for and install a newer CLI version. |
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.
| Command | Description |
|---|---|
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|uninstall | Manage 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 dashboard | Open the Unlok Hub web dashboard. |
unlok doctor [fix|log] | Diagnose or clean up stale local state. |
unlok update | Check for and install CLI updates. |
unlok schedule <subcommand> | Create and manage scheduled runs. |
unlok history | List and manage saved session history. |
unlok version | Print the CLI version. |
The operational layer between your team and every AI model it touches.