@artifactshare/cli 0.1.6 → 0.1.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artifactshare/cli",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Upload and share HTML, Markdown, folders, and static sites from terminals, AI agents, automation, and CI.",
5
5
  "homepage": "https://artifactshare.com/connect",
6
6
  "license": "Apache-2.0",
@@ -4,7 +4,7 @@ description: Publish, update, and read back shared files with the Artifact Share
4
4
  ---
5
5
 
6
6
  <!-- artifactshare-skill
7
- version: 12
7
+ version: 14
8
8
  managed: true
9
9
  -->
10
10
 
@@ -21,6 +21,10 @@ Use the CLI whenever the file already exists locally as a file or folder.
21
21
  The remote MCP tools accept HTML or Markdown source strings; they cannot read
22
22
  paths like `/Users/.../report.html` from the user's filesystem.
23
23
 
24
+ When passing paths or free-form text through a shell, quote them. Paths may
25
+ contain `$`, spaces, `*`, or `?`; use single quotes such as
26
+ `'apps/web/app/routes/a.$id/index.tsx'` so the shell does not expand them.
27
+
24
28
  ## Output contract
25
29
 
26
30
  - Always pass `--json`. Success prints `{"schema_version":1,"ok":true,"command":...,"data":...}` to stdout; failure prints `{"ok":false,"error":...}` to stderr with exit code 1.
@@ -44,11 +48,11 @@ paths like `/Users/.../report.html` from the user's filesystem.
44
48
 
45
49
  1. `projects list --json` shows the projects this account can publish into; `is_default` marks the working-directory default.
46
50
  2. `projects create <name> --json` creates a project and returns `project.id` plus a `next_command` using `publish --project-id <id>`.
47
- 3. `projects edit <id> --name "New name" --json`, `projects edit <id> --visibility private --json`, `projects edit <id> --add-email person@example.com --json`, `projects edit <id> --remove-email person@example.com --json`, `projects edit <id> --archive --json`, and `projects edit <id> --unarchive --json` change the project settings and audience.
51
+ 3. `projects edit <id> --name 'New name' --json`, `projects edit <id> --visibility private --json`, `projects edit <id> --add-email person@example.com --json`, `projects edit <id> --remove-email person@example.com --json`, `projects edit <id> --archive --json`, and `projects edit <id> --unarchive --json` change the project settings and audience.
48
52
  4. `init --project-id <id> --json` saves a default project for the working directory.
49
53
  5. `publish` resolves the destination from `--project-id`, then the saved default, then `--home` (the home destination for files not placed in a project). Without any of these it fails with `destination_required`.
50
54
  6. `edit <artifact-id-or-url> --project-id <id> --json` moves an existing file into a project; `edit <artifact-id-or-url> --home --json` moves it back home.
51
- 7. `edit <artifact-id-or-url> --title "New title" --json`, `edit <artifact-id-or-url> --visibility private --json`, `edit <artifact-id-or-url> --grant-email person@example.com --json`, and `edit <artifact-id-or-url> --revoke-email person@example.com --json` change post-publish settings.
55
+ 7. `edit <artifact-id-or-url> --title 'New title' --json`, `edit <artifact-id-or-url> --visibility private --json`, `edit <artifact-id-or-url> --grant-email person@example.com --json`, and `edit <artifact-id-or-url> --revoke-email person@example.com --json` change post-publish settings.
52
56
 
53
57
  `edit` changes settings without adding a new version. Moving a `project`
54
58
  visibility artifact home makes it `private`, because home has no project
@@ -58,9 +62,10 @@ automation, but prefer `edit` for new flows.
58
62
  ## Core commands
59
63
 
