Install cto CLI - Free AI Coding CLI in 30 Seconds

Install cto CLI: opencode + cto.new gateway, 10+ frontier models without API keys. Free forever, ad-supported, rolling 24h+7d limits.

Published

Install cto CLI - Free AI Coding CLI in 30 Seconds

cto CLI is a free coding CLI that runs every frontier model without an API key. It's an opencode plugin + provider - opencode (Apache 2.0) is the agent running in your terminal; cto's provider is the cto.new gateway that handles LLM calls. Ad-supported, no credit card.

Install in one line

curl -fsSL https://cto.new/install | bash

That's it. The installer drops cto onto your PATH (Mac, Linux, Windows) and prints next-step instructions. Then in any project:

cto

First launch opens your browser to log you in (email or GitHub). Subsequent runs are silent.

What you get

  • Every frontier model. Opus 4.8, Sonnet 4.6, GPT-5.5, GPT-5.3 Codex, Gemini 3.5 Flash, Gemini 3.1 Pro, GLM 5.1, Grok 4.20, Kimi K2.6, MiniMax M2.7. Pick via opencode's /model slash command - no API keys required.
  • opencode-native MCP. Configure your MCP servers (stdio or streamable HTTP) in opencode's standard config format. Same as vanilla opencode.
  • Full opencode feature set. Agent loop, file editing, plan mode, worktrees, hooks, skills, slash commands, LSP. cto inherits all of it.
  • Free forever, ad-supported. Rolling 24-hour and 7-day usage limits (not a calendar-day reset). No credit card, no per-token meter.
  • Cross-platform. Mac, Linux, Windows.

The commands you'll use

cto                       Launch the cto coding agent
cto login                 Re-authenticate this device
cto logout                Revoke credentials, forget the local copy
cto upgrade               Update cto to the latest release
cto uninstall             Remove cto + ~/.cto from this machine
cto --version             Print the cto version
cto --licenses            Print license + third-party notices
cto --help                Show usage

Sub-commands not listed pass through to opencode. Inside the TUI, /cto-login and /cto-logout let you re-auth without quitting.

Quickstart inside the TUI

cto

# Inside the opencode TUI:
> write tests for the auth module and run them
> /model openai/gpt-5.5         # switch model per session
> /mcp                          # see configured MCP servers

The CLI is composable - tail -200 app.log | cto -p "find anomalies" works for one-shot piped use.

How it compares to other coding CLIs

CLIFree tierAPI keysModels
cto CLIFree forever (ads), rolling 24h+7dNone - cto.new gateway handles it10+ frontier via /model
Claude CodeNone (paid plan)Required (Anthropic)Claude + third-party providers
Cursor CLIHobby trial; Pro $20/mo per seatTied to Cursor accountFrontier menu via Cursor
AiderFree CLIBYOK per providerAny via litellm
GitHub Copilot CLICopilot Free (tight caps)GitHub Copilot accountAnthropic, Google, OpenAI
Codex CLINone - needs ChatGPT or API keyOpenAI requiredOpenAI only
Gemini CLI60/min, 1000/day with GoogleGoogle accountGemini only

cto CLI is the free-forever option that doesn't ask you to bring keys.

Troubleshooting

  • cto: command not found after install: open a new terminal session (the installer adds to your PATH; existing sessions need to reload it).
  • Login browser doesn't open: copy the URL from the terminal output into your browser manually.
  • Hit the rolling 24h limit: wait for it to slide forward, or upgrade to premium for the raised window.

Uninstall

cto uninstall

Removes the binary and ~/.cto. Confirms before deleting.

What's actually different about cto CLI

Three things that make this work in 2026:

  1. opencode underneath. The agent loop is open source. You can audit it, fork it, contribute back. cto adds the parts that make the free tier work - the managed gateway and the ads.
  2. No API keys. The cto.new gateway handles provider auth. You sign in once with cto; the CLI reaches every frontier model through one account.
  3. Free forever. Ad-supported with rolling 24h+7d limits. Most days of coding fit within the limits. Premium raises them for production use.

Next steps