{"binary":"clockingcloud","version":"0.1.0","globalFlags":[{"name":"--output","short":"-o","value":"table|json|yaml","default":"table","description":"Output format. Use json in scripts. Errors are always written to stderr."},{"name":"--quiet","short":"-q","description":"Print only identifiers (names, URLs, request IDs). Useful with shell substitution."},{"name":"--yes","short":"-y","description":"Answer yes to confirmation prompts. Required for destructive commands when stdin is not a terminal."},{"name":"--api-url","value":"url","default":"https://www.clockingcloud.com","description":"Override the API base URL. Also settable with CLOCKINGCLOUD_API_URL."},{"name":"--no-color","description":"Disable ANSI colors. Also honored through the NO_COLOR environment variable."},{"name":"--debug","description":"Print HTTP request and response metadata to stderr. Credentials are redacted."},{"name":"--help","short":"-h","description":"Show help for the command."},{"name":"--version","short":"-v","description":"Print the CLI version and exit."}],"environment":[{"name":"CLOCKINGCLOUD_API_KEY","description":"API key used instead of the stored login. Takes precedence over clockingcloud login."},{"name":"CLOCKINGCLOUD_API_URL","description":"API base URL. Defaults to https://www.clockingcloud.com."},{"name":"CLOCKINGCLOUD_CONFIG_DIR","description":"Configuration directory. Defaults to $XDG_CONFIG_HOME/clockingcloud, or ~/.config/clockingcloud."},{"name":"CLOCKINGCLOUD_OUTPUT","description":"Default output format (table, json or yaml)."},{"name":"CLOCKINGCLOUD_NO_UPDATE_CHECK","description":"Set to 1 to disable the once-a-day check for a newer CLI version."},{"name":"NO_COLOR","description":"Set to any value to disable colored output."},{"name":"HTTPS_PROXY / NO_PROXY","description":"Standard proxy variables. The CLI honors them for every request."}],"exitCodes":[{"code":"0","meaning":"Success."},{"code":"1","meaning":"Unexpected error. Re-run with --debug and include the request ID when contacting support."},{"code":"2","meaning":"Invalid usage: unknown flag, missing argument or invalid clockingcloud.yaml."},{"code":"3","meaning":"Not authenticated, or the API key was rejected."},{"code":"4","meaning":"Insufficient credits to start or continue the operation."},{"code":"5","meaning":"The named resource was not found."},{"code":"6","meaning":"Conflict: the resource already exists or is in a state that blocks the operation."},{"code":"7","meaning":"Timed out while waiting (see --timeout)."},{"code":"130","meaning":"Interrupted by the user (Ctrl+C). Running generations keep going unless --cancel-on-exit is set."}],"commands":[{"name":"login","group":"Account","summary":"Sign in to your ClockingCloud account.","description":"Opens your browser to authorize this machine and stores a credential in the configuration directory. Use --device on a machine without a browser, or --with-api-key to read an API key from stdin.","usage":"clockingcloud login [--device] [--no-browser] [--with-api-key]","flags":[{"name":"--device","description":"Use the device-code flow. Prints a short code and a URL to open on any other device."},{"name":"--no-browser","description":"Print the authorization URL instead of opening a browser."},{"name":"--with-api-key","description":"Read an API key from stdin and store it. For CI and servers."}],"examples":["clockingcloud login","clockingcloud login --device","echo \"$CLOCKINGCLOUD_API_KEY\" | clockingcloud login --with-api-key"]},{"name":"logout","group":"Account","summary":"Remove stored credentials from this machine.","description":"Deletes the local credential and revokes the CLI session. API keys are not revoked; use clockingcloud api-key rm for that.","usage":"clockingcloud logout","examples":["clockingcloud logout"]},{"name":"whoami","group":"Account","summary":"Show the signed-in account and credit balance.","usage":"clockingcloud whoami","examples":["clockingcloud whoami","clockingcloud whoami -o json"]},{"name":"api-key create","group":"Account","summary":"Create an API key for CI/CD and the REST API.","description":"The secret is printed once and never shown again. Store it in your secret manager immediately.","usage":"clockingcloud api-key create --name <name> [--expires <duration>]","flags":[{"name":"--name","value":"string","required":true,"description":"A label to identify the key (up to 60 characters)."},{"name":"--expires","value":"duration","default":"never","description":"Expire the key after a duration such as 30d or 12h."}],"examples":["clockingcloud api-key create --name github-actions --expires 90d"]},{"name":"api-key ls","group":"Account","summary":"List API keys (prefix, name, created, last used, expiry).","usage":"clockingcloud api-key ls","examples":["clockingcloud api-key ls"]},{"name":"api-key rm","group":"Account","summary":"Revoke an API key immediately.","usage":"clockingcloud api-key rm <id>","args":[{"name":"id","description":"Key ID from clockingcloud api-key ls.","required":true}],"examples":["clockingcloud api-key rm key_8f3a1c"]},{"name":"run","group":"Run","summary":"Run a model once and download the result.","description":"Starts a short-lived instance, runs the generation, writes the files to --out, and releases the GPU. You are billed per second of GPU time from when the model is loaded until the result is written. Use deploy for repeated traffic.","usage":"clockingcloud run <model> --prompt <text> [flags]","args":[{"name":"model","description":"A model ID from clockingcloud models ls, or hf://org/model.","required":true}],"flags":[{"name":"--prompt","short":"-p","value":"text","required":true,"description":"The text prompt."},{"name":"--negative-prompt","value":"text","description":"Concepts to steer away from. Ignored by models that do not support it."},{"name":"--image","value":"path|url","description":"Input image for editing and image-to-video models (qwen-image-edit, wan-2.2-i2v)."},{"name":"--width","value":"px","default":"1024","description":"Image width. Must be a multiple of 16."},{"name":"--height","value":"px","default":"1024","description":"Image height. Must be a multiple of 16."},{"name":"--seconds","value":"n","default":"5","description":"Video length in seconds. Video models only."},{"name":"--fps","value":"n","default":"model default","description":"Video frames per second. Video models only."},{"name":"--steps","value":"n","default":"model default","description":"Number of denoising steps."},{"name":"--guidance","value":"n","default":"model default","description":"Guidance scale."},{"name":"--seed","value":"n","default":"random","description":"Seed for reproducible output."},{"name":"--n","value":"count","default":"1","description":"Number of outputs to generate in one batch (1 to 16)."},{"name":"--gpu","value":"auto|l40s|h100|h200|b200","default":"auto","description":"GPU type. auto picks the smallest GPU that fits the model."},{"name":"--out","short":"-O","value":"dir","default":".","description":"Directory for the output files."},{"name":"--no-wait","description":"Return a request ID immediately instead of waiting for the result."},{"name":"--timeout","value":"duration","default":"30m","description":"Give up waiting after this long. The generation is not cancelled."},{"name":"--cancel-on-exit","description":"Cancel the generation if the command is interrupted."}],"examples":["clockingcloud run z-image-turbo --prompt \"a ceramic mug on a linen table, soft light\" --out ./shots","clockingcloud run wan-2.2 --prompt \"waves at dusk\" --seconds 5 --gpu h200","clockingcloud run qwen-image-edit --image ./mug.png --prompt \"make the mug emerald green\""]},{"name":"dev","group":"Run","summary":"Debug your setup in a CPU sandbox with the same image.","description":"Runs the setup steps and a shell in a CPU-only sandbox built from the same image your instance will use. No GPU is attached, so debugging costs only CPU time. Press Ctrl+D to exit and tear the sandbox down.","usage":"clockingcloud dev [-f <file>] [--shell <shell>]","flags":[{"name":"--file","short":"-f","value":"path","default":"clockingcloud.yaml","description":"Configuration file."},{"name":"--shell","value":"string","default":"bash","description":"Shell to start in the sandbox."}],"examples":["clockingcloud dev","clockingcloud dev -f configs/prod.yaml"]},{"name":"plan","group":"Run","summary":"Validate clockingcloud.yaml and show the GPU and estimated cost.","description":"Parses and validates the file, resolves gpu: auto, checks that volumes and secrets exist, and prints an estimate. Nothing is created and nothing is billed. Exits with code 2 if the file is invalid.","usage":"clockingcloud plan [-f <file>] [--gpu <type>] [--hours <n>]","flags":[{"name":"--file","short":"-f","value":"path","default":"clockingcloud.yaml","description":"Configuration file."},{"name":"--gpu","value":"type","description":"Override the GPU for the estimate."},{"name":"--hours","value":"n","default":"1","description":"Hours of active GPU time to price."}],"examples":["clockingcloud plan","clockingcloud plan -f clockingcloud.yaml --gpu h100 --hours 8"]},{"name":"deploy","group":"Instances","summary":"Create or update an instance. It starts on demand and scales to zero.","description":"Creates the instance if the name is new, or updates it in place. With scale.min of 0 (the default) no GPU runs until the first request arrives; with scale.min of 1 or more the instance starts immediately. Re-running with the same input is safe.","usage":"clockingcloud deploy [<model|path>] [-f <file>] [flags]","args":[{"name":"target","description":"A model ID, hf://org/model, or a local directory. Omit when using -f."}],"flags":[{"name":"--file","short":"-f","value":"path","description":"Read the instance definition from a clockingcloud.yaml file."},{"name":"--name","value":"name","description":"Instance name. Defaults to the model ID or directory name."},{"name":"--gpu","value":"auto|l40s|h100|h200|b200","default":"auto","description":"GPU type."},{"name":"--gpus","value":"n","default":"1","description":"GPUs per replica (1, 2, 4 or 8)."},{"name":"--min","value":"n","default":"0","description":"Minimum replicas. 0 scales to zero."},{"name":"--max","value":"n","default":"1","description":"Maximum replicas."},{"name":"--idle-timeout","value":"duration","default":"60s","description":"Stop a replica after this long without work."},{"name":"--volume","value":"name:/path[:ro]","description":"Mount a volume. Repeatable."},{"name":"--env","short":"-e","value":"KEY=value","description":"Set an environment variable. Repeatable."},{"name":"--no-wait","description":"Return as soon as the definition is saved."},{"name":"--timeout","value":"duration","default":"15m","description":"How long to wait for the instance to become ready."}],"examples":["clockingcloud deploy z-image-turbo --name img-prod --max 8","clockingcloud deploy -f clockingcloud.yaml","clockingcloud deploy hf://org/custom-model --gpu h100 --volume weights:/models:ro"]},{"name":"up","group":"Instances","summary":"Provision and start an instance from clockingcloud.yaml right now.","description":"Like deploy -f, but always starts a replica immediately, even when scale.min is 0. With --debug it picks the smallest compatible GPU, streams setup output, and stops the instance when you exit so a broken setup cannot keep billing.","usage":"clockingcloud up -f <file> [--gpu <type>] [--debug]","flags":[{"name":"--file","short":"-f","value":"path","default":"clockingcloud.yaml","description":"Configuration file."},{"name":"--gpu","value":"type","description":"Override the GPU in the file."},{"name":"--debug","description":"Cheapest compatible GPU, streamed setup logs, automatic stop on exit."},{"name":"--timeout","value":"duration","default":"15m","description":"How long to wait for the instance to become ready."}],"examples":["clockingcloud up -f clockingcloud.yaml","clockingcloud up -f clockingcloud.yaml --gpu l40s --debug"]},{"name":"ls","group":"Instances","summary":"List instances with state, GPU, replicas and uptime.","usage":"clockingcloud ls [--state <state>]","flags":[{"name":"--state","value":"state","description":"Filter by provisioning, running, scaling, stopping, stopped or failed."}],"examples":["clockingcloud ls","clockingcloud ls --state running -o json"]},{"name":"status","group":"Instances","summary":"Show details for one instance.","usage":"clockingcloud status <name>","args":[{"name":"name","description":"Instance name (2 to 39 lowercase letters, numbers or dashes).","required":true}],"examples":["clockingcloud status img-prod"]},{"name":"start","group":"Instances","summary":"Start a stopped instance.","usage":"clockingcloud start <name> [--no-wait]","args":[{"name":"name","description":"Instance name (2 to 39 lowercase letters, numbers or dashes).","required":true}],"flags":[{"name":"--no-wait","description":"Return without waiting for ready."}],"examples":["clockingcloud start img-prod"]},{"name":"stop","group":"Instances","summary":"Stop an instance and release its GPUs.","description":"Billing for GPU time stops as soon as the GPUs are released. The definition and attached volumes are kept.","usage":"clockingcloud stop <name>","args":[{"name":"name","description":"Instance name (2 to 39 lowercase letters, numbers or dashes).","required":true}],"examples":["clockingcloud stop img-prod"]},{"name":"scale","group":"Instances","summary":"Change minimum or maximum replicas without redeploying.","usage":"clockingcloud scale <name> [--min <n>] [--max <n>]","args":[{"name":"name","description":"Instance name (2 to 39 lowercase letters, numbers or dashes).","required":true}],"flags":[{"name":"--min","value":"n","description":"Minimum replicas."},{"name":"--max","value":"n","description":"Maximum replicas."}],"examples":["clockingcloud scale img-prod --max 16","clockingcloud scale img-prod --min 0"]},{"name":"rm","group":"Instances","summary":"Delete an instance definition.","description":"Stops the instance first if it is running. Volumes are not deleted.","usage":"clockingcloud rm <name> [--yes]","args":[{"name":"name","description":"Instance name (2 to 39 lowercase letters, numbers or dashes).","required":true}],"examples":["clockingcloud rm img-prod --yes"]},{"name":"ssh","group":"Instances","summary":"Open a shell on a running instance, or run one command.","description":"Uses the SSH keys you added to your account. Without an argument after -- you get an interactive shell.","usage":"clockingcloud ssh <name> [-i <identity>] [-- <command>]","args":[{"name":"name","description":"Instance name (2 to 39 lowercase letters, numbers or dashes).","required":true}],"flags":[{"name":"--identity","short":"-i","value":"path","description":"Private key to use. Defaults to your SSH agent."},{"name":"--replica","value":"n","default":"0","description":"Replica index when the instance runs more than one."}],"examples":["clockingcloud ssh img-prod","clockingcloud ssh img-prod -- nvidia-smi"]},{"name":"cp","group":"Instances","summary":"Copy files to or from an instance.","description":"Use <instance>:<path> for the remote side. Over SSH; requires a key.","usage":"clockingcloud cp [-r] <source> <destination>","args":[{"name":"source","description":"Local path or <instance>:<path>.","required":true},{"name":"destination","description":"Local path or <instance>:<path>.","required":true}],"flags":[{"name":"--recursive","short":"-r","description":"Copy directories."}],"examples":["clockingcloud cp ./scripts img-prod:/workspace -r","clockingcloud cp img-prod:/out/render.png ."]},{"name":"models ls","group":"Models","summary":"List supported models, default GPUs and per-second prices.","usage":"clockingcloud models ls [--kind image|video] [--prices]","flags":[{"name":"--kind","value":"image|video","description":"Filter by output type."},{"name":"--prices","description":"Include the per-second rate for the default GPU."}],"examples":["clockingcloud models ls","clockingcloud models ls --kind video --prices"]},{"name":"volume create","group":"Storage","summary":"Create a ClockingCloud Global Volume.","usage":"clockingcloud volume create <name> --size <gb>","args":[{"name":"name","description":"2 to 39 lowercase letters, numbers or dashes.","required":true}],"flags":[{"name":"--size","value":"gb","required":true,"description":"Whole number of gigabytes, 10 to 10000. A GB or GiB suffix is accepted."}],"examples":["clockingcloud volume create renders --size 500"]},{"name":"volume connect","group":"Storage","aliases":["drive connect"],"summary":"Connect an existing S3, Azure Blob or Google Cloud Storage bucket.","description":"Registers the bucket as a named volume. Credentials come from account secrets (see the Storage guide). Data stays in your bucket; ClockingCloud caches it next to the GPU.","usage":"clockingcloud volume connect <uri> [--name <name>] [--read-only]","args":[{"name":"uri","description":"s3://bucket[/prefix], azure://container[/prefix] or gs://bucket[/prefix].","required":true}],"flags":[{"name":"--name","value":"name","description":"Volume name. Defaults to the bucket name."},{"name":"--read-only","description":"Mount read-only so jobs cannot write back."},{"name":"--secret","value":"NAME","description":"Use a specific account secret for credentials. Repeatable."}],"examples":["clockingcloud volume connect s3://brand-assets --name assets --read-only","clockingcloud drive connect gs://studio-renders"]},{"name":"volume ls","group":"Storage","summary":"List volumes with provider, size or URI, and attachments.","usage":"clockingcloud volume ls","examples":["clockingcloud volume ls"]},{"name":"volume rm","group":"Storage","summary":"Remove a volume.","description":"Deleting a Global Volume permanently deletes its data. Removing a connected bucket only removes the link; your bucket is untouched.","usage":"clockingcloud volume rm <name> [--yes]","args":[{"name":"name","description":"Volume name.","required":true}],"examples":["clockingcloud volume rm renders --yes"]},{"name":"ssh-key add","group":"Access","summary":"Add a public SSH key to your account.","description":"Accepts ssh-ed25519, ssh-rsa, ecdsa-sha2-nistp256/384/521 and sk-ssh-ed25519@openssh.com keys. Private keys are never uploaded.","usage":"clockingcloud ssh-key add <path> --name <name>","args":[{"name":"path","description":"Path to a public key file, for example ~/.ssh/id_ed25519.pub.","required":true}],"flags":[{"name":"--name","value":"string","required":true,"description":"A label (up to 60 characters)."}],"examples":["clockingcloud ssh-key add ~/.ssh/id_ed25519.pub --name laptop"]},{"name":"ssh-key ls","group":"Access","summary":"List SSH keys and their SHA256 fingerprints.","usage":"clockingcloud ssh-key ls","examples":["clockingcloud ssh-key ls"]},{"name":"ssh-key rm","group":"Access","summary":"Remove an SSH key.","usage":"clockingcloud ssh-key rm <name|fingerprint>","args":[{"name":"key","description":"Key name or SHA256 fingerprint.","required":true}],"examples":["clockingcloud ssh-key rm laptop"]},{"name":"secrets set","group":"Access","summary":"Create or replace an account secret.","description":"Secrets are injected into instances as environment variables and can be referenced in clockingcloud.yaml as ${secrets.NAME}. Values are write-only: they can never be read back.","usage":"clockingcloud secrets set <NAME> [--value <value>]","args":[{"name":"NAME","description":"Uppercase letters, numbers and underscores.","required":true}],"flags":[{"name":"--value","value":"string","description":"The value. If omitted, the CLI reads it from stdin or prompts without echo."}],"examples":["clockingcloud secrets set WEBHOOK_TOKEN","cat key.json | clockingcloud secrets set GOOGLE_APPLICATION_CREDENTIALS_JSON"]},{"name":"secrets ls","group":"Access","summary":"List secret names and when they were last updated.","usage":"clockingcloud secrets ls","examples":["clockingcloud secrets ls"]},{"name":"secrets rm","group":"Access","summary":"Delete a secret.","usage":"clockingcloud secrets rm <NAME>","args":[{"name":"NAME","description":"Secret name.","required":true}],"examples":["clockingcloud secrets rm WEBHOOK_TOKEN"]},{"name":"logs","group":"Observability","summary":"Read instance logs: setup output, stdout, stderr and system events.","usage":"clockingcloud logs <name> [--follow] [--since <duration>] [--replica <n>]","args":[{"name":"name","description":"Instance name (2 to 39 lowercase letters, numbers or dashes).","required":true}],"flags":[{"name":"--follow","short":"-f","description":"Stream new lines until interrupted."},{"name":"--since","value":"duration","default":"1h","description":"Show lines newer than this."},{"name":"--replica","value":"n","description":"Only one replica."},{"name":"--grep","value":"pattern","description":"Only lines matching the pattern."}],"examples":["clockingcloud logs img-prod --follow","clockingcloud logs img-prod --since 15m --grep error"]},{"name":"top","group":"Observability","summary":"Live view of GPU utilization, memory, queue depth and cost per second.","usage":"clockingcloud top [<name>]","args":[{"name":"name","description":"Limit to one instance."}],"examples":["clockingcloud top","clockingcloud top img-prod"]},{"name":"trace","group":"Observability","summary":"Show where the time went for one request.","description":"Breaks a request into queue, cold start, weight load, denoising steps, decode and write-back, with the GPU seconds and cost of each.","usage":"clockingcloud trace <request-id>","args":[{"name":"request-id","description":"Request ID printed by clockingcloud run, or returned by the API.","required":true}],"examples":["clockingcloud trace req_01JA7X9K2M"]},{"name":"metrics","group":"Observability","summary":"Query or export instance metrics.","usage":"clockingcloud metrics <name> [--since <duration>] [--export <format>]","args":[{"name":"name","description":"Instance name (2 to 39 lowercase letters, numbers or dashes).","required":true}],"flags":[{"name":"--since","value":"duration","default":"1h","description":"Time window."},{"name":"--export","value":"prometheus|json|otlp","description":"Print in a machine format for your monitoring stack."}],"examples":["clockingcloud metrics img-prod --since 24h","clockingcloud metrics img-prod --export prometheus"]},{"name":"balance","group":"Billing","summary":"Show your remaining prepaid credit.","usage":"clockingcloud balance","examples":["clockingcloud balance","clockingcloud balance -q"]},{"name":"usage","group":"Billing","summary":"Break down spend by instance, model and GPU type.","usage":"clockingcloud usage [--since <duration>] [--by instance|model|gpu]","flags":[{"name":"--since","value":"duration","default":"30d","description":"Time window."},{"name":"--by","value":"instance|model|gpu","default":"instance","description":"Group results."}],"examples":["clockingcloud usage --since 7d --by model"]},{"name":"doctor","group":"Tools","summary":"Check your installation, credentials and connectivity.","description":"Verifies the CLI version, config directory permissions, authentication, API reachability, and that clockingcloud resolves to ClockingCloud and not to the system C compiler. Exits non-zero if any check fails.","usage":"clockingcloud doctor","examples":["clockingcloud doctor"]},{"name":"version","group":"Tools","summary":"Print CLI version, commit and platform.","usage":"clockingcloud version","examples":["clockingcloud version","clockingcloud version -o json"]},{"name":"update","group":"Tools","summary":"Check for a newer version and print how to upgrade.","description":"The CLI never replaces itself. When installed with Homebrew it prints the brew upgrade command to run.","usage":"clockingcloud update","examples":["clockingcloud update"]},{"name":"completion","group":"Tools","summary":"Print a shell completion script.","usage":"clockingcloud completion <bash|zsh|fish>","args":[{"name":"shell","description":"bash, zsh or fish.","required":true}],"examples":["clockingcloud completion zsh > \"${fpath[1]}/_clockingcloud\""]},{"name":"config","group":"Tools","summary":"Read or change CLI settings.","description":"Keys: output (table, json, yaml), api_url, update_check (true or false).","usage":"clockingcloud config <ls|get|set> [<key>] [<value>]","examples":["clockingcloud config ls","clockingcloud config set output json"]}]}