@artifactshare/cli 0.1.7 → 0.2.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 CHANGED
@@ -1,24 +1,25 @@
1
1
  # Artifact Share CLI
2
2
 
3
- The official CLI to upload and share files, folders, and static sites on [Artifact Share](https://artifactshare.com) from terminals, AI agents, and automation. Publish HTML, Markdown, and exported sites to stable share URLs, update existing files, and emit `--json` for scripts and agents.
3
+ The official CLI to open, share, and update files, folders, and static sites on [Artifact Share](https://artifactshare.com) from terminals, AI agents, and automation. Share HTML, Markdown, and exported sites to stable URLs, update existing files, and emit `--json` for scripts and agents.
4
4
 
5
- Artifact Share hosts AI-built reports, documents, and static sites so you can share them with teammates and clients. This CLI publishes a single file or a whole folder (HTML, Markdown, exported SPAs, images included), updates versions, reads content and comments back, and works the same for humans, terminal agents (Claude Code, Codex, Cursor Agent), and automation.
5
+ Artifact Share hosts AI-built reports, documents, and static sites so you can share them with teammates and clients. This CLI shares a single file or a whole folder (HTML, Markdown, exported SPAs, images included), updates versions, opens shared URLs for agents, reads content and comments back, and works the same for humans, terminal agents (Claude Code, Codex, Cursor Agent), and automation.
6
6
 
7
7
  ## Quick start
8
8
 
9
9
  Requires Node.js 22 or later.
10
10
 
11
11
  ```sh
12
- npx --yes @artifactshare/cli publish ./report.html
12
+ npx --yes @artifactshare/cli share ./report.html
13
13
  ```
14
14
 
15
15
  `--yes` lets agents and CI fetch the package without stopping for an npx install prompt.
16
16
 
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:
17
+ On the first run in an interactive terminal, the CLI prints a sign-in link — open it in your browser, and the share completes and prints the share URL. Folders work too:
18
18
 
19
19
  ```sh
20
- npx --yes @artifactshare/cli publish ./dist --project "Weekly Reports"
21
- npx --yes @artifactshare/cli projects create "Client reports" --json
20
+ npx --yes @artifactshare/cli open <artifact-id-or-url> --json
21
+ npx --yes @artifactshare/cli share ./dist --project 'Weekly Reports'
22
+ npx --yes @artifactshare/cli projects create 'Client reports' --json
22
23
  npx --yes @artifactshare/cli projects edit <id> --add-email viewer@example.com --json
23
24
  npx --yes @artifactshare/cli edit <artifact-id-or-url> --project-id <id> --json
24
25
  npx --yes @artifactshare/cli edit <artifact-id-or-url> --visibility private --grant-email viewer@example.com --json
@@ -28,13 +29,13 @@ npx --yes @artifactshare/cli delete <artifact-id-or-url> --json
28
29
 
29
30
  To keep an existing share URL, update it with
30
31
  `npx --yes @artifactshare/cli update <artifact-id-or-url> <path>` instead of
31
- publishing again. For CI, scheduled reports, or other repeat jobs, use
32
- `publish <path> --key <key>`: the first run creates the shared file, and later
32
+ sharing again. For CI, scheduled reports, or other repeat jobs, use
33
+ `share <path> --key <key>`: the first run creates the shared file, and later
33
34
  runs add versions to the same file.
34
35
 
35
36
  ## Authentication
36
37
 
37
- - **Interactive**: run `npx --yes @artifactshare/cli login`, or run `publish`, `update`, or `download` directly — those commands start sign-in for you when unauthenticated (the CLI prints a link and code to open in your browser).
38
+ - **Interactive**: run `npx --yes @artifactshare/cli login`, or run `share`, `update`, or `download` directly — those commands start sign-in for you when unauthenticated (the CLI prints a link and code to open in your browser).
38
39
  - **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.
39
40
  - 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.
40
41
 
@@ -42,18 +43,18 @@ runs add versions to the same file.
42
43
 
43
44
  | Command | What it does |
44
45
  | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- |
45
- | `publish <path>` | Publish a file or folder as a new shared file (`--project`, `--home`, `--visibility`, `--key`) |
46
+ | `open <target>` | First command for agents opening a shared URL; ensures skills, then reads or suggests download |
47
+ | `share <path>` | Share a file or folder as a new shared file (`--project`, `--home`, `--visibility`, `--key`) |
46
48
  | `update <target> <path>` | Add a new version to an existing file (ID or share URL) |
47
49
  | `edit <target>` | Change title, sharing, explicit viewers, or project placement |
48
- | `delete <target>` | Permanently delete a file you published |
50
+ | `delete <target>` | Permanently delete a file you shared |
49
51
  | `resolve <value>` | Find files by URL, ID, title, or project name |
50
- | `agent open <target>` | First command for agents opening a shared URL; ensures skills, then reads or suggests download |
51
52
  | `artifacts get <target>` | Read a file's content and metadata back |
52
53
  | `download <target>` | Save a file or a whole static site locally |
53
54
  | `comments list / post / edit / resolve / reopen / delete <target>` | Read, write, edit, resolve, reopen, and permanently delete comments |
54
55
  | `projects list / create / edit` | List, create, and edit project destinations and audience |
55
56
  | `move <target>` | Move an existing file into a project or back home; `edit` is preferred for new automation |
56
- | `request-access` | Join the waitlist when publishing is not enabled yet |
57
+ | `request-access` | Join the waitlist when sharing is not enabled yet |
57
58
  | `login` / `whoami` | Sign in and check who you are |
58
59
  | `doctor` | Diagnose auth, destination, network, and upload readiness — tells you the next command to run |
59
60
  | `profiles list / use / import-token` | Switch between local account profiles and import an issued token from stdin |
@@ -65,7 +66,7 @@ runs add versions to the same file.
65
66
  When an agent receives an Artifact Share URL, start here:
66
67
 
67
68
  ```sh
68
- npx --yes @artifactshare/cli agent open <artifact-id-or-url> --json
69
+ npx --yes @artifactshare/cli open <artifact-id-or-url> --json
69
70
  ```
70
71
 
71
72
  This installs or updates the local skill first, then reads single-file artifacts. Static sites and multi-file artifacts return a `download` next command.
@@ -80,12 +81,14 @@ npx --yes @artifactshare/cli skills ensure --tool auto --scope project --json
80
81
 
81
82
  Comment deletion is permanent. Use `comments delete <target> --thread-id <id> --message-id <id> --json` for one message, or omit `--message-id` only when deleting the whole thread.
82
83
 
83
- 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.
84
+ All commands emit stable JSON when run non-interactively, piped, or with `--json`: success on stdout as `{ "schema_version": 2, "ok": true, "command": ..., "data": ... }`, failures on stderr as `{ "schema_version": 2, "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.
84
85
 
85
86
  ```sh
86
- npx --yes @artifactshare/cli publish ./dist --json
87
+ npx --yes @artifactshare/cli share ./dist --json
87
88
  ```
88
89
 
90
+ Quote paths and free-form text before passing them through a shell. Artifact Share route files and user files can contain `$`, spaces, or glob characters, so prefer single quotes such as `'apps/web/app/routes/a.$id/index.tsx'` and `--body 'Looks good'`.
91
+
89
92
  ## Links
90
93
 
91
94
  - Setup guide for AI tools and terminals: https://artifactshare.com/connect