tufty.aitufty.ai CLI
CLI

CLI Overview

Every tufty command and the conventions they share.

Commands

CommandWhat it does
tufty <tool>Run a studio tool, e.g. tufty pet-dressup. See Tools
tufty tools listList every tool
tufty tools describe <id>Print everything about one tool: inputs, options, prices and limits
tufty status <runId>Look up a run; add --wait to wait until it finishes
tufty upload <file>Upload a file to tufty storage and print its public URL
tufty loginSign in with a browser device code
tufty auth set <apiKey>Save an API key
tufty auth getShow the key in use (masked by default)
tufty logoutRemove the key from the config file

Where tool commands come from

Tool commands and their flags aren't hard-coded into the CLI. At run time the CLI reads the server's tool manifest (cached locally for 10 minutes), registers a command per tool, and builds and validates the options from it. When the site adds a tool or changes a price or option, the CLI keeps up without an upgrade — which is why tufty <tool> -h is always the source of truth.

auth, login, logout, upload and status don't depend on the manifest and never fetch it.

Shared conventions

  • Stdout carries exactly one JSON envelope; progress goes to stderr. See Output modes.
  • Exit codes: 0 success, 1 runtime or API error, 2 usage error. See Exit codes.
  • Input counts, file existence and option values are checked before anything is uploaded, so a typo never costs credits.
  • A misspelled command returns unknown_command, with the closest matches in details.suggestions.

Common combinations

# What tools are there
tufty tools list

# A tool's current flags and prices
tufty pet-dressup -h
tufty tools describe pet-dressup

# Estimate first, then run
tufty pet-dressup --product ./sweater.jpg --model ./corgi.jpg --quality medium --dry-run
tufty pet-dressup --product ./sweater.jpg --model ./corgi.jpg --quality medium --save ./out

In this section

On this page