Skip to content

Commit 7404e49

Browse files
authored
Merge pull request TangleML#15 from TangleML/piforge/tangle-cli-fix/prefer-published-tangent-skills-7f6d2c1
docs: prefer published tangle-cli in tangent skills
2 parents a0180cb + 69bbad9 commit 7404e49

24 files changed

Lines changed: 292 additions & 294 deletions

skills/tangent/OSS-CONVENTIONS.md

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -19,34 +19,32 @@ and `api`) and **never** any internal wrapper/hook layer.
1919

2020
## 1. Invocation rule
2121

22-
**Keep checkout/dev invocation separate from installed-tool invocation.**
23-
24-
From a checkout of the `tangle-cli` repo, run commands through the workspace:
25-
26-
```bash
27-
uv run tangle quickstart
28-
uv run tangle --help
29-
uv run tangle sdk --help
30-
uv run tangle api --help
31-
```
22+
**Published-package usage is the default; checkout usage is for local `tangle-cli` development/validation.**
3223

3324
For a persistent user-level CLI install, prefer uv tools:
3425

3526
```bash
3627
uv tool install tangle-cli
3728
tangle quickstart
38-
tangle-cli --help
29+
tangle --help
30+
tangle sdk --help
31+
tangle api --help
3932
```
4033

4134
For one-off execution without a persistent install, use `uvx`:
4235

4336
```bash
4437
uvx --from tangle-cli tangle --help
38+
uvx --from tangle-cli tangle quickstart
4539
```
4640

4741
Generic Python environments may also use `pip install tangle-cli`; use
4842
`uv pip install tangle-cli` only inside an explicitly managed virtualenv.
4943

44+
When intentionally validating a local checkout of the `tangle-cli` repo, prefix
45+
examples with `uv run` (for example, `uv run tangle quickstart`). Skill examples
46+
otherwise use the installed-tool form (`tangle …` / `tangle-cli …`).
47+
5048
- **Never** prefix a command with an internal env-shim exec wrapper. That internal
5149
dev-env tooling must not appear in any ported file.
5250
- `tangle-cli` is a public PyPI package. The default install includes the
@@ -74,7 +72,7 @@ OSS replacement. **Verbs/flags below were verified against the `tangle-cli` sour
7472

7573
| Internal | OSS |
7674
|---|---|
77-
| `<env-shim> -- <deploy-cli> …` | `uv run tangle …` from a checkout, or installed `tangle …` / `tangle-cli` |
75+
| `<env-shim> -- <deploy-cli> …` | `tangle …` / `tangle-cli` (or `uv run tangle …` only when validating a local checkout) |
7876
| `<deploy-cli> quickstart` | `tangle quickstart` (real; static onboarding text) |
7977
| `--help-extended` / `--help-full` | `--help` |
8078
| `from <deploy_pkg> import TangleApiClient` | `from tangle_cli.client import TangleApiClient` (see §3) |
@@ -142,9 +140,9 @@ OSS replacement. **Verbs/flags below were verified against the `tangle-cli` sour
142140
| `--run-as IDENTITY` | `--run-as` exists on `submit` but the **OSS default hooks do not support it** (downstream extension seam only). Drop run-as examples (§10, D9). |
143141

144142
**Invocation rule for the whole table:** every left-column command, however it was
145-
written internally, becomes the right-column form prefixed with `uv run` (e.g.
146-
`uv run tangle sdk pipeline-runs submit …`). Auth flags from §4 attach to any
147-
API-backed command.
143+
written internally, becomes the bare right-column form (for example,
144+
`tangle sdk pipeline-runs submit …`). Only prefix with `uv run` when intentionally
145+
validating a local checkout. Auth flags from §4 attach to any API-backed command.
148146

149147
---
150148

@@ -214,13 +212,14 @@ internal backend's auth verification, and the internal package index **entirely*
214212
- **Run links:** replace internal run-URL links (`https://<internal-backend-host>/runs/<id>`) with
215213
`<base-url>/runs/<id>` **or** "inspect via `tangle sdk pipeline-runs details RUN_ID`".
216214
- **No internal package index.** Resolve dependencies against public PyPI
217-
(`uv sync` from a checkout, `uv tool install tangle-cli` for a persistent CLI,
218-
or `uvx --from tangle-cli tangle …` for one-off execution). Generic Python
219-
environments may also use `pip install tangle-cli`.
215+
(`uv tool install tangle-cli` for a persistent CLI, or
216+
`uvx --from tangle-cli tangle …` for one-off execution). Generic Python
217+
environments may also use `pip install tangle-cli`; local checkout validation
218+
uses `uv sync` / `uv run` inside the repo.
220219
- Example for a protected backend:
221220

