tripo-cli
v0.11.4
Published
Tripo 3D intelligent CLI — turn a prompt or an image into engine-ready 3D assets from your terminal (Tripo V3 API)
Readme
tripo-cli
tripo mcp --toolset full (since 0.9.0) serves the hosted Tripo MCP tools locally with your API key. Image/model inputs also accept local file paths, and tripo_download saves results to disk. Plain tripo mcp keeps its five tools unchanged; both modes answer requests concurrently. The full toolset now exposes 26 tools by default, or 27 with TRIPO_EXPERIMENTAL_MESH_EDIT=1; hosted MCP exposes 27 or 28 with the same switch. See CHANGELOG.
0.8.0 validates all statically known make chain requests before uploads or generation, including normal runs, dry runs and direct executeMake calls. H3.1 / P1.0 / P2.0 (plus legacy H3.0 / H2.5, case-insensitive) normalize to dated wire IDs and share the same limits as tripo-* aliases; unknown 3D/image models are rejected. Image generation validates endpoint-specific models, quality, background, output format and documented size rules before image-edit uploads. chat_image_1 is retired and rejected; chat_image_1.5 remains supported until its announced 2026-12-01 retirement. Plans show scenario notes and the official list-price estimate for the generation step; P1, legacy models and chain steps are marked not estimated, never an invented zero-credit quote. See CHANGELOG. Unknown extra parameter keys remain passthrough, not a guarantee of server validity.
Turn a sentence or an image into an engine-ready 3D asset from your terminal, powered by the Tripo V3 API.
npx tripo-cli make "a cute low poly fox"
# → generates, polls, downloads: ./tripo-out/a-cute-low-poly-fox-xxxxxxxx/{model.glb, preview.png, task.json}The binary is tripo once installed:
npm install -g tripo-cli
tripo login # browser approves, key arrives automatically; or --paste / TRIPO_API_KEY
tripo make knight.png --for game-mobile --then texture,rig:model=rig-v3.0,convert:fbxWorks with both Tripo regions from the same install — international (openapi.tripo3d.ai, console developers.tripo3d.ai, email login + Stripe) and China mainland (openapi.tripo3d.com, console developers.tripo3d.com, SMS login + Alipay). tripo login runs an RFC 8628 device flow: the terminal shows a short code, the browser signs in (each console's own method) and approves, and the key lands in the CLI automatically — with graceful fallback to open-the-keys-page-and-paste when the device-auth backend is unavailable. The same flow works without a TTY: tripo login --region ov|cn from an agent or CI prints the verification URL + code and waits for the browser approval, so an AI agent can start the login and relay the code to its human. Chat agents that cannot keep a command running (e.g. ChatGPT dots) add --no-wait: it exits right after printing, and rerunning the same command once the human has approved finishes the login with that same code. You never pick a region when a key is in hand: the key is probed against both regions and whichever accepts it wins; tripo topup then opens the matching billing page (/billing on ov, /billing/recharge on cn). If a config was moved between machines, tripo doctor detects the mismatch and prints the one-line fix.
Why this CLI
- One magic command.
tripo make <anything>detects what you gave it — prompt text, an image, 2–4 view images, a model file, a URL, a task id, or@last— picks the right endpoint, model, and parameters, then waits and downloads the artifacts. No file_token, no polling loops. - Consistent model selection. 3D generation defaults to
tripo-p2(P2-20260801) in the CLI and both regional MCP servers. Explicit--modelwins over-p model=<string>; prompts, presets, face budgets and geometry options never switch models automatically. Selecttripo-v3.1(H3.1),tripo-p1or a supported legacy model explicitly when needed. P2 costs 100–130 credits per generation by texture tier; the plan card shows the estimate before you run. Aliases are normalized to dated wire values, and every generation request includesmodel. Unsupported P-series parameters are stripped with warnings and out-of-range face budgets fail locally; use an explicit compatible model to preserve those requirements. Seven scenario presets (--for game-mobile|game-pc|film|print|ar-web|anim|toy) supply parameters, processing chains and delivery formats without changing the default model. Seetripo docs --topic commands/generatefor accepted models and their constraints. - You see the plan before you pay.
tripo makeprints a plan card — one numbered line per API call (endpoint, what it does, its arguments) — and asks before submitting; afterwards it reports the total credits and a per-task breakdown.--yes(automatic when headless) skips the question but keeps the card in the log. - Agent-native. Non-TTY runs are automatically headless (
--json --yes --no-open), every result command prints exactly one JSON line on stdout (docs/completionprint text,mcpspeaks JSON-RPC), progress goes to stderr, exit codes are stable, and JSON pipes compose:tripo make cat.png | tripo model texture | tripo anim rig. An LLM-facing skill package ships inside the npm package (tripo docs --llm).
Commands
| command | what it does |
| --- | --- |
| tripo make <input...> | the magic command: generate → chain → download |
| tripo ai [description] | plan with a wizard (no LLM needed) or multi-expert conversation (BYO LLM), confirm a plan card, execute |
| tripo view [task\|file] | interactive 3D preview in your browser (local server, model-viewer) |
| tripo redo [task] | re-run with a fresh seed |
| tripo login / logout / whoami / use | device flow: browser approves, key arrives automatically (paste fallback); stored 0600 in ~/.tripo/config.json; use switches accounts |
| tripo topup / balance / usage | open the billing page + detect the credits arriving; check spend |
| tripo models | list the model ids each capability accepts, with defaults and aliases (local whitelist, no API call) |
| tripo generate <endpoint> | deterministic access to all 8 generation endpoints |
| tripo model / anim / mesh <step> | texture, convert, import, rig-check, rig, retarget, segment, complete, decimate, uv, smartsegment |
| tripo task get/list/watch | query tasks and wait for them (progress on stderr) |
| tripo files upload | upload a file, print the file_token |
| tripo batch run <manifest.yaml> | bulk pipelines with concurrency, retries, and resume |
| tripo config / doctor | settings (global + per-directory .tripo/context.json) and self-diagnosis |
| tripo update [--check] | check the configured npm registry and install the version found there. --check only checks for an update |
| tripo docs [--topic t] | print the bundled agent/skill docs (--topic commands/generate has the model versions / P series table) |
| tripo mcp [--toolset full] | run as an MCP server (Cursor / Claude Desktop); --toolset full serves the hosted Tripo MCP tool set locally |
| tripo completion <shell> | bash/zsh/fish completion |
Every task-producing command supports -o/--out, --no-wait, --no-download, --name, --timeout, --notify, and repeatable --param key=value passthrough. Global flags: --json, --yes, --quiet, --no-open, --profile.
Multiple accounts
Credentials live in named profiles (one per account — e.g. a cn account and an ov account, or personal + work). Logging in never overwrites another profile's key:
tripo login # first account → profile "default"
tripo login --profile work-cn # second account, kept separately, becomes active
tripo use # switch interactively (or: tripo use default)
tripo whoami # shows the active profile and lists the others
tripo make "a fox" --profile work-cn # one-shot override, nothing sticky
tripo logout # removes the *active* profile onlyEach profile carries its own key + region, so switching accounts switches regions automatically. TRIPO_PROFILE=work-cn does the same as --profile work-cn; TRIPO_API_KEY bypasses profiles entirely (CI/agents) and is not probed for its region — pair a China-region key with TRIPO_REGION=cn. Configs written by older versions are read as the default profile — no migration step, nothing breaks.
Scenario presets
tripo make "sci-fi crate" --for game-mobile # P2 editable topology → texture → FBX
tripo make hero.png --for film --model H3.1 -p geometry_quality=detailed # explicit H3.1, quad topology, detailed geometry/textures
tripo make "chess knight" --for print # P2, no textures → STL, flat bottom
tripo make sofa.jpg --for ar-web # P2 capped at 20k faces → GLB + USDZ
tripo make "orc warrior" --for anim # rig-check gate → rig → FBXAll presets use P2 unless a model is explicitly supplied. P2 has no geometry_quality, so the film example selects H3.1 and passes geometry_quality=detailed (+20 credits) for detailed geometry. tripo ai accepts an explicit generation model through -p model=H3.1 or another supported ID.
Pipelines
# human shorthand
tripo make humanoid.png --then texture,rig:model=rig-v3.0,convert:fbx
# shell pipes (each stage reads the upstream task from stdin)
tripo make humanoid.png --json | tripo model texture --json | tripo anim rig --model rig-v3.0 --json
# batch with resume
tripo batch run assets.yaml --concurrency 2@last, @2, and @name reference your task history everywhere a task id is accepted (history lives in ~/.tripo/history.jsonl; every artifact directory gets a reproducible task.json).
For AI coding agents
make/watchare blocking: run them, wait for exit, read the single JSON line on stdout. Do not poll yourself.- Validate
makeandmodel texturerequests with--dry-run --json. For an existing generated task that needs PBR without guidance, plantripo make <task_id> --then texture:pbr=true --dry-run --json. Imported meshes or an original reference need atexture_promptobject via standalonetripo model texture ... --dry-run --json. Fix any preflight errors, review adjustments, disclose offline limitations and get confirmation before execution. A dry run is offline and free, but texture execution cost is not estimated and local validity does not guarantee server acceptance. Other processing commands do not accept--dry-run. - The plan card on stderr lists every call before it runs; the final JSON carries
credits_consumed(total for the run) pluscredits_breakdown(per task) when a chain ran. - Exit codes:
0ok ·2usage ·3auth ·4insufficient credits ·5content policy ·6task failed (failed/cancelled tasks are auto-refunded; atimeoutmeans it is still running) ·7network (a failed submit is never resent — checktripo balancebefore re-running; a task that succeeded but failed to download carriestask_idin the error JSON — runtripo task get <task_id> --download, never re-make) ·8not found ·9rate limit. preview.pngin every output directory is your eyes: look at it, then continue the chain or ask the human beforetripo redo(a new paid task with no plan card or confirmation).- Full behavior rules:
tripo docs --llm, per-command docs viatripo docs --topic commands/make.
Environment variables
| var | meaning |
| --- | --- |
| TRIPO_API_KEY | API key (tsk_...), highest precedence (bypasses profiles); its region is not probed — set TRIPO_REGION=cn for a China-region key |
| TRIPO_PROFILE | account profile to use, same as the global --profile flag |
| TRIPO_REGION | ov or cn — unnecessary after tripo login (it probes both regions with your key and stores the right one); required with a China-region TRIPO_API_KEY |
| TRIPO_API_BASE_URL / TRIPO_PLATFORM_BASE_URL | endpoint overrides |
| TRIPO_HOME | config/history directory (default ~/.tripo) |
| TRIPO_NO_UPDATE_CHECK | disable the startup "new version available" hint (also off when CI is set, headless, --json, or --dry-run) |
| TRIPO_ANALYTICS_ENABLED | set to 0 to turn off usage analytics and the account lookup (see Telemetry) |
| TRIPO_ANALYTICS_OPT_IN | set to 1 to turn usage analytics on even where TRIPO_ANALYTICS_ENABLED=0 is set, for hosts that keep analytics off until the user opts in (see Telemetry) |
| TRIPO_NPM_REGISTRY | override the registry for update checks and installs. Without it, tripo update uses the global npm configuration and the startup hint uses https://registry.npmjs.org |
| HTTPS_PROXY / HTTP_PROXY / NO_PROXY | standard proxy variables, honored for all CLI traffic (plain Node fetch ignores them) |
| TRIPO_LLM_BASE_URL / TRIPO_LLM_API_KEY / TRIPO_LLM_MODEL | optional OpenAI-compatible LLM for tripo ai conversation mode |
Setting TRIPO_API_KEY per shell — bash/zsh: export TRIPO_API_KEY=tsk_... · PowerShell: $env:TRIPO_API_KEY = "tsk_..." (persist for future sessions with setx TRIPO_API_KEY "tsk_...") · CMD: set TRIPO_API_KEY=tsk_...
Telemetry
The CLI sends usage events for official API calls to the matching Tripo analytics project: international calls (openapi.tripo3d.ai, since 0.7.0) to https://sshu-api.tripo3d.ai, China calls (openapi.tripo3d.com, since 0.11.0) to https://ae-receiver.tripolabs.com. Collection is on by default, needs no setup, prints nothing, and never changes stdout, exit codes, or credit behavior.
- Sent: command or MCP tool name and its result, sign-in method and result, error category with HTTP status / API code, task id (and parent task id for chains), task type, model, status, credits consumed, durations, downloaded format and file count, CLI version, and the calling agent. When MCP client info identifies the same agent, its version is also sent. Recognized agent names are
codex/workbuddy/zcode/kimi/deepseek/claude/cursor/chatgpt/hermes/minimax/antigravity/gemini/opencode/copilot/cline/roo/kiro(otherwiseunknown). Inside a ZCode or WorkBuddy session the caller is that app, whatever model or agent runs in it: its session marker outranks everything else. Otherwise explicitTRIPO_CLIENT_APPtakes priority over the MCP host's client info. When neither identifies the caller, the CLI reads the markers hosts set on their agent's commands, first match wins: ZCode (ZCODE_SESSION_ID), WorkBuddy (CODEBUDDY_HOST=workbuddy-desktop), Hermes (HERMES_AGENT=true), DeepSeek Harness (DSH_SHELL=1), OpenCode (OPENCODE=1), Gemini CLI (GEMINI_CLI=1), Kiro CLI (AGENT_DISPLAY_OUTwithAGENT_CONTEXT_OUT), Codex (CODEX_THREAD_IDorCODEX_CI=1), Claude Code (AI_AGENT=claude-code_<version>_agent, orCLAUDE_CODE_CHILD_SESSION=1on older releases), Copilot (COPILOT_AGENT=1), Cursor (CURSOR_AGENT=1), Cline (CLINE_ACTIVE=true), Roo Code (ROO_ACTIVE=true), then any otherAI_AGENTnaming a listed agent. Command-line agents come before IDE agents because an agent started by another inherits its variables. Only the app name is sent, never these marker values.TRIPO_DISTRIBUTION_CHANNELnames the plugin separately and is never used to guess the host; attribution is resolved per invocation and is not cached against an account or installation. - Identity: a random installation id (
analytics_distinct_idin~/.tripo/config.json) and, when available, the Tripo account id (platform_user_id). The API key actually in use is looked up against the selected site'sPOST /verifyonapiplatform.tripo3d.aiorapiplatform.tripo3d.com. Region probes do not perform identity lookups; login resolves an identity only after confirming the key's region. Each command ortripo mcpsession looks it up at most once per key, alongside business requests rather than before them. Events wait at most 1 second for it, and the id is kept only in memory — never written to disk or printed — so on failure events simply go without it. No email or billing details are sent. - User-Agent: API requests carry
tripo-cli/<version> (<platform> <arch>); where analytics is on for that endpoint, the calling agent is added as; agent <app>inside the parentheses. Opted out or custom endpoints get no agent. - Never sent: prompts, file paths, input images or models, API keys, download URLs (the key itself only goes to
/verifyfor the account lookup). - Nothing is sent, and no account lookup is made, for: custom API endpoints, device authorization against a custom console endpoint,
--dry-runand MCPdry_run: truecalls, help/version,docs,completion,config,update,use,logout, and the baretripohome screen. - Opt out:
TRIPO_ANALYTICS_ENABLED=0(also skips the account lookup). - Opt in: hosts whose plugins keep analytics off by default can forward
TRIPO_ANALYTICS_OPT_IN(with Hermes, the plugin must launch[email protected]or later);TRIPO_ANALYTICS_OPT_IN=1turns analytics and the account lookup back on. Any other value leavesTRIPO_ANALYTICS_ENABLEDin charge.
Delivery is best-effort: each send (including the flush on exit) is capped at 2 seconds, the in-memory queue holds at most 100 events, and nothing is retried or written to disk. TRIPO_ANALYTICS_ENVIRONMENT=production|pre|development tags events. Existing international TRIPO_ANALYTICS_SERVER_URL and TRIPO_ANALYTICS_APP_ID overrides remain supported except for known China-project mismatches. China collection accepts only the matching China receiver and App ID; an overseas or unknown override disables China collection rather than sending across regions. Automated tests send events only when collection is explicitly enabled and a local receiver is configured.
Development
npm install
npm run dev -- make "a cat" --no-wait # run from source (tsx)
npm test # vitest (mock API, no credits spent)
npm run typecheck && npm run lint
npm run build && npm run pack:check # dist + tarball self-check
TRIPO_API_KEY=tsk_... npm run e2e # real-API H3.1 smoke without textures (about 10 credits)Node.js ≥ 22.12.0. Issues & source: vast-enterprise/Tripo-API-CLI.
License
MIT
