@artifactshare/cli 0.1.5 → 0.1.7

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.5",
3
+ "version": "0.1.7",
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",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "gunshi": "^0.33.0",
36
- "undici": "^7.24.8"
36
+ "undici": "^7.28.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "24.12.4",
@@ -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: 7
7
+ version: 13
8
8
  managed: true
9
9
  -->
10
10
 
@@ -44,31 +44,50 @@ paths like `/Users/.../report.html` from the user's filesystem.
44
44
 
45
45
  1. `projects list --json` shows the projects this account can publish into; `is_default` marks the working-directory default.
46
46
  2. `projects create <name> --json` creates a project and returns `project.id` plus a `next_command` using `publish --project-id <id>`.
47
- 3. `init --project-id <id> --json` saves a default project for the working directory.
48
- 4. `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`.
49
- 5. `move <artifact-id-or-url> --project-id <id> --json` moves an existing file into a project; `move <artifact-id-or-url> --home --json` moves it back home.
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.
48
+ 4. `init --project-id <id> --json` saves a default project for the working directory.
49
+ 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
+ 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.
50
52
 
51
- `move` does not add grants. For `project` visibility artifacts, moving between
52
- projects may change the live project audience; the response reports
53
- `share.project_audience_may_change`. Moving a `project` visibility artifact
54
- home makes it `private`, because home has no project audience.
53
+ `edit` changes settings without adding a new version. Moving a `project`
54
+ visibility artifact home makes it `private`, because home has no project
55
+ audience. The older `move` command remains available for placement-only
56
+ automation, but prefer `edit` for new flows.
55
57
 
56
58
  ## Core commands
57
59
 
58
60
  ```bash
61
+ npx --yes @artifactshare/cli agent open <artifact-id-or-url> --json
59
62
  npx --yes @artifactshare/cli publish ./report.html --json
60
63
  npx --yes @artifactshare/cli publish ./site-dir --project-id <id> --json
61
64
  npx --yes @artifactshare/cli projects create "Client reports" --json
62
- npx --yes @artifactshare/cli move <artifact-id-or-url> --project-id <id> --json
65
+ npx --yes @artifactshare/cli projects edit <id> --add-email viewer@example.com --json
66
+ npx --yes @artifactshare/cli edit <artifact-id-or-url> --project-id <id> --json
67
+ npx --yes @artifactshare/cli edit <artifact-id-or-url> --visibility private --grant-email viewer@example.com --json
63
68
  npx --yes @artifactshare/cli update <artifact-id-or-url> ./report.html --json
69
+ npx --yes @artifactshare/cli delete <artifact-id-or-url> --json
70
+ npx --yes @artifactshare/cli artifacts list --json
64
71
  npx --yes @artifactshare/cli artifacts get <artifact-id-or-url> --json
65
72
  npx --yes @artifactshare/cli download <artifact-id-or-url> --output ./out --json
66
73
  npx --yes @artifactshare/cli comments list <artifact-id-or-url> --json
67
74
  npx --yes @artifactshare/cli comments post <artifact-id-or-url> --body "<text>" --json
75
+ npx --yes @artifactshare/cli comments edit <artifact-id-or-url> --message-id <message-id> --body "<text>" --json
76
+ npx --yes @artifactshare/cli comments resolve <artifact-id-or-url> --thread-id <thread-id> --json
77
+ npx --yes @artifactshare/cli comments reopen <artifact-id-or-url> --thread-id <thread-id> --json
78
+ npx --yes @artifactshare/cli comments delete <artifact-id-or-url> --thread-id <thread-id> --message-id <message-id> --json
68
79
  ```
69
80
 
81
+ - 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.
70
82
  - `publish` accepts a single `.html` / `.md` file or a static-site directory. The returned `share_url` is the link to give the user.
71
- - `update` adds a new version to an existing file; pass the same kind of input (single file vs directory) it was created with.
83
+ - To keep an existing share URL, do not run `publish --artifact-id`; run `update <artifact-id-or-url> <path> --json` instead.
84
+ - 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.
85
+ - `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.
86
+ - `edit` changes the display title, visibility, explicit viewers, or project placement after publishing.
87
+ - `projects edit` changes a project name, description, sharing scope, audience, or archive state. Use IDs from `projects list --json`.
88
+ - `delete` permanently removes an artifact you published, including its version history. Use it only when the user explicitly asks to delete.
89
+ - Use `artifacts list --json` to find recent artifact IDs for `update`, `edit`, `move`, `delete`, `artifacts get`, or `comments list`. Filter with `--project-id <id>`, `--home`, or `--query <text>`.
90
+ - Use IDs from `comments list --json` for `comments edit`, `comments resolve`, `comments reopen`, and `comments delete`. Comment deletion cannot be undone; omit `--message-id` only when the user wants the whole thread deleted.
72
91
  - When the user gives a title, project name, or URL instead of an ID, run `resolve <value> --json` first and use the returned ID.
73
92
  - `artifacts get` reads back single-file sources (use `--offset` to continue truncated reads); `download` saves static-site bundles.
74
93
 
@@ -4,7 +4,7 @@ alwaysApply: false
4
4
  ---
5
5
 
6
6
  <!-- artifactshare-skill
7
- version: 7
7
+ version: 13
8
8
  managed: true
9
9
  -->
10
10
 
@@ -23,9 +23,16 @@ from the user's filesystem.
23
23
  - 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
24
  - 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
25
  - Use `login --profile <name>` only in an interactive terminal where the user can approve the browser device flow.
26
+ - 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
27
  - Pick the destination with `projects list --json`, `projects create <name> --json`, `init --project-id <id>`, or `--project-id`.
27
- - Move existing files with `move <artifact-id-or-url> --project-id <id> --json` or `move <artifact-id-or-url> --home --json`. `move` does not add grants; for `project` visibility files, moving between projects may change the project audience, and moving home makes the file `private`.
28
- - Publish with `publish <path> --json`; add a version with `update <artifact-id-or-url> <path> --json`.
28
+ - 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`.
29
+ - 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`.
30
+ - `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.
31
+ - 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`.
32
+ - 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.
33
+ - Permanently remove an artifact only when the user explicitly asks with `delete <artifact-id-or-url> --json`.
34
+ - Find recent artifact IDs with `artifacts list --json`; filter with `--project-id <id>`, `--home`, or `--query <text>`.
29
35
  - Resolve titles, project names, and URLs to IDs with `resolve <value> --json` before writing.
30
- - Read back with `artifacts get` / `download`; comment with `comments list` / `comments post`.
36
+ - 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`.
37
+ - Comment deletion cannot be undone. Omit `--message-id` from `comments delete` only when the user wants the whole thread deleted.
31
38
  - On `upload_not_allowed`, run `request-access --note "<why>" --json` and tell the user an operator opens publishing; do not retry in a loop.