222221
```bash
223-
uv run tangle sdk pipeline-runs submit pipeline.yaml \
222+
tangle sdk pipeline-runs submit pipeline.yaml \
224223
--base-url https://api.example \
225224
--auth-header 'Bearer …' \
226225
-H 'X-Gateway-Auth: …' \
@@ -257,11 +256,11 @@ records of the form `{id, uri, size, hash}` (and a `count`); the `uri` is
257256

258257
1. Get metadata and read the `uri`:
259258
```bash
260-
uv run tangle sdk artifacts get RUN_ID -q '{"artifact_ids":["<artifact-id>"]}'
259+
tangle sdk artifacts get RUN_ID -q '{"artifact_ids":["<artifact-id>"]}'
261260
```
262261
2. Ask the backend for a signed URL:
263262
```bash
264-
uv run tangle api artifacts signed-artifact-url --id <artifact-id>
263+
tangle api artifacts signed-artifact-url --id <artifact-id>
265264
```
266265
3. Fetch with a generic client — `curl -L "<signed-url>" -o ./out`, or for
267266
`hf://` URIs `huggingface_hub` (`hf_hub_download` / `snapshot_download`).
@@ -317,7 +316,7 @@ selectors, and auth env vars) entirely. The OSS log surface is split by what sto
317316
log surface:
318317

319318
```bash
320-
uv run tangle sdk pipeline-runs logs EXECUTION_ID
319+
tangle sdk pipeline-runs logs EXECUTION_ID
321320
```
322321

323322
(Note: this is keyed by **EXECUTION_ID**, not run id.)

skills/tangent/PORT-README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ references/ ← the loop steps + topic references
3838

3939
## How to invoke
4040

41-
Commands can run as **`uv run tangle …` from a checkout of the `tangle-cli` repo**, from a persistent uv tool install (`uv tool install tangle-cli`, then `tangle …` / `tangle-cli …`), or as a one-off uvx command (`uvx --from tangle-cli tangle …`). Elsewhere, `tangle` still appears as a bare command noun in prose and in the §2 CLI map (the naming-surface exception). See `OSS-CONVENTIONS.md` §1.
41+
Normal usage runs the **published `tangle-cli` package**: install persistently with `uv tool install tangle-cli`, then run `tangle …` / `tangle-cli …`, or use `uvx --from tangle-cli tangle …` for one-off commands. Local checkout invocation (`uv run tangle …`) is only for validating changes inside the `tangle-cli` repo. Elsewhere, `tangle` still appears as a bare command noun in prose and in the §2 CLI map (the naming-surface exception). See `OSS-CONVENTIONS.md` §1.
4242

4343
## What changed from the internal bundle
4444

@@ -47,7 +47,7 @@ replaced with the project's open, backend-agnostic equivalent:
4747

4848
| Internal coupling (removed) | Open-source replacement |
4949
| ---------------------------------- | -------------------------------------------------------------------- |
50-
| Internal CLI wrapper + env shim | `uv run tangle …` (the public CLI), no environment shim |
50+
| Internal CLI wrapper + env shim | `tangle …` / `tangle-cli` from the published package, no environment shim |
5151
| Cloud-object-storage artifact URIs | Scheme-agnostic artifact `uri` (e.g. `hf://…`); fetch via signed URL |
5252
| Hosted log-search backend | `tangle sdk pipeline-runs logs` + launcher-native system events |
5353
| Hard-coded internal API endpoint | `--base-url` / `TANGLE_API_URL` |

skills/tangent/SKILL.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: tangent
3-
description: ML experiment toolkit and autonomous agent. Say "tangent" for help, "tangent <subagent>" for a specific tool, or "tangent auto" for the full autonomous experiment loop. Requires the Tangle CLI (the `tangle-cli` checkout) and a reachable Tangle backend.
3+
description: ML experiment toolkit and autonomous agent. Say "tangent" for help, "tangent <subagent>" for a specific tool, or "tangent auto" for the full autonomous experiment loop. Requires the published Tangle CLI (`uv tool install tangle-cli` or `uvx --from tangle-cli tangle ...`) and a reachable Tangle backend.
44
allowed-tools: [Bash, Read, Write, Glob, Grep, Agent, dispatch]
55
---
66

@@ -22,7 +22,7 @@ bundle-refresh step. Relative cross-references in this skill (`agents/*.md`,
2222
`references/*.md`) resolve directly on disk. Read
2323
[`references/setup.md`](references/setup.md) to set up the CLI and auth.
2424

25-
Run commands as `uv run tangle …` from a checkout of the `tangle-cli` repo. For an installed CLI, prefer `uv tool install tangle-cli`; for one-off execution, use `uvx --from tangle-cli tangle …`. See [`OSS-CONVENTIONS.md`](OSS-CONVENTIONS.md) §1.
25+
Normal usage runs the published CLI: install persistently with `uv tool install tangle-cli` and use `tangle`, or run one-off commands with `uvx --from tangle-cli tangle …`. If intentionally validating a local `tangle-cli` checkout, prefix examples with `uv run`. See [`OSS-CONVENTIONS.md`](OSS-CONVENTIONS.md) §1.
2626

2727
## Commands
2828

@@ -61,10 +61,10 @@ Automation:
6161
## Tools
6262

6363
Always use the `tangle` CLI via Bash. Do **not** use any `tangle` MCP tools.
64-
Run `uv run tangle quickstart` to discover commands. See
64+
Run `tangle quickstart` to discover commands. See
6565
[`references/tangle-tools.md`](references/tangle-tools.md).
6666

67-
Cancel a run: `uv run tangle sdk pipeline-runs cancel RUN_ID`
67+
Cancel a run: `tangle sdk pipeline-runs cancel RUN_ID`
6868

6969
Background execution: `dispatch`. Subagents: `agents/*.md`.
7070

skills/tangent/agents/auth-wizard.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ environment variables (see [OSS-CONVENTIONS.md §4](../OSS-CONVENTIONS.md)).
1414

1515
## Tools
1616

17-
**From a checkout, run commands as `uv run tangle`. For an installed CLI, prefer `uv tool install tangle-cli`; for one-off execution, use `uvx --from tangle-cli tangle …`.**
17+
**Use the published `tangle` CLI via Bash.** Install persistently with `uv tool install tangle-cli`, or run one-off commands with `uvx --from tangle-cli tangle …`. Examples below use bare `tangle …`; if intentionally validating a local `tangle-cli` checkout, prefix examples with `uv run`.
1818
Help is standard `--help` (there is no `--help-extended` / `--help-full`).
1919

2020
Resolution precedence: explicit CLI option > `--config` file value > environment
@@ -80,7 +80,7 @@ chosen in Step 2):
8080
**a) Inline flag** — explicit, per-command, highest precedence:
8181

8282
```bash
83-
uv run tangle sdk pipeline-runs search --limit 1 \
83+
tangle sdk pipeline-runs search --limit 1 \
8484
--base-url https://api.example \
8585
--token '<token>'
8686
```
@@ -90,7 +90,7 @@ uv run tangle sdk pipeline-runs search --limit 1 \
9090
```bash
9191
export TANGLE_API_URL='https://api.example'
9292
export TANGLE_API_TOKEN='<token>'
93-
uv run tangle sdk pipeline-runs search --limit 1
93+
tangle sdk pipeline-runs search --limit 1
9494
```
9595

9696
For `--auth-header` set `TANGLE_API_AUTH_HEADER`; for `-H` set
@@ -105,7 +105,7 @@ token: "<token>"
105105
```
106106
107107
```bash
108-
uv run tangle sdk pipeline-runs search --limit 1 --config tangle.config.yaml
108+
tangle sdk pipeline-runs search --limit 1 --config tangle.config.yaml
109109
```
110110

111111
**Advise against committing secrets.** Prefer the env var, or keep the
@@ -116,7 +116,7 @@ uv run tangle sdk pipeline-runs search --limit 1 --config tangle.config.yaml
116116
Run a cheap, read-only call to confirm the credential works:
117117

118118
```bash
119-
uv run tangle sdk pipeline-runs search --limit 1
119+
tangle sdk pipeline-runs search --limit 1
120120
```
121121

122122
(attach the auth flags from Step 3 if not using env/`--config`). A clean exit —

0 commit comments

Comments
 (0)