@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 +19 -16
- package/dist/index.js +1387 -1249
- package/package.json +1 -2
- package/skills/artifactshare/SKILL.md +31 -26
- package/skills/artifactshare/artifactshare.mdc +13 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artifactshare/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
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",
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"share",
|
|
12
12
|
"static-site",
|
|
13
13
|
"automation",
|
|
14
|
-
"publish",
|
|
15
14
|
"ai-agents"
|
|
16
15
|
],
|
|
17
16
|
"type": "module",
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: artifactshare
|
|
3
|
-
description:
|
|
3
|
+
description: Open, share, update, and read back shared files with the Artifact Share CLI. Use when the user asks to open an Artifact Share URL, share an HTML/Markdown report, a static site, or other generated file, or to read back or comment on a shared file.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<!-- artifactshare-skill
|
|
7
|
-
version:
|
|
7
|
+
version: 15
|
|
8
8
|
managed: true
|
|
9
9
|
-->
|
|
10
10
|
|
|
11
11
|
# Artifact Share CLI
|
|
12
12
|
|
|
13
13
|
Artifact Share hosts shared files (HTML pages, Markdown documents, static
|
|
14
|
-
sites) with versions and comments. The CLI
|
|
15
|
-
designed for agents: every command supports `--json`
|
|
14
|
+
sites) with versions and comments. The CLI opens shared URLs, shares local
|
|
15
|
+
files and folders, and is designed for agents: every command supports `--json`
|
|
16
|
+
with a stable contract.
|
|
16
17
|
|
|
17
18
|
Run commands with `npx --yes @artifactshare/cli`. When unsure about a
|
|
18
19
|
command or flag, read `npx --yes @artifactshare/cli --help` first.
|
|
@@ -21,9 +22,13 @@ Use the CLI whenever the file already exists locally as a file or folder.
|
|
|
21
22
|
The remote MCP tools accept HTML or Markdown source strings; they cannot read
|
|
22
23
|
paths like `/Users/.../report.html` from the user's filesystem.
|
|
23
24
|
|
|
25
|
+
When passing paths or free-form text through a shell, quote them. Paths may
|
|
26
|
+
contain `$`, spaces, `*`, or `?`; use single quotes such as
|
|
27
|
+
`'apps/web/app/routes/a.$id/index.tsx'` so the shell does not expand them.
|
|
28
|
+
|
|
24
29
|
## Output contract
|
|
25
30
|
|
|
26
|
-
- Always pass `--json`. Success prints `{"schema_version":
|
|
31
|
+
- Always pass `--json`. Success prints `{"schema_version":2,"ok":true,"command":...,"data":...}` to stdout; failure prints `{"schema_version":2,"ok":false,"error":...}` to stderr with exit code 1.
|
|
27
32
|
- On failure, read `error.code`, `error.hint`, and `error.recovery`. `recovery.kind` is one of `change_input`, `run_command`, `retry_later`, `ask_human`, `report_issue`. When `error.requires_human` is true, report to the user instead of retrying.
|
|
28
33
|
|
|
29
34
|
## Authentication
|
|
@@ -42,13 +47,13 @@ paths like `/Users/.../report.html` from the user's filesystem.
|
|
|
42
47
|
|
|
43
48
|
## Choosing the destination
|
|
44
49
|
|
|
45
|
-
1. `projects list --json` shows the projects this account can
|
|
46
|
-
2. `projects create <name> --json` creates a project and returns `project.id` plus a `next_command` using `
|
|
47
|
-
3. `projects edit <id> --name
|
|
50
|
+
1. `projects list --json` shows the projects this account can share into; `is_default` marks the working-directory default.
|
|
51
|
+
2. `projects create <name> --json` creates a project and returns `project.id` plus a `next_command` using `share --project-id <id>`.
|
|
52
|
+
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
53
|
4. `init --project-id <id> --json` saves a default project for the working directory.
|
|
49
|
-
5. `
|
|
54
|
+
5. `share` 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
55
|
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
|
|
56
|
+
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-share settings.
|
|
52
57
|
|
|
53
58
|
`edit` changes settings without adding a new version. Moving a `project`
|
|
54
59
|
visibility artifact home makes it `private`, because home has no project
|
|
@@ -58,10 +63,10 @@ automation, but prefer `edit` for new flows.
|
|
|
58
63
|
## Core commands
|
|
59
64
|
|
|
60
65
|
```bash
|
|
61
|
-
npx --yes @artifactshare/cli
|
|
62
|
-
npx --yes @artifactshare/cli
|
|
63
|
-
npx --yes @artifactshare/cli
|
|
64
|
-
npx --yes @artifactshare/cli projects create
|
|
66
|
+
npx --yes @artifactshare/cli open <artifact-id-or-url> --json
|
|
67
|
+
npx --yes @artifactshare/cli share ./report.html --json
|
|
68
|
+
npx --yes @artifactshare/cli share ./site-dir --project-id <id> --json
|
|
69
|
+
npx --yes @artifactshare/cli projects create 'Client reports' --json
|
|
65
70
|
npx --yes @artifactshare/cli projects edit <id> --add-email viewer@example.com --json
|
|
66
71
|
npx --yes @artifactshare/cli edit <artifact-id-or-url> --project-id <id> --json
|
|
67
72
|
npx --yes @artifactshare/cli edit <artifact-id-or-url> --visibility private --grant-email viewer@example.com --json
|
|
@@ -71,21 +76,21 @@ npx --yes @artifactshare/cli artifacts list --json
|
|
|
71
76
|
npx --yes @artifactshare/cli artifacts get <artifact-id-or-url> --json
|
|
72
77
|
npx --yes @artifactshare/cli download <artifact-id-or-url> --output ./out --json
|
|
73
78
|
npx --yes @artifactshare/cli comments list <artifact-id-or-url> --json
|
|
74
|
-
npx --yes @artifactshare/cli comments post <artifact-id-or-url> --body
|
|
75
|
-
npx --yes @artifactshare/cli comments edit <artifact-id-or-url> --message-id <message-id> --body
|
|
79
|
+
npx --yes @artifactshare/cli comments post <artifact-id-or-url> --body '<text>' --json
|
|
80
|
+
npx --yes @artifactshare/cli comments edit <artifact-id-or-url> --message-id <message-id> --body '<text>' --json
|
|
76
81
|
npx --yes @artifactshare/cli comments resolve <artifact-id-or-url> --thread-id <thread-id> --json
|
|
77
82
|
npx --yes @artifactshare/cli comments reopen <artifact-id-or-url> --thread-id <thread-id> --json
|
|
78
83
|
npx --yes @artifactshare/cli comments delete <artifact-id-or-url> --thread-id <thread-id> --message-id <message-id> --json
|
|
79
84
|
```
|
|
80
85
|
|
|
81
|
-
- When the user gives an Artifact Share URL, start with `
|
|
82
|
-
- `
|
|
83
|
-
- To keep an existing share URL, do not run `
|
|
84
|
-
- For repeat jobs where the caller can choose a stable name, use `
|
|
86
|
+
- When the user gives an Artifact Share URL, start with `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.
|
|
87
|
+
- `share` accepts a single `.html` / `.md` file or a static-site directory. The returned `share_url` is the link to give the user.
|
|
88
|
+
- To keep an existing share URL, do not run `share --artifact-id`; run `update <artifact-id-or-url> <path> --json` instead.
|
|
89
|
+
- For repeat jobs where the caller can choose a stable name, use `share <path> --key <key> --json`: the first run creates the artifact, later runs add versions to the same artifact.
|
|
85
90
|
- `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
|
|
91
|
+
- `edit` changes the display title, visibility, explicit viewers, or project placement after sharing.
|
|
87
92
|
- `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
|
|
93
|
+
- `delete` permanently removes an artifact you shared, including its version history. Use it only when the user explicitly asks to delete.
|
|
89
94
|
- 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
95
|
- 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.
|
|
91
96
|
- When the user gives a title, project name, or URL instead of an ID, run `resolve <value> --json` first and use the returned ID.
|
|
@@ -93,7 +98,7 @@ npx --yes @artifactshare/cli comments delete <artifact-id-or-url> --thread-id <t
|
|
|
93
98
|
|
|
94
99
|
## Upload access
|
|
95
100
|
|
|
96
|
-
If `
|
|
97
|
-
`request-access --note
|
|
98
|
-
user that
|
|
99
|
-
|
|
101
|
+
If `share` or `update` fails with `upload_not_allowed`, run
|
|
102
|
+
`request-access --note '<why>' --json` to join the waitlist, then tell the
|
|
103
|
+
user that sharing stays closed until an operator opens it. Do not retry
|
|
104
|
+
share in a loop.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Use the Artifact Share CLI to
|
|
2
|
+
description: Use the Artifact Share CLI to open, share, update, and read back shared files.
|
|
3
3
|
alwaysApply: false
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<!-- artifactshare-skill
|
|
7
|
-
version:
|
|
7
|
+
version: 15
|
|
8
8
|
managed: true
|
|
9
9
|
-->
|
|
10
10
|
|
|
@@ -12,27 +12,31 @@ managed: true
|
|
|
12
12
|
|
|
13
13
|
Artifact Share hosts shared files (HTML pages, Markdown documents, static
|
|
14
14
|
sites) with versions and comments. Use `npx --yes @artifactshare/cli` to
|
|
15
|
-
|
|
15
|
+
open shared URLs and share local files from the terminal, and read
|
|
16
16
|
`npx --yes @artifactshare/cli --help` before choosing a command.
|
|
17
17
|
|
|
18
18
|
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.
|
|
26
|
-
- When the user gives an Artifact Share URL, start with `
|
|
30
|
+
- When the user gives an Artifact Share URL, start with `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.
|
|
27
31
|
- Pick the destination with `projects list --json`, `projects create <name> --json`, `init --project-id <id>`, or `--project-id`.
|
|
28
|
-
- Change project settings with `projects edit <id> --name
|
|
29
|
-
- Change post-
|
|
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-share 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
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.
|
|
31
|
-
-
|
|
32
|
-
- For repeat jobs with a stable caller-owned name, use `
|
|
35
|
+
- Share with `share <path> --json`. To keep an existing share URL, do not use `share --artifact-id`; add a version with `update <artifact-id-or-url> <path> --json`.
|
|
36
|
+
- For repeat jobs with a stable caller-owned name, use `share <path> --key <key> --json`: the first run creates the artifact, later runs add versions to the same artifact.
|
|
33
37
|
- Permanently remove an artifact only when the user explicitly asks with `delete <artifact-id-or-url> --json`.
|
|
34
38
|
- Find recent artifact IDs with `artifacts list --json`; filter with `--project-id <id>`, `--home`, or `--query <text>`.
|
|
35
39
|
- Resolve titles, project names, and URLs to IDs with `resolve <value> --json` before writing.
|
|
36
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`.
|
|
37
41
|
- Comment deletion cannot be undone. Omit `--message-id` from `comments delete` only when the user wants the whole thread deleted.
|
|
38
|
-
- On `upload_not_allowed`, run `request-access --note
|
|
42
|
+
- On `upload_not_allowed`, run `request-access --note '<why>' --json` and tell the user an operator opens sharing; do not retry in a loop.
|