Skip to main content

Installation

The Targon CLI is a standalone Rust binary for managing organizations, workloads, volumes, SSH keys, and projects from the terminal. It is no longer shipped with the Python SDK.

Build from source

git clone https://github.com/manifold-inc/targon-sdk.git
cd targon-sdk/cli
cargo build --release

The binary is produced at target/release/targon. Add it to your PATH, or copy it somewhere convenient:

cp target/release/targon ~/.local/bin/targon

Verify the install:

targon --version
targon --help

Quick start

The v3 API scopes workloads, projects, volumes, and SSH keys to an organization. Authenticate, select an organization, and optionally select a default project:

targon auth login
targon org list
targon org use acme
targon project list
targon project use proj_123
targon rental deploy --name dev --image pytorch/pytorch:latest --resource h200-small

Global options

These flags apply to every command:

FlagDescription
--profile <NAME>Configuration profile to use (default: default)
--base-url <URL>Override the API base URL for this invocation
--org <SLUG>Organization slug for this command
--jsonEmit machine-readable JSON instead of formatted tables

Organization context

Org-scoped commands require an active organization. Resolution order:

  1. --org <slug> for a one-off override
  2. TARGON_ORG environment variable
  3. The organization saved by targon org use <slug> for the active profile

Projects are remembered separately for each organization. Set a default with targon project use <UID>. Workload and volume commands use the active project when --project is omitted.

If no organization is selected, org-scoped commands print a setup hint:

organization is required
select one with: targon org use <slug> (or pass --org)

Configuration

The CLI stores configuration under ~/.targon/:

  • config.toml — active profile, per-profile base URLs, active org, and per-org default projects
  • credentials-<profile> — stored API key for each profile (mode 600 on Unix)

You can also set TARGON_API_KEY in the environment. When present, it takes precedence over the stored key.

See targon auth login to store credentials interactively.

Shell completions

Generate completions for your shell:

targon completion bash
targon completion zsh
targon completion fish