CLI Reference

This page covers the current top-level codetwin commands.

Core usage

Start interactive TUI in current directory:

bash
codetwin

Start in a specific project path:

bash
codetwin /path/to/project

Run a one-shot task:

bash
codetwin run [message..]

Attach to an existing server:

bash
codetwin attach [url]

Remote bridge

Pair with bridge URL:

bash
codetwin login [url]

Start worker:

bash
codetwin worker [url]

Mobile connection sequence (typical):

  1. Run codetwin login [url] and copy the 12-character pairing code.
  2. Enter that code in the mobile app Pair screen with the same bridge URL.
  3. Run codetwin worker to start remote execution.

See Mobile Connection for the full flow.

Local pairing host flow:

bash
codetwin pair host

Providers and models

List credentials and env-backed providers:

bash
codetwin providers list

Provider login/logout:

bash
codetwin providers login [url]
codetwin providers logout

List models:

bash
codetwin models [provider]

Sessions and exports

Manage sessions:

bash
codetwin session list
codetwin session create [title]
codetwin session fork <sessionID>
codetwin session delete <sessionID>

Usage and history:

bash
codetwin stats
codetwin export [sessionID]
codetwin import <file>

Integrations and servers

Model Context Protocol commands:

bash
codetwin mcp

Agent Client Protocol server:

bash
codetwin acp

Headless and web modes:

bash
codetwin serve
codetwin web

GitHub helpers:

bash
codetwin github
codetwin pr <number>

Maintenance

Upgrade/uninstall:

bash
codetwin upgrade [target]
codetwin uninstall

Database and debug tools:

bash
codetwin db
codetwin debug

Global flags

Available on all commands:

bash
--help
--version
--print-logs
--log-level <DEBUG|INFO|WARN|ERROR>