@artifactshare/cli 0.1.7 → 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/README.md +4 -2
- package/dist/index.js +1282 -1136
- package/package.json +1 -1
- package/skills/artifactshare/SKILL.md +11 -7
- package/skills/artifactshare/artifactshare.mdc +8 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artifactshare/cli",
|
|
3
|
-
"version": "0.1.
|
|
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:
|
|
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
|
|
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
|
|
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
|
|
@@ -61,7 +65,7 @@ automation, but prefer `edit` for new flows.
|
|
|
61
65
|
npx --yes @artifactshare/cli agent open <artifact-id-or-url> --json
|
|
62
66
|
npx --yes @artifactshare/cli publish ./report.html --json
|
|
63
67
|
npx --yes @artifactshare/cli publish ./site-dir --project-id <id> --json
|
|
64
|
-
npx --yes @artifactshare/cli projects create
|
|
68
|
+
npx --yes @artifactshare/cli projects create 'Client reports' --json
|
|
65
69
|
npx --yes @artifactshare/cli projects edit <id> --add-email viewer@example.com --json
|
|
66
70
|
npx --yes @artifactshare/cli edit <artifact-id-or-url> --project-id <id> --json
|
|
67
71
|
npx --yes @artifactshare/cli edit <artifact-id-or-url> --visibility private --grant-email viewer@example.com --json
|
|
@@ -71,8 +75,8 @@ npx --yes @artifactshare/cli artifacts list --json
|
|
|
71
75
|
npx --yes @artifactshare/cli artifacts get <artifact-id-or-url> --json
|
|
72
76
|
npx --yes @artifactshare/cli download <artifact-id-or-url> --output ./out --json
|
|
73
77
|
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
|
|
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
|
|
76
80
|
npx --yes @artifactshare/cli comments resolve <artifact-id-or-url> --thread-id <thread-id> --json
|
|
77
81
|
npx --yes @artifactshare/cli comments reopen <artifact-id-or-url> --thread-id <thread-id> --json
|
|
78
82
|
npx --yes @artifactshare/cli comments delete <artifact-id-or-url> --thread-id <thread-id> --message-id <message-id> --json
|
|
@@ -94,6 +98,6 @@ npx --yes @artifactshare/cli comments delete <artifact-id-or-url> --thread-id <t
|
|
|
94
98
|
## Upload access
|
|
95
99
|
|
|
96
100
|
If `publish` or `update` fails with `upload_not_allowed`, run
|
|
97
|
-
`request-access --note
|
|
101
|
+
`request-access --note '<why>' --json` to join the waitlist, then tell the
|
|
98
102
|
user that publishing stays closed until an operator opens it. Do not retry
|
|
99
103
|
publish in a loop.
|
|
@@ -4,7 +4,7 @@ alwaysApply: false
|
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<!-- artifactshare-skill
|
|
7
|
-
version:
|
|
7
|
+
version: 14
|
|
8
8
|
managed: true
|
|
9
9
|
-->
|
|
10
10
|
|
|
@@ -19,14 +19,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
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.
|
|
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-publish settings with `edit <artifact-id-or-url> --title
|
|
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`.
|
|
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
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`.
|
|
32
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.
|
|
@@ -35,4 +39,4 @@ from the user's filesystem.
|
|
|
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 publishing; do not retry in a loop.
|