60
64
  ```bash
65
+ npx --yes @artifactshare/cli agent open <artifact-id-or-url> --json
61
66
  npx --yes @artifactshare/cli publish ./report.html --json
62
67
  npx --yes @artifactshare/cli publish ./site-dir --project-id <id> --json
63
- npx --yes @artifactshare/cli projects create "Client reports" --json
68
+ npx --yes @artifactshare/cli projects create 'Client reports' --json
64
69
  npx --yes @artifactshare/cli projects edit <id> --add-email viewer@example.com --json
65
70
  npx --yes @artifactshare/cli edit <artifact-id-or-url> --project-id <id> --json
66
71
  npx --yes @artifactshare/cli edit <artifact-id-or-url> --visibility private --grant-email viewer@example.com --json
@@ -70,15 +75,18 @@ npx --yes @artifactshare/cli artifacts list --json
70
75
  npx --yes @artifactshare/cli artifacts get <artifact-id-or-url> --json
71
76
  npx --yes @artifactshare/cli download <artifact-id-or-url> --output ./out --json
72
77
  npx --yes @artifactshare/cli comments list <artifact-id-or-url> --json
73
- npx --yes @artifactshare/cli comments post <artifact-id-or-url> --body "<text>" --json
74
- npx --yes @artifactshare/cli comments edit <artifact-id-or-url> --message-id <message-id> --body "<text>" --json
78
+ npx --yes @artifactshare/cli comments post <artifact-id-or-url> --body '<text>' --json
79
+ npx --yes @artifactshare/cli comments edit <artifact-id-or-url> --message-id <message-id> --body '<text>' --json
75
80
  npx --yes @artifactshare/cli comments resolve <artifact-id-or-url> --thread-id <thread-id> --json
76
81
  npx --yes @artifactshare/cli comments reopen <artifact-id-or-url> --thread-id <thread-id> --json
77
82
  npx --yes @artifactshare/cli comments delete <artifact-id-or-url> --thread-id <thread-id> --message-id <message-id> --json
78
83
  ```
79
84
 
85
+ - When the user gives an Artifact Share URL, start with `agent open <artifact-id-or-url> --json`. It ensures this skill is installed or updated, then reads single-file artifacts or returns a `download` next command for static sites and multi-file artifacts.
80
86
  - `publish` accepts a single `.html` / `.md` file or a static-site directory. The returned `share_url` is the link to give the user.
81
- - `update` adds a new version to an existing file; pass the same kind of input (single file vs directory) it was created with.
87
+ - To keep an existing share URL, do not run `publish --artifact-id`; run `update <artifact-id-or-url> <path> --json` instead.
88
+ - For repeat jobs where the caller can choose a stable name, use `publish <path> --key <key> --json`: the first run creates the artifact, later runs add versions to the same artifact.
89
+ - `update` adds a new version to an existing file; pass the same kind of input (single file vs directory) it was created with. It does not change title, visibility, explicit viewers, or project placement.
82
90
  - `edit` changes the display title, visibility, explicit viewers, or project placement after publishing.
83
91
  - `projects edit` changes a project name, description, sharing scope, audience, or archive state. Use IDs from `projects list --json`.
84
92
  - `delete` permanently removes an artifact you published, including its version history. Use it only when the user explicitly asks to delete.
@@ -90,6 +98,6 @@ npx --yes @artifactshare/cli comments delete <artifact-id-or-url> --thread-id <t
90
98
  ## Upload access
91
99
 
92
100
  If `publish` or `update` fails with `upload_not_allowed`, run
93
- `request-access --note "<why>" --json` to join the waitlist, then tell the
101
+ `request-access --note '<why>' --json` to join the waitlist, then tell the
94
102
  user that publishing stays closed until an operator opens it. Do not retry
95
103
  publish in a loop.
@@ -4,7 +4,7 @@ alwaysApply: false
4
4
  ---
5
5
 
6
6
  <!-- artifactshare-skill
7
- version: 12
7
+ version: 14
8
8
  managed: true
9
9
  -->
10
10
 
@@ -19,17 +19,24 @@ Use the CLI for local files and folders. The remote MCP tools accept HTML or
19
19
  Markdown source strings; they cannot read paths like `/Users/.../report.html`
20
20
  from the user's filesystem.
21
21
 
22
+ Quote paths and free-form text before passing them through a shell. Paths may
23
+ contain `$`, spaces, `*`, or `?`; use single quotes such as
24
+ `'apps/web/app/routes/a.$id/index.tsx'` so the shell does not expand them.
25
+
22
26
  - Always pass `--json`; on failure read `error.code`, `error.hint`, and `error.recovery`.
23
27
  - In agents, CI, or scripts, ask the user to issue an API token at `https://artifactshare.com/settings/tokens`, then run normal commands with `ARTIFACTSHARE_TOKEN` or `--token`; do not pass API tokens to `login`.
24
28
  - To save that token as a named profile without TTY or browser login, pipe it on standard input: `printf '%s' "$TOKEN" | npx --yes @artifactshare/cli profiles import-token --profile <name> --json`. Add `--allow-plaintext-token-store` only on a trusted machine without a native token store.
25
29
  - Use `login --profile <name>` only in an interactive terminal where the user can approve the browser device flow.
30
+ - When the user gives an Artifact Share URL, start with `agent open <artifact-id-or-url> --json`. It ensures this rule is installed or updated, then reads single-file artifacts or returns a `download` next command for static sites and multi-file artifacts.
26
31
  - Pick the destination with `projects list --json`, `projects create <name> --json`, `init --project-id <id>`, or `--project-id`.
27
- - Change project settings with `projects edit <id> --name "New name" --json`, `projects edit <id> --visibility private --json`, `projects edit <id> --add-email person@example.com --json`, `projects edit <id> --remove-email person@example.com --json`, `projects edit <id> --archive --json`, or `projects edit <id> --unarchive --json`.
28
- - Change post-publish settings with `edit <artifact-id-or-url> --title "New title" --json`, `edit <artifact-id-or-url> --visibility private --json`, `edit <artifact-id-or-url> --grant-email person@example.com --json`, `edit <artifact-id-or-url> --revoke-email person@example.com --json`, `edit <artifact-id-or-url> --project-id <id> --json`, or `edit <artifact-id-or-url> --home --json`. Moving a `project` visibility file home makes it `private`.
32
+ - Change project settings with `projects edit <id> --name 'New name' --json`, `projects edit <id> --visibility private --json`, `projects edit <id> --add-email person@example.com --json`, `projects edit <id> --remove-email person@example.com --json`, `projects edit <id> --archive --json`, or `projects edit <id> --unarchive --json`.
33
+ - Change post-publish settings with `edit <artifact-id-or-url> --title 'New title' --json`, `edit <artifact-id-or-url> --visibility private --json`, `edit <artifact-id-or-url> --grant-email person@example.com --json`, `edit <artifact-id-or-url> --revoke-email person@example.com --json`, `edit <artifact-id-or-url> --project-id <id> --json`, or `edit <artifact-id-or-url> --home --json`. Moving a `project` visibility file home makes it `private`.
29
34
  - `move <artifact-id-or-url> --project-id <id> --json` and `move <artifact-id-or-url> --home --json` remain available for placement-only automation, but prefer `edit` for new flows.
30
- - Publish with `publish <path> --json`; add a version with `update <artifact-id-or-url> <path> --json`; permanently remove an artifact only when the user explicitly asks with `delete <artifact-id-or-url> --json`.
35
+ - Publish with `publish <path> --json`. To keep an existing share URL, do not use `publish --artifact-id`; add a version with `update <artifact-id-or-url> <path> --json`.
36
+ - For repeat jobs with a stable caller-owned name, use `publish <path> --key <key> --json`: the first run creates the artifact, later runs add versions to the same artifact.
37
+ - Permanently remove an artifact only when the user explicitly asks with `delete <artifact-id-or-url> --json`.
31
38
  - Find recent artifact IDs with `artifacts list --json`; filter with `--project-id <id>`, `--home`, or `--query <text>`.
32
39
  - Resolve titles, project names, and URLs to IDs with `resolve <value> --json` before writing.
33
40
  - Read back with `artifacts get` / `download`; comment with `comments list` / `comments post`; use `comments edit`, `comments resolve`, `comments reopen`, and `comments delete` with IDs from `comments list`.
34
41
  - Comment deletion cannot be undone. Omit `--message-id` from `comments delete` only when the user wants the whole thread deleted.
35
- - On `upload_not_allowed`, run `request-access --note "<why>" --json` and tell the user an operator opens publishing; do not retry in a loop.
42
+ - On `upload_not_allowed`, run `request-access --note '<why>' --json` and tell the user an operator opens publishing; do not retry in a loop.