@artifactshare/cli 0.1.1 → 0.1.3

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 CHANGED
@@ -9,21 +9,23 @@ Artifact Share hosts AI-built reports, documents, and static sites so you can sh
9
9
  Requires Node.js 22 or later.
10
10
 
11
11
  ```sh
12
- npx @artifactshare/cli publish ./report.html
12
+ npx --yes @artifactshare/cli publish ./report.html
13
13
  ```
14
14
 
15
+ `--yes` lets agents and CI fetch the package without stopping for an npx install prompt.
16
+
15
17
  On the first run in an interactive terminal, the CLI prints a sign-in link — open it in your browser, and the publish completes and prints the share URL. Folders work too:
16
18
 
17
19
  ```sh
18
- npx @artifactshare/cli publish ./dist --project "Weekly Reports"
19
- npx @artifactshare/cli update <share-url> ./dist
20
+ npx --yes @artifactshare/cli publish ./dist --project "Weekly Reports"
21
+ npx --yes @artifactshare/cli update <share-url> ./dist
20
22
  ```
21
23
 
22
24
  ## Authentication
23
25
 
24
- - **Interactive**: run `npx @artifactshare/cli login`, or just run any command — unauthenticated `publish` / `update` / `download` start the sign-in for you (the CLI prints a link and code to open in your browser).
25
- - **CI / non-interactive**: set `ARTIFACTSHARE_TOKEN` (or pass `--token`). Without a token, non-interactive runs fail with `error.code: "auth_required"` instead of hanging.
26
- - Multiple accounts: keep one local profile per account (`profiles list` / `profiles use <name>`), no re-linking required.
26
+ - **Interactive**: run `npx --yes @artifactshare/cli login`, or just run any command — unauthenticated `publish` / `update` / `download` start the sign-in for you (the CLI prints a link and code to open in your browser).
27
+ - **CI / non-interactive**: issue a token at `https://artifactshare.com/settings/tokens`, then set `ARTIFACTSHARE_TOKEN` (or pass `--token`). Without a token, non-interactive runs fail with `error.code: "auth_required"` instead of hanging.
28
+ - Multiple accounts: keep one local profile per account (`profiles list` / `profiles use <name>`). In non-interactive agents, pipe an issued token into `profiles import-token --profile <name> --json` to create a saved profile without browser login.
27
29
 
28
30
  ## Commands
29
31
 
@@ -39,7 +41,7 @@ npx @artifactshare/cli update <share-url> ./dist
39
41
  | `request-access` | Join the waitlist when publishing is not enabled yet |
40
42
  | `login` / `whoami` | Sign in and check who you are |
41
43
  | `doctor` | Diagnose auth, destination, network, and upload readiness — tells you the next command to run |
42
- | `profiles list / use` | Switch between local account profiles |
44
+ | `profiles list / use / import-token` | Switch between local account profiles and import an issued token from stdin |
43
45
  | `init` | Save a default project for the current directory |
44
46
  | `skills install / list / update / remove` | Install the bundled usage guide into your AI agent's skills |
45
47
 
@@ -48,7 +50,7 @@ npx @artifactshare/cli update <share-url> ./dist
48
50
  Teach your agent how to use Artifact Share once:
49
51
 
50
52
  ```sh
51
- npx @artifactshare/cli skills install
53
+ npx --yes @artifactshare/cli skills install
52
54
  ```
53
55
 
54
56
  This installs a skill (for Claude Code, Codex, and Cursor) that covers publishing, updating, and reading comments.
@@ -56,7 +58,7 @@ This installs a skill (for Claude Code, Codex, and Cursor) that covers publishin
56
58
  All commands emit stable JSON when run non-interactively, piped, or with `--json`: success on stdout as `{ "schema_version": 1, "ok": true, "command": ..., "data": ... }`, failures on stderr as `{ "schema_version": 1, "ok": false, "command": ..., "error": ... }` with exit code 1. The `error` object carries a machine-readable `code`, a `hint`, and a structured `recovery` field (for example `{ "kind": "run_command", ... }`), so agents and scripts can branch and recover without parsing prose.
57
59
 
58
60
  ```sh
59
- npx @artifactshare/cli publish ./dist --json
61
+ npx --yes @artifactshare/cli publish ./dist --json
60
62
  ```
61
63
 
62
64
  ## Links