CodeTorch.CLI
7.1.100
dotnet tool install --global CodeTorch.CLI --version 7.1.100
dotnet new tool-manifest
dotnet tool install --local CodeTorch.CLI --version 7.1.100
#tool dotnet:?package=CodeTorch.CLI&version=7.1.100
nuke :add-package CodeTorch.CLI --version 7.1.100
CodeTorch CLI
Command-line tool for managing AI coding tasks in the CodeTorch portal.
Documentation
- Agent Guide - Comprehensive guide for AI agents using the CLI
- Troubleshooting - Known issues and solutions
- Specification - Design specification and API details
Installation
dotnet tool install --global CodeTorch.CLI
For cloud coding environments, use the install script that matches the machine:
curl -fsSL https://raw.githubusercontent.com/PhilOchu/codetorch/main/tools/cli/scripts/install-ctc.sh | bash
The Linux installer installs the latest published CLI by default and adds ctc to the current session PATH plus common shell profiles. Pin a version only when you need a controlled rollback or rollout:
curl -fsSL https://raw.githubusercontent.com/PhilOchu/codetorch/main/tools/cli/scripts/install-ctc.sh | CODETORCH_CLI_VERSION=7.1.6 bash
irm https://raw.githubusercontent.com/PhilOchu/codetorch/main/tools/cli/scripts/install-ctc.ps1 | iex
Quick Start
# Configure environment and API key
ctc config env prod
ctc config set api-key <your-api-key>
ctc config set org <organization-id>
# Submit a task and monitor progress (exits at approval gates)
ctc run "Fix the login bug" --org <org-id> --repo <repo-id>
# Submit with automatic approval of all gates
ctc run "Fix the login bug" --org <org-id> --repo <repo-id> --auto-approve
# Or use individual commands
ctc task get "#123" --org <org-id> --stages
ctc task messages "#123" --org <org-id>
ctc task approve "#123" --org <org-id> --yes
Cloud Tool Gateway
Cloud agents can use scoped tool grants without a full CodeTorch user API key.
export CODETORCH_API_URL=https://<portal-api>
export CODETORCH_TOOL_TOKEN=ctg_xxx
ctc tool db targets
ctc tool db schema dev-catalog
ctc tool db query dev-catalog --sql "select top 10 * from dbo.Users"
ctc tool log targets
ctc tool log query app-dev --search "error"
ctc tool devslot targets
Create grants from an authenticated operator session:
ctc tool grant create claude-dev --org <org-id> --expires-days 7 --db dev-catalog=<environment-id>:<database-id>:ro
ctc tool grant create claude-preview --org <org-id> --devslot api=<workspace-id>:api:"Tenant API Slot"
ctc tool grant list --org <org-id>
ctc tool grant revoke <grant-id> --org <org-id>
Commands
Configuration
| Command | Description |
|---|---|
ctc config show |
Show current configuration |
ctc config set <key> <value> |
Set a configuration value |
ctc config env <name> |
Switch environment (prod, local) |
Resources
| Command | Description |
|---|---|
ctc orgs |
List organizations |
ctc workspaces --org <id> |
List workspaces |
ctc repos --org <id> --workspace <id> |
List repositories |
ctc tasks --org <id> |
List tasks |
ctc tasks --org <id> --json |
List tasks as JSON |
ctc workflows |
List available workflows |
ctc workflow <slug-or-id> |
Show workflow details with stage definitions |
Task Operations
| Command | Description |
|---|---|
ctc run "<desc>" --org <id> --repo <id> |
Create task and watch progress (exits on approval gates) |
ctc run "<desc>" --org <id> --repo <id> --skip-stages "Stage1,Stage2" |
Create task and pre-skip named stages |
ctc task create "<desc>" --org <id> --repo <id> |
Create a new task |
ctc task create "<desc>" --org <id> --repo <id> --goal <goal-id> |
Create a task linked to a goal |
ctc task create "<desc>" --org <id> --repo <id> --workflow question --coding-provider <provider-id> --model <model-id> |
Create a task pinned to a workflow, provider, and model |
ctc task create "<desc>" --org <id> --repo <id> --not-before 2026-02-20T18:00:00Z |
Create a queued task that cannot dispatch before the given time |
ctc task create "<desc>" --org <id> --repo <id> --json |
Create a task and output JSON |
ctc task create "<desc>" --org <id> --repo <id> --skip-stages "Stage1,Stage2" |
Create task and pre-skip named stages |
ctc task get <id> --stages |
Get task details with stage status |
ctc task stages <id> |
Show task stages with status and skip eligibility |
ctc task skip-stage <id> "<stage-name>" |
Skip a pending stage |
ctc task skip-stage <id> "<stage-name>" --unskip |
Unskip a previously skipped stage |
ctc task messages <id> |
View messages for current stage |
ctc task artifacts <id> <stage> --list |
List stage artifacts |
ctc task artifacts <id> <stage> <type> |
Get artifact content |
ctc task approve <id> --yes |
Approve stage awaiting approval |
ctc task request-changes <id> -f "<feedback>" |
Request changes to a stage (feedback required; add -y in non-interactive sessions) |
ctc task pause <id> |
Pause a task |
ctc task resume <id> |
Resume a paused task |
ctc task cancel <id> |
Cancel a task |
ctc task retry <id> |
Retry a failed task |
Goal Operations
| Command | Description |
|---|---|
ctc goal list --org <id> |
List goals |
ctc goal create --org <id> --workspace <id> --repo <id> --title "..." --description "..." |
Create a goal |
ctc goal show <goal-id> --org <id> |
Show goal details |
ctc goal start <goal-id> --org <id> |
Start a goal |
ctc goal pause <goal-id> --org <id> --reason "..." |
Pause a goal |
ctc goal resume <goal-id> --org <id> |
Resume a goal |
ctc goal archive <goal-id> --org <id> |
Archive a goal |
ctc goal settings <goal-id> --batch-size 3 |
Update goal settings |
ctc goal issues <goal-id> --org <id> |
List goal issues |
ctc goal rubric list <goal-id> --org <id> |
List rubric items |
ctc goal rubric add <goal-id> --criterion "..." --weight 30 --org <id> |
Add a rubric item |
ctc goal rubric update <goal-id> <rubric-id> --weight 20 |
Update a rubric item |
ctc goal rubric remove <goal-id> <rubric-id> --org <id> |
Remove a rubric item |
Other
| Command | Description |
|---|---|
ctc stats --org <id> |
Show task statistics |
ctc me |
Show current user info |
ctc preview "<desc>" --org <id> |
Preview task classification |
Tool Gateway
| Command | Description |
|---|---|
ctc tool grant create |
Create a scoped tool grant for cloud agents |
ctc tool grant list |
List scoped tool grants |
ctc tool grant show <id> |
Show a scoped tool grant |
ctc tool grant revoke <id> |
Revoke a scoped tool grant |
ctc tool capabilities |
Show what a tool token can do |
ctc tool db targets |
List database targets available to a tool token |
ctc tool db schema <target> |
Show database schema for a target |
ctc tool db query <target> --sql "<sql>" |
Run a database query through a tool token |
ctc tool log targets |
List log targets available to a tool token |
ctc tool log query <target> |
Query logs through a tool token |
ctc tool devslot targets |
List dev slot apps available to a tool token |
ctc tool devslot claim --workspace <id> --app <app> |
Claim a dev slot lease |
ctc tool image publish --app <app> --context <path> |
Build and push a scratch image |
ctc tool devslot deploy-image --app <app> --image <image> |
Deploy an image to a claimed dev slot |
ctc tool devslot urls |
Show URLs for the current lease |
ctc tool devslot cleanup |
Release the current lease |
Tool gateway read commands support agent-friendly output:
ctc tool db targets --json
ctc tool log targets --plain
ctc tool capabilities --json
ctc tool devslot targets --json
ctc tool db query dev-catalog --sql "select top 5 name from sys.tables" --json
When stdout is redirected, tool gateway commands automatically use plain text instead of terminal table rendering.
Exit Codes (ctc run)
| Code | Meaning |
|---|---|
0 |
Task completed successfully |
1 |
Task failed or was cancelled |
2 |
Task is awaiting approval (use ctc task approve to continue) |
Configuration
Configuration is stored in ~/.codetorch/config.json.
Environment Variables (override config file):
CODETORCH_API_KEY- API keyCODETORCH_API_URL- API URLCODETORCH_ENV- Environment nameCODETORCH_TOOL_TOKEN- Scoped tool grant token forctc tool dbandctc tool logCODETORCH_CLI_VERSION- Optional CLI version used by install scripts
Note: Environment variables take precedence over config file. See Troubleshooting for common issues.
Task ID Formats
Both formats work:
#123- Task number (easier to use)5835baea-c48a-4101-9974-0b414a89967a- Full GUID
Requirements
- .NET 10.0 Runtime or later
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 7.1.100 | 38 | 7/6/2026 |
| 7.1.99 | 36 | 7/6/2026 |
| 7.1.98 | 35 | 7/6/2026 |
| 7.1.97 | 35 | 7/6/2026 |
| 7.1.96 | 36 | 7/6/2026 |
| 7.1.95 | 34 | 7/6/2026 |
| 7.1.94 | 38 | 7/6/2026 |
| 7.1.93 | 49 | 7/5/2026 |
| 7.1.92 | 33 | 7/5/2026 |
| 7.1.91 | 50 | 7/5/2026 |
| 7.1.90 | 47 | 7/5/2026 |
| 7.1.89 | 44 | 7/5/2026 |
| 7.1.88 | 54 | 7/4/2026 |
| 7.1.87 | 40 | 7/4/2026 |
| 7.1.86 | 37 | 7/4/2026 |
| 7.1.85 | 52 | 7/4/2026 |
| 7.1.84 | 96 | 7/1/2026 |
| 7.1.83 | 83 | 7/1/2026 |
| 7.1.82 | 88 | 6/30/2026 |
| 7.1.81 | 100 | 6/29/2026 |