@tuned-tensor/cli 0.12.0-beta.0 → 0.13.0-beta.0
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/README.md +75 -186
- package/dist/index.js +567 -4409
- package/dist/index.js.map +1 -1
- package/dist/local-runtime.js +25 -25
- package/dist/local-runtime.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
# tt - Tuned Tensor CLI
|
|
2
2
|
|
|
3
|
-
`tt` is one terminal for
|
|
3
|
+
`tt` is one terminal for local Tuned Tensor workflows:
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
activation, and OpenAI-compatible serving.
|
|
5
|
+
- a laptop-local conversational agent;
|
|
6
|
+
- CUDA fine-tuning, held-out evaluation, artifact verification, model
|
|
7
|
+
activation, and OpenAI-compatible serving on hardware you control.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
## Cloud sunset
|
|
10
|
+
|
|
11
|
+
This release unregisters the hosted API commands (`tt auth`, `tt push`,
|
|
12
|
+
`tt balance`, `tt topup`, `tt cloud`, and the rest of the managed tree). The
|
|
13
|
+
modules remain in the repository so they can be restored later. `tt local …`
|
|
14
|
+
is kept as a hidden alias; new scripts should call `tt run`, `tt doctor`,
|
|
15
|
+
`tt runs list`, and so on directly.
|
|
13
16
|
|
|
14
17
|
## Install
|
|
15
18
|
|
|
@@ -18,10 +21,9 @@ npm install -g @tuned-tensor/cli
|
|
|
18
21
|
tt --version
|
|
19
22
|
```
|
|
20
23
|
|
|
21
|
-
Node.js 22.19.0 or newer is required.
|
|
22
|
-
Local training additionally needs
|
|
24
|
+
Node.js 22.19.0 or newer is required. Local training additionally needs
|
|
23
25
|
[`uv`](https://docs.astral.sh/uv/) and a supported NVIDIA CUDA host; the locked
|
|
24
|
-
Python runner ships with the npm
|
|
26
|
+
Python runner ships with the npm package and is prepared on first use.
|
|
25
27
|
|
|
26
28
|
Run from source:
|
|
27
29
|
|
|
@@ -35,17 +37,13 @@ npm link
|
|
|
35
37
|
|
|
36
38
|
## Conversational terminal
|
|
37
39
|
|
|
38
|
-
The interactive agent harness and conversation state
|
|
39
|
-
|
|
40
|
-
local endpoint or a remote provider.
|
|
41
|
-
typed tool provider: `tt auth login` is used only for Tuned Tensor REST calls
|
|
42
|
-
and is never sent to the selected model.
|
|
43
|
-
Tool results needed to answer a request are sent to the model you selected, so
|
|
44
|
-
choose a local or remote provider whose data policy fits your workload.
|
|
40
|
+
The interactive agent harness and conversation state run on your laptop.
|
|
41
|
+
Inference runs through the provider/model you select, which may be a
|
|
42
|
+
local endpoint or a remote provider.
|
|
45
43
|
|
|
46
|
-
|
|
44
|
+
`tt` reuses provider authentication and custom model definitions from
|
|
47
45
|
`~/.pi/agent/auth.json` and `~/.pi/agent/models.json`. Authenticate a provider
|
|
48
|
-
|
|
46
|
+
through its normal login flow; `tt` deliberately has no provider-secret flags.
|
|
49
47
|
Then inspect and select a provider/model:
|
|
50
48
|
|
|
51
49
|
```bash
|
|
@@ -69,24 +67,22 @@ If a newer stable release is available it recommends
|
|
|
69
67
|
checks are ignored.
|
|
70
68
|
|
|
71
69
|
```text
|
|
72
|
-
tt
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
tt v0.13.0-beta.0
|
|
71
|
+
agent anthropic/claude-sonnet-4-5 · workflow model base
|
|
72
|
+
ctrl+c stop/clear · ctrl+d exit · /help commands · tab complete
|
|
73
|
+
|
|
74
|
+
Ask TT anything. Known commands run directly.
|
|
75
|
+
› What happened in my latest training run?
|
|
76
|
+
› runs list
|
|
76
77
|
```
|
|
77
78
|
|
|
78
|
-
Ordinary sentences go through the locally orchestrated
|
|
79
|
-
model can
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
not available to cloud-mode turns. Known CLI commands such as
|
|
86
|
-
`runs list`, `doctor`, and `models list` still execute directly. Prefix a
|
|
87
|
-
command with `:` when you want to make that intent explicit. Commands are
|
|
88
|
-
routed to the mode shown in the prompt; prefix one with `cloud` or `local` to
|
|
89
|
-
override the mode without switching it.
|
|
79
|
+
Ordinary sentences go through the locally orchestrated model session. The
|
|
80
|
+
model has no shell or general filesystem tool. It can prepare one new folder
|
|
81
|
+
directly beneath the shell's current working directory with a validated
|
|
82
|
+
`tunedtensor.json`. The tool refuses path traversal, symlinked workspace
|
|
83
|
+
roots, existing targets, and unsupported spec fields. Known CLI commands such
|
|
84
|
+
as `runs list`, `doctor`, and `models list` still execute directly. Prefix a
|
|
85
|
+
command with `:` when you want to make that intent explicit.
|
|
90
86
|
|
|
91
87
|
Agent conversations are durable and local under
|
|
92
88
|
`~/.config/tuned-tensor/agent/threads` (or the XDG config equivalent), with
|
|
@@ -94,114 +90,66 @@ user-only directory/file permissions. Persistence normally retains up to 100
|
|
|
94
90
|
recent threads; unsettled safety records are never pruned even when that exceeds
|
|
95
91
|
the cap. Each thread is limited to 1 MB, 200 messages, and 200 actions; one-way
|
|
96
92
|
action claims are capped at 1,000. Use `/new` to start one, `/threads` to
|
|
97
|
-
list recent conversations, and `/resume <id>` to continue one.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
so changing directories before approval fails safely instead of writing
|
|
110
|
-
somewhere else. Ambiguous write failures remain sealed as `outcome_unknown` for
|
|
111
|
-
manual inspection rather than deleting a path that could belong to a racing
|
|
112
|
-
writer.
|
|
113
|
-
`/approve` executes deterministic local code with an at-most-once mutation
|
|
114
|
-
attempt. For hosted mutations, before dispatch the CLI requires the API to
|
|
115
|
-
advertise mutation-guard support; older or incompatible servers are refused.
|
|
116
|
-
The server conditionally
|
|
117
|
-
checks approved spec versions and assigns the action ID as an idempotent create
|
|
118
|
-
ID. If a response or final state write is lost after dispatch, the action is
|
|
119
|
-
retained as `outcome_unknown`, cannot be retried automatically, and directs the
|
|
120
|
-
user to inspect the remote resource. `/reject` never calls a mutation endpoint.
|
|
121
|
-
|
|
122
|
-
Useful shell controls include `/help`, `/status`, `/context`, `/cloud`,
|
|
123
|
-
`/local`, `/mode`, `/model`, `/cd`, `/clear`, and `/exit`. `/cloud` and
|
|
124
|
-
`/local` switch the workflow in one word (aliases for `/mode cloud|local`).
|
|
93
|
+
list recent conversations, and `/resume <id>` to continue one.
|
|
94
|
+
|
|
95
|
+
Local spec creation waits for `/approve`, requires at least two examples,
|
|
96
|
+
uses exclusive private folder/file creation, and never overwrites an existing
|
|
97
|
+
path. Secure filesystem mutation is currently supported on Linux, where writes
|
|
98
|
+
are anchored to open workspace and destination-directory handles. The proposal
|
|
99
|
+
is bound to the current workspace so changing directories before approval fails
|
|
100
|
+
safely instead of writing somewhere else. Ambiguous write failures remain
|
|
101
|
+
sealed as `outcome_unknown` for manual inspection. `/reject` never mutates.
|
|
102
|
+
|
|
103
|
+
Useful shell controls include `/help`, `/status`, `/context`, `/model`, `/cd`,
|
|
104
|
+
`/clear`, and `/exit`.
|
|
125
105
|
The shell banner and `/context` surface the assistant's configured provider and
|
|
126
106
|
model (`agent provider/model`) separately from the workflow model, so the
|
|
127
|
-
model answering your prompts is always visible. `/model`
|
|
128
|
-
|
|
129
|
-
`/model <
|
|
130
|
-
|
|
131
|
-
|
|
107
|
+
model answering your prompts is always visible. `/model` shows and changes the
|
|
108
|
+
laptop-local TT agent model: run it with no arguments for a short list of
|
|
109
|
+
suggestions, search with `/model <query>` (only the closest matches are
|
|
110
|
+
shown), or switch with `/model <provider>/<model>` (for example
|
|
111
|
+
`/model anthropic/claude-sonnet-4-5`). The equivalent non-interactive commands
|
|
112
|
+
are `tt agent models`, `tt agent configure`, and `tt agent status`.
|
|
113
|
+
The shell keeps normal terminal scrollback and command history only for the
|
|
114
|
+
current process.
|
|
132
115
|
|
|
133
116
|
Explicit commands remain non-interactive, including in CI. `tt --help` shows
|
|
134
|
-
the
|
|
117
|
+
the command surface, `tt status` inspects local project context without a
|
|
135
118
|
network or GPU probe, and `tt shell` opens the conversational terminal
|
|
136
119
|
explicitly.
|
|
137
120
|
|
|
138
121
|
## Composable pipelines (v1)
|
|
139
122
|
|
|
140
123
|
A pipeline is an ordered JSON recipe. Version 1 supports `train`, `evaluate`,
|
|
141
|
-
and `compare` steps
|
|
124
|
+
and `compare` steps. This CLI executes local plans only. The v1 evaluator is
|
|
142
125
|
`evaluate.with.evaluator: "behavior"`. `evaluate.with.model` is `"base"` or
|
|
143
126
|
`{ "from": "step.model" }`; `compare.with.before` and
|
|
144
127
|
`after` are `{ "from": "step.report" }`. References must point to an earlier
|
|
145
128
|
step and to an output the producer actually exposes. The document contract
|
|
146
129
|
itself is defined by the published `@tuned-tensor/pipeline-contract` package;
|
|
147
|
-
the CLI adds only execution planning (step selection
|
|
148
|
-
transfers) on top of it.
|
|
130
|
+
the CLI adds only execution planning (step selection) on top of it.
|
|
149
131
|
|
|
150
132
|
```bash
|
|
151
|
-
|
|
152
|
-
tt pipeline init --target local --file pipeline.json
|
|
153
|
-
tt pipeline init --target cloud --file cloud-pipeline.json
|
|
154
|
-
|
|
155
|
-
# Validate and show resolved targets plus explicit cross-target transfers.
|
|
133
|
+
tt pipeline init --file pipeline.json
|
|
156
134
|
tt pipeline validate --file pipeline.json
|
|
157
135
|
tt --json pipeline plan --file pipeline.json
|
|
158
|
-
|
|
159
|
-
# Preview any plan without execution, transfer, network calls, or billing.
|
|
160
136
|
tt --json pipeline run --dry-run --file pipeline.json --only baseline
|
|
161
|
-
|
|
162
|
-
# Execute an ordered local plan using the unified CLI's bundled runtime.
|
|
163
137
|
tt --json pipeline run --file pipeline.json \
|
|
164
138
|
--spec tunedtensor.json --config local-runner.json
|
|
165
139
|
```
|
|
166
140
|
|
|
167
141
|
`--only` and `--skip` preserve dependency safety: a selected step cannot refer
|
|
168
|
-
to an omitted predecessor.
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
fails closed rather than silently running the fixed cloud workflow. The Pi agent
|
|
172
|
-
may describe, validate, and prepare a plan, but has no direct pipeline-execute
|
|
173
|
-
tool.
|
|
142
|
+
to an omitted predecessor. Cloud-targeted steps fail closed unless you pass
|
|
143
|
+
`--dry-run`. The TT agent may describe, validate, and prepare a plan, but has
|
|
144
|
+
no direct pipeline-execute tool.
|
|
174
145
|
|
|
175
|
-
##
|
|
176
|
-
|
|
177
|
-
```bash
|
|
178
|
-
tt auth login
|
|
179
|
-
tt init --name "Customer Support Bot" --model Qwen/Qwen3.5-2B
|
|
180
|
-
|
|
181
|
-
# Edit tunedtensor.json, then:
|
|
182
|
-
tt eval
|
|
183
|
-
tt push
|
|
184
|
-
tt runs estimate <spec-id>
|
|
185
|
-
tt runs start <spec-id>
|
|
186
|
-
tt runs watch <run-id>
|
|
187
|
-
tt runs report <run-id>
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
The hosted service remains optional. Before a paid run, inspect the estimate:
|
|
191
|
-
|
|
192
|
-
```bash
|
|
193
|
-
tt balance
|
|
194
|
-
tt runs estimate <spec-id>
|
|
195
|
-
tt runs start <spec-id>
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
## Local quick start
|
|
146
|
+
## Quick start
|
|
199
147
|
|
|
200
148
|
Create a local project on an NVIDIA host:
|
|
201
149
|
|
|
202
150
|
```bash
|
|
203
151
|
mkdir support-adapter && cd support-adapter
|
|
204
|
-
tt
|
|
152
|
+
tt init \
|
|
205
153
|
--name "Support Adapter" \
|
|
206
154
|
--model Qwen/Qwen3.5-2B \
|
|
207
155
|
--profile spark
|
|
@@ -211,18 +159,18 @@ Edit the generated `tunedtensor.json`, replacing both placeholder examples,
|
|
|
211
159
|
then preflight and run:
|
|
212
160
|
|
|
213
161
|
```bash
|
|
214
|
-
tt
|
|
215
|
-
tt
|
|
216
|
-
tt
|
|
217
|
-
tt
|
|
162
|
+
tt doctor tunedtensor.json
|
|
163
|
+
tt validate tunedtensor.json
|
|
164
|
+
tt models prefetch tunedtensor.json
|
|
165
|
+
tt run tunedtensor.json
|
|
218
166
|
```
|
|
219
167
|
|
|
220
168
|
Inspect, verify, and serve a completed adapter:
|
|
221
169
|
|
|
222
170
|
```bash
|
|
223
|
-
tt
|
|
224
|
-
tt
|
|
225
|
-
tt
|
|
171
|
+
tt runs report <run-id>
|
|
172
|
+
tt models verify local-<run-id>
|
|
173
|
+
tt models serve local-<run-id> --config local-runner.json
|
|
226
174
|
```
|
|
227
175
|
|
|
228
176
|
Local currently certifies text SFT with `Qwen/Qwen3.5-2B`,
|
|
@@ -237,81 +185,22 @@ artifacts, datasets, and model weights remain on the execution host.
|
|
|
237
185
|
|
|
238
186
|
Activation is optional and requires the run to pass a configured
|
|
239
187
|
`generalRegression` gate. Once activated, use
|
|
240
|
-
`tt
|
|
241
|
-
|
|
242
|
-
### One project file, target-specific payloads
|
|
243
|
-
|
|
244
|
-
Both workflows use `tunedtensor.json`, but their supported fields are not
|
|
245
|
-
identical. `tt` keeps the source file intact and projects only fields accepted
|
|
246
|
-
by the selected target:
|
|
188
|
+
`tt serve active --config local-runner.json`.
|
|
247
189
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
cloud-only executable `eval_cases`;
|
|
251
|
-
- the default hosted scaffold contains two distinct examples and is valid as
|
|
252
|
-
a starting point for local held-out evaluation.
|
|
253
|
-
|
|
254
|
-
Target validation is still authoritative. In particular, choosing a hosted
|
|
255
|
-
base model does not make that model supported by the local CUDA runner.
|
|
256
|
-
`tt local serve base` does not automatically inject the adjacent project spec.
|
|
257
|
-
Pass `--spec tunedtensor.json` when the server should enforce its instructions;
|
|
258
|
-
that explicit spec is projected for the local runtime.
|
|
259
|
-
|
|
260
|
-
To continue training from a completed fine-tuned model artifact:
|
|
261
|
-
|
|
262
|
-
```bash
|
|
263
|
-
tt runs start <spec-id> --parent-model <model-id>
|
|
264
|
-
```
|
|
190
|
+
`tt serve base` does not automatically inject the adjacent project spec.
|
|
191
|
+
Pass `--spec tunedtensor.json` when the server should enforce its instructions.
|
|
265
192
|
|
|
266
193
|
Useful discovery commands:
|
|
267
194
|
|
|
268
195
|
```bash
|
|
269
|
-
tt specs list
|
|
270
|
-
tt datasets list
|
|
271
196
|
tt runs list
|
|
272
|
-
tt runs list --summary --json
|
|
273
197
|
tt models list
|
|
274
|
-
tt models
|
|
275
|
-
tt
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
Use `tt runs list --summary` for agents and scripts that only need run status,
|
|
279
|
-
scores, and pagination. It asks the API to omit detailed evaluation and event
|
|
280
|
-
payloads; combine it with `--json` for compact structured output.
|
|
281
|
-
|
|
282
|
-
Label real, unlabeled data with a teacher model (JSONL with `{"input": ...}`
|
|
283
|
-
rows, or CSV with `--input-column`; up to 50,000 rows / 50 MB). Labeling runs
|
|
284
|
-
as a managed cloud workflow — upload and disconnect; the teacher drafts
|
|
285
|
-
outputs under your spec's system prompt and you review before anything trains:
|
|
286
|
-
|
|
287
|
-
```bash
|
|
288
|
-
tt label upload tickets.csv --spec <spec-id> --input-column body --watch
|
|
289
|
-
tt label watch <job-id> # re-attach to progress any time
|
|
290
|
-
tt label rows <job-id> --status labeled # review the teacher's drafts
|
|
291
|
-
tt label accept <job-id> --all # or accept/reject/edit by row
|
|
292
|
-
tt label promote <job-id> --name tickets-v1 # becomes a validated dataset
|
|
293
|
-
tt runs start <spec-id> --dataset <dataset-id>
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
Export a model to GGUF and package it for Ollama (so it's pluggable like any
|
|
297
|
-
other local model, e.g. in OpenClaw via Ollama's native `/api/chat`):
|
|
298
|
-
|
|
299
|
-
```bash
|
|
300
|
-
# Convert + quantize to GGUF, write a Modelfile, and run `ollama create`
|
|
301
|
-
tt models export <model-id> --format gguf --quant q4_k_m --ollama
|
|
302
|
-
|
|
303
|
-
# Inspect the planned llama.cpp / ollama commands without running them
|
|
304
|
-
tt models export <model-id> --quant q8_0 --ollama --print-command
|
|
198
|
+
tt models active
|
|
199
|
+
tt status
|
|
305
200
|
```
|
|
306
201
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
(or `--convert-script` / `--quantize-bin`); with `--ollama` the behaviour spec's
|
|
310
|
-
system prompt is embedded as the Modelfile `SYSTEM` block.
|
|
311
|
-
|
|
312
|
-
For the full command reference, including dataset-backed runs, long-example
|
|
313
|
-
policies, eval token budgets, preflight run estimates, continued fine-tuning,
|
|
314
|
-
evaluation caps, local model serving, configuration, and billing, see the
|
|
202
|
+
For the full command reference, including long-example policies, eval token
|
|
203
|
+
budgets, evaluation caps, and local model serving, see the
|
|
315
204
|
[CLI docs](https://tunedtensor.com/docs/cli).
|
|
316
205
|
|
|
317
206
|
## Development
|