dataspring-cli 0.4.4__tar.gz → 0.4.5__tar.gz
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.
- {dataspring_cli-0.4.4 → dataspring_cli-0.4.5}/PKG-INFO +1 -1
- {dataspring_cli-0.4.4 → dataspring_cli-0.4.5}/cli/main.py +18 -8
- {dataspring_cli-0.4.4 → dataspring_cli-0.4.5}/pyproject.toml +1 -1
- {dataspring_cli-0.4.4 → dataspring_cli-0.4.5}/skills/dataspring-author/SKILL.md +4 -2
- {dataspring_cli-0.4.4 → dataspring_cli-0.4.5}/skills/dataspring-consume/SKILL.md +16 -9
- {dataspring_cli-0.4.4 → dataspring_cli-0.4.5}/.gitignore +0 -0
- {dataspring_cli-0.4.4 → dataspring_cli-0.4.5}/README.md +0 -0
- {dataspring_cli-0.4.4 → dataspring_cli-0.4.5}/cli/__init__.py +0 -0
- {dataspring_cli-0.4.4 → dataspring_cli-0.4.5}/cli/auth.py +0 -0
- {dataspring_cli-0.4.4 → dataspring_cli-0.4.5}/cli/bundled_manifest.py +0 -0
- {dataspring_cli-0.4.4 → dataspring_cli-0.4.5}/cli/contract.py +0 -0
- {dataspring_cli-0.4.4 → dataspring_cli-0.4.5}/cli/generated.py +0 -0
- {dataspring_cli-0.4.4 → dataspring_cli-0.4.5}/cli/output.py +0 -0
- {dataspring_cli-0.4.4 → dataspring_cli-0.4.5}/cli/refusals.py +0 -0
- {dataspring_cli-0.4.4 → dataspring_cli-0.4.5}/cli/runtime.py +0 -0
- {dataspring_cli-0.4.4 → dataspring_cli-0.4.5}/cli/skills_commands.py +0 -0
- {dataspring_cli-0.4.4 → dataspring_cli-0.4.5}/cli/skilltree.py +0 -0
- {dataspring_cli-0.4.4 → dataspring_cli-0.4.5}/cli/upgrade.py +0 -0
- {dataspring_cli-0.4.4 → dataspring_cli-0.4.5}/cli/version.py +0 -0
- {dataspring_cli-0.4.4 → dataspring_cli-0.4.5}/hatch_build.py +0 -0
- {dataspring_cli-0.4.4 → dataspring_cli-0.4.5}/settings.py +0 -0
- {dataspring_cli-0.4.4 → dataspring_cli-0.4.5}/skills/dataspring-correct/SKILL.md +0 -0
|
@@ -94,7 +94,9 @@ class DataSpringGroup(TyperGroup):
|
|
|
94
94
|
#: exit codes an agent branches on (hub D-99, suite standards §6).
|
|
95
95
|
ROOT_HELP = """DataSpring CLI: query metrics, run the datacore and manage boards from the terminal.
|
|
96
96
|
|
|
97
|
-
Sign in with `dataspring auth login
|
|
97
|
+
Sign in with `dataspring auth login`: it prints a code and a link; open the link on any device and approve (works over SSH and in containers too). Every command acts in one org: --org, then DATASPRING_ORG or FORSPRING_ORG, then .forspring.json, then the key's own org, then the only stored key; `dataspring whoami` says which. No command changes the org for later ones.
|
|
98
|
+
|
|
99
|
+
Agents over MCP need no CLI: `claude mcp add --transport http --scope user dataspring https://dataspring.app/api/mcp/`, then sign in and approve the org in the browser. For CI with no person present: `export DATASPRING_API_KEY=<key>` (a key from the console's "Automation and CI"; it acts in its own org).
|
|
98
100
|
|
|
99
101
|
A refusal prints `<reason>: <what happened> Fix: <what fixes it>` and exits 4 (not_signed_in, product_off, org_suspended, role_too_low, org_mismatch), 3 (not_a_member), 2 (org_required) or 1 (account_unavailable: retry). Any other failure exits 1, a usage error 2, a removed command 64."""
|
|
100
102
|
|
|
@@ -593,17 +595,25 @@ def auth_login(
|
|
|
593
595
|
no_browser: Annotated[bool, typer.Option("--no-browser", help="Do not try to open a browser; just print the URL")] = False,
|
|
594
596
|
all_orgs: Annotated[bool, typer.Option("--all-orgs", help="Ask for a key in every org you belong to, not only the one you approve (the browser says so)")] = False,
|
|
595
597
|
):
|
|
596
|
-
"""Sign in
|
|
598
|
+
"""Sign in: the CLI prints a code and a link; open the link on any device and approve.
|
|
597
599
|
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
600
|
+
It works over SSH and in containers too: the machine running the CLI
|
|
601
|
+
needs no browser. The URL and the code are printed at once (also when the
|
|
602
|
+
output is redirected, so an agent can run it in the background and hand
|
|
603
|
+
both to a person), then it waits for the approval. Mints an ordinary API
|
|
604
|
+
key labelled 'CLI on <hostname>' for the org you approve (one per org you
|
|
605
|
+
are in with --all-orgs), stored in ~/.dataspring/credentials.json.
|
|
603
606
|
|
|
604
607
|
Logging in picks no org for later commands: with more than one key
|
|
605
608
|
stored, name it per command (--org, DATASPRING_ORG, .forspring.json).
|
|
606
|
-
|
|
609
|
+
|
|
610
|
+
Automation and CI, with no person present: export DATASPRING_API_KEY=<key>
|
|
611
|
+
(a key made in the console's connect page, under "Automation and CI"); it
|
|
612
|
+
always wins over the stored keys and acts in its own org. --key stores
|
|
613
|
+
such a key instead.
|
|
614
|
+
|
|
615
|
+
Agents over MCP do not need this: claude mcp add --transport http
|
|
616
|
+
--scope user dataspring https://dataspring.app/api/mcp/
|
|
607
617
|
"""
|
|
608
618
|
try:
|
|
609
619
|
if key:
|
|
@@ -21,8 +21,10 @@ at once (run it in the background and hand both to the person), then
|
|
|
21
21
|
echo '{"org": "acme"}' > .forspring.json && dataspring whoami --json
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
MCP:
|
|
25
|
-
|
|
24
|
+
MCP: `claude mcp add --transport http --scope user dataspring
|
|
25
|
+
https://dataspring.app/api/mcp/` (or the same address in any client); the
|
|
26
|
+
person signs in and the consent page names the org, bound to that connection.
|
|
27
|
+
With no person present: `Authorization: Bearer ds_...` (the key's own org).
|
|
26
28
|
|
|
27
29
|
A refusal leads with a reason and ends with its fix; match the reason. The
|
|
28
30
|
ones you meet while building: `role_too_low` (connections, pipelines,
|
|
@@ -8,8 +8,8 @@ description: How to query DataSpring correctly to answer analytical questions. U
|
|
|
8
8
|
You are querying DataSpring. Three surfaces are available — pick the
|
|
9
9
|
one the caller is using:
|
|
10
10
|
|
|
11
|
-
- **MCP** — agent connected to
|
|
12
|
-
|
|
11
|
+
- **MCP** — agent connected to DataSpring's MCP server (Claude.ai,
|
|
12
|
+
Claude Code, Cursor, etc.). Tool calls.
|
|
13
13
|
- **CLI** — `dataspring` from the terminal. Shell commands.
|
|
14
14
|
- **REST** — direct HTTP. Scripts, integrations.
|
|
15
15
|
|
|
@@ -80,11 +80,18 @@ which role, is the account's answer on every request. DataSpring has no
|
|
|
80
80
|
parent. `DATASPRING_API_KEY=ds_...` (CI) acts in the key's own org.
|
|
81
81
|
`dataspring whoami --json` says which org a command here acts in and why
|
|
82
82
|
(`org_from`). There is no command that switches org for later commands.
|
|
83
|
-
- **MCP.**
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
- **MCP.** The address is `https://dataspring.app/api/mcp/`, with no org
|
|
84
|
+
in it. Claude Code: `claude mcp add --transport http --scope user
|
|
85
|
+
dataspring https://dataspring.app/api/mcp/`, then `/mcp` → *Authenticate*
|
|
86
|
+
(`claude mcp login dataspring` with no browser); Claude.ai: *Customize →
|
|
87
|
+
Connectors* → *Add custom connector* with that URL. The person signs in
|
|
88
|
+
with their Forspring account and DataSpring's consent page names the org
|
|
89
|
+
the connection works in (their only one, or the one they choose); the
|
|
90
|
+
choice is bound to the connection. To work in two orgs, add two
|
|
91
|
+
connections; no tool moves a connection. With no person present (CI), the
|
|
92
|
+
same address takes `Authorization: Bearer ds_...` (a key made in the
|
|
93
|
+
console's connect page, under "Automation and CI"): the key acts in its
|
|
94
|
+
own org, and `?org=` may only repeat it.
|
|
88
95
|
- **REST.** `Authorization: Bearer ds_...`; the key is the org.
|
|
89
96
|
|
|
90
97
|
Never pick an org for the person. When the org is ambiguous you are refused
|
|
@@ -595,12 +602,12 @@ the reason, never on the prose, and pass the fix on verbatim.
|
|
|
595
602
|
| Reason | CLI exit | What you do |
|
|
596
603
|
|---|---|---|
|
|
597
604
|
| `not_signed_in` | 4 | CLI: run `dataspring auth login` and hand the person its URL and code. MCP: reconnect and sign in. Never ask for a password or a key in chat. |
|
|
598
|
-
| `org_required` | 2 | Several orgs, none named. Ask the person which one (the refusal lists them); then `--org`, `DATASPRING_ORG` or `.forspring.json`. Never guess. |
|
|
605
|
+
| `org_required` | 2 | Several orgs, none named. Ask the person which one (the refusal lists them); then `--org`, `DATASPRING_ORG` or `.forspring.json`. MCP: they reconnect and choose it on the consent page. Never guess. |
|
|
599
606
|
| `not_a_member` | 3 | Check the org id's spelling against the list. Otherwise only an owner or admin of that org can add the person, at the Forspring account; say so and stop. |
|
|
600
607
|
| `product_off` | 4 | DataSpring is not switched on for this person in that org. Tell them who can switch it on (`contacts`, `fix_url`); do not retry. |
|
|
601
608
|
| `org_suspended` | 4 | Billing stopped DataSpring for the whole org. Tell them an owner can restart it on the billing page; do not retry. |
|
|
602
609
|
| `role_too_low` | 4 | Their role cannot do this. Offer what it can do (a personal preference or quick metric instead of an org-wide change), or name the role needed. |
|
|
603
|
-
| `org_mismatch` | 4 | The key or connection is for another org than the one named. Use that org's key or
|
|
610
|
+
| `org_mismatch` | 4 | The key or connection (approved for one org) is for another org than the one named. Use that org's key or connection, or drop the conflicting `--org` / `?org=`. |
|
|
604
611
|
| `account_unavailable` | 1 | Forspring's account did not answer, so access could not be checked. Retry once after a few seconds; nothing changed. |
|
|
605
612
|
|
|
606
613
|
Other CLI exits: 0 success, 1 any other failure, 2 a usage error, 64 a
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|