tripo-cli 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +1 -0
- package/dist/commands/completion.js +1 -1
- package/dist/commands/models.js +47 -0
- package/dist/program.js +3 -1
- package/package.json +1 -1
- package/skill/SKILL.md +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.1
|
|
4
|
+
|
|
5
|
+
- Add `tripo models`: lists the model ids each capability accepts (3D generation, text-to-image, image-to-image, texture, rig, segment, decimate) with defaults and CLI aliases. It reads the local whitelist, makes no API call and is excluded from analytics like `docs`/`config`. `--json` prints one JSON line.
|
|
6
|
+
|
|
3
7
|
## 0.8.0
|
|
4
8
|
|
|
5
9
|
- Preflight every deterministic `make` chain request before uploads or generation. Normal runs and dry runs use the same validation; direct `executeMake` validates before balance/generation calls. Runtime source-dependent checks remain in place.
|
package/README.md
CHANGED
|
@@ -36,6 +36,7 @@ Works with both Tripo regions from the same install — international (`openapi.
|
|
|
36
36
|
| `tripo redo [task]` | re-run with a fresh seed |
|
|
37
37
|
| `tripo login / logout / whoami / use` | device flow: browser approves, key arrives automatically (paste fallback); stored 0600 in `~/.tripo/config.json`; `use` switches accounts |
|
|
38
38
|
| `tripo topup / balance / usage` | open the billing page + detect the credits arriving; check spend |
|
|
39
|
+
| `tripo models` | list the model ids each capability accepts, with defaults and aliases (local whitelist, no API call) |
|
|
39
40
|
| `tripo generate <endpoint>` | deterministic access to all 8 generation endpoints |
|
|
40
41
|
| `tripo model / anim / mesh <step>` | texture, convert, import, rig-check, rig, retarget, segment, complete, decimate, uv, smartsegment |
|
|
41
42
|
| `tripo task get/list/watch` | query tasks and wait for them (progress on stderr) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { UsageError } from '../core/errors.js';
|
|
3
3
|
import { isMeshEditEnabled } from '../knowledge/chains.js';
|
|
4
4
|
const COMMANDS = [
|
|
5
|
-
'login', 'logout', 'whoami', 'use', 'balance', 'usage', 'topup',
|
|
5
|
+
'login', 'logout', 'whoami', 'use', 'balance', 'usage', 'models', 'topup',
|
|
6
6
|
'make', 'view', 'redo', 'ai',
|
|
7
7
|
'generate', 'model', 'anim', 'mesh', 'task', 'files', 'batch', 'history',
|
|
8
8
|
'config', 'doctor', 'update', 'docs', 'completion', 'mcp',
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/** `tripo models` — list the model ids each capability accepts (local whitelist, no API call). */
|
|
2
|
+
import { emitResult } from '../core/output.js';
|
|
3
|
+
import { CAPABILITY_DEFAULTS, DECIMATE_MODELS, IMAGE_TO_IMAGE_MODELS, LEGACY_3D_MODELS, MODEL_ALIASES, MODEL_P1, MODEL_P2, MODEL_V31, RIG_MODEL_ALIASES, RIG_MODEL_V1, RIG_MODEL_V25, RIG_MODEL_V30, SEGMENT_MODELS, TEXTURE_MODELS, TEXT_TO_IMAGE_MODELS, } from '../knowledge/models.js';
|
|
4
|
+
/** Wire ids with the CLI aliases that normalize to each of them. */
|
|
5
|
+
function withAliases(ids, aliases) {
|
|
6
|
+
return ids.map((id) => {
|
|
7
|
+
const names = Object.keys(aliases).filter((alias) => aliases[alias] === id && alias !== id);
|
|
8
|
+
return names.length ? { id, aliases: names } : { id };
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function plain(ids) {
|
|
12
|
+
return ids.map((id) => ({ id }));
|
|
13
|
+
}
|
|
14
|
+
export function listModels() {
|
|
15
|
+
return [
|
|
16
|
+
{
|
|
17
|
+
capability: '3d-generation (text/image/multiview-to-model)',
|
|
18
|
+
default: MODEL_V31,
|
|
19
|
+
models: withAliases([MODEL_V31, MODEL_P2, MODEL_P1, ...LEGACY_3D_MODELS], MODEL_ALIASES),
|
|
20
|
+
},
|
|
21
|
+
{ capability: 'text-to-image', default: CAPABILITY_DEFAULTS.textToImage, models: plain(TEXT_TO_IMAGE_MODELS) },
|
|
22
|
+
{ capability: 'image-to-image', default: CAPABILITY_DEFAULTS.imageToImage, models: plain(IMAGE_TO_IMAGE_MODELS) },
|
|
23
|
+
{ capability: 'texture (model texture)', default: CAPABILITY_DEFAULTS.texture, models: plain(TEXTURE_MODELS) },
|
|
24
|
+
{
|
|
25
|
+
capability: 'rig (anim rig)',
|
|
26
|
+
default: CAPABILITY_DEFAULTS.rig,
|
|
27
|
+
models: withAliases([RIG_MODEL_V1, RIG_MODEL_V25, RIG_MODEL_V30], RIG_MODEL_ALIASES),
|
|
28
|
+
},
|
|
29
|
+
{ capability: 'segment (mesh segment)', default: CAPABILITY_DEFAULTS.segment, models: plain(SEGMENT_MODELS) },
|
|
30
|
+
{ capability: 'decimate (mesh decimate)', default: 'v2.0', models: plain(DECIMATE_MODELS) },
|
|
31
|
+
];
|
|
32
|
+
}
|
|
33
|
+
export function registerModelsCommand(program) {
|
|
34
|
+
program
|
|
35
|
+
.command('models')
|
|
36
|
+
.description('list the model ids each capability accepts (local whitelist, no API call)')
|
|
37
|
+
.action(() => {
|
|
38
|
+
const data = listModels();
|
|
39
|
+
const human = data
|
|
40
|
+
.map((c) => [
|
|
41
|
+
`${c.capability} (default: ${c.default})`,
|
|
42
|
+
...c.models.map((m) => ` ${m.id}${m.aliases ? ` (aliases: ${m.aliases.join(', ')})` : ''}`),
|
|
43
|
+
].join('\n'))
|
|
44
|
+
.join('\n\n');
|
|
45
|
+
emitResult(data, human);
|
|
46
|
+
});
|
|
47
|
+
}
|
package/dist/program.js
CHANGED
|
@@ -13,6 +13,7 @@ import { registerGenerateCommands } from './commands/generate.js';
|
|
|
13
13
|
import { registerHomeAction } from './commands/home.js';
|
|
14
14
|
import { registerMakeCommand } from './commands/make.js';
|
|
15
15
|
import { registerMcpCommand } from './commands/mcp.js';
|
|
16
|
+
import { registerModelsCommand } from './commands/models.js';
|
|
16
17
|
import { registerProcessCommands } from './commands/process-groups.js';
|
|
17
18
|
import { registerTaskCommands } from './commands/task.js';
|
|
18
19
|
import { registerTopupCommand } from './commands/topup.js';
|
|
@@ -52,7 +53,7 @@ export function buildProgram() {
|
|
|
52
53
|
const path = [];
|
|
53
54
|
for (let command = actionCommand; command && command !== program; command = command.parent)
|
|
54
55
|
path.unshift(command.name());
|
|
55
|
-
const excluded = ['mcp', 'docs', 'completion', 'config', 'update', 'use', 'logout', 'home'];
|
|
56
|
+
const excluded = ['mcp', 'docs', 'completion', 'config', 'update', 'use', 'logout', 'home', 'models'];
|
|
56
57
|
if (actionCommand.name() !== 'mcp')
|
|
57
58
|
beginOperation(path.join(':'), path.length === 0 || excluded.includes(path[0]) || actionCommand.opts().dryRun === true, undefined, actionCommand.opts().region === 'cn' || actionCommand.opts().region === 'ov' ? actionCommand.opts().region : undefined);
|
|
58
59
|
// Startup version hint (cached, non-blocking). `update` reports on its
|
|
@@ -67,6 +68,7 @@ export function buildProgram() {
|
|
|
67
68
|
registerAuthCommands(program);
|
|
68
69
|
registerTopupCommand(program);
|
|
69
70
|
registerAccountCommands(program);
|
|
71
|
+
registerModelsCommand(program);
|
|
70
72
|
registerGenerateCommands(program);
|
|
71
73
|
registerProcessCommands(program);
|
|
72
74
|
registerTaskCommands(program);
|
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED
|
@@ -5,7 +5,7 @@ description: Generate and process 3D models with the Tripo API through the tripo
|
|
|
5
5
|
|
|
6
6
|
# Tripo CLI Skill
|
|
7
7
|
|
|
8
|
-
**Bundled with tripo-cli 0.8.
|
|
8
|
+
**Bundled with tripo-cli 0.8.1.**
|
|
9
9
|
|
|
10
10
|
- Display aliases `H3.1`, `H3.0`, `H2.5`, `P1.0`, `P2.0` (case-insensitive) normalize before validation; unknown 3D/image model IDs fail locally.
|
|
11
11
|
- `make` validates deterministic later steps before uploading or generating.
|
|
@@ -113,6 +113,7 @@ If an upstream command fails or prints no task, the downstream submits nothing a
|
|
|
113
113
|
| --- | --- |
|
|
114
114
|
| `tripo task get/watch <id> --download` | inspect / block on / download an existing task |
|
|
115
115
|
| `tripo balance` / `tripo usage` | credits: `{"balance","frozen"}` / recent spend |
|
|
116
|
+
| `tripo models` | accepted model ids per capability, defaults and aliases (local, no API call) |
|
|
116
117
|
| `tripo redo [@last]` | same request, new seed |
|
|
117
118
|
| `tripo view [@last]` | (humans) open a local 3D preview; agents read `preview.png` instead |
|
|
118
119
|
| `tripo files upload <path>` | get a `file_token` |
|