CLI Reference
This page covers the current top-level codetwin commands.
Core usage
Start interactive TUI in current directory:
bash
codetwinStart in a specific project path:
bash
codetwin /path/to/projectRun 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):
- Run
codetwin login [url]and copy the 12-character pairing code. - Enter that code in the mobile app Pair screen with the same bridge URL.
- Run
codetwin workerto start remote execution.
See Mobile Connection for the full flow.
Local pairing host flow:
bash
codetwin pair hostProviders and models
List credentials and env-backed providers:
bash
codetwin providers listProvider login/logout:
bash
codetwin providers login [url]
codetwin providers logoutList 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 mcpAgent Client Protocol server:
bash
codetwin acpHeadless and web modes:
bash
codetwin serve
codetwin webGitHub helpers:
bash
codetwin github
codetwin pr <number>Maintenance
Upgrade/uninstall:
bash
codetwin upgrade [target]
codetwin uninstallDatabase and debug tools:
bash
codetwin db
codetwin debugGlobal flags
Available on all commands:
bash
--help
--version
--print-logs
--log-level <DEBUG|INFO|WARN|ERROR>