@artifactshare/cli 0.0.0-reserved.0 → 0.1.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/package.json CHANGED
@@ -1,17 +1,45 @@
1
1
  {
2
2
  "name": "@artifactshare/cli",
3
- "version": "0.0.0-reserved.0",
4
- "description": "Artifact Share CLI placeholder package.",
5
- "license": "UNLICENSED",
3
+ "version": "0.1.0",
4
+ "description": "Publish and update Artifact Share artifacts from terminals, AI agents, and CI.",
5
+ "homepage": "https://artifactshare.com/connect",
6
+ "license": "Apache-2.0",
7
+ "keywords": [
8
+ "artifact-share",
9
+ "cli",
10
+ "publish",
11
+ "ai-agents"
12
+ ],
6
13
  "type": "module",
14
+ "sideEffects": false,
7
15
  "bin": {
8
- "artifactshare": "dist/index.js"
16
+ "artifactshare": "./dist/index.js"
17
+ },
18
+ "engines": {
19
+ "node": ">=22"
9
20
  },
10
21
  "files": [
11
22
  "dist",
12
- "README.md"
23
+ "skills",
24
+ "README.md",
25
+ "LICENSE"
13
26
  ],
14
27
  "publishConfig": {
15
28
  "access": "public"
29
+ },
30
+ "dependencies": {
31
+ "gunshi": "^0.33.0",
32
+ "undici": "^7.24.8"
33
+ },
34
+ "devDependencies": {
35
+ "@types/node": "24.12.4",
36
+ "tsdown": "^0.22.2",
37
+ "typescript": "6.0.3",
38
+ "vitest": "4.1.7"
39
+ },
40
+ "scripts": {
41
+ "build": "tsdown",
42
+ "test": "pnpm run build && vitest run",
43
+ "typecheck": "tsc --noEmit"
16
44
  }
17
- }
45
+ }
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: artifactshare
3
+ description: Publish, update, and read back shared artifacts with the Artifact Share CLI. Use when the user asks to share an HTML/Markdown report, a static site, or other generated artifacts, or to read back or comment on a shared artifact.
4
+ ---
5
+
6
+ <!-- artifactshare-skill
7
+ version: 2
8
+ managed: true
9
+ -->
10
+
11
+ # Artifact Share CLI
12
+
13
+ Artifact Share hosts shared artifacts (HTML pages, Markdown documents, static
14
+ sites) with versions and comments. The CLI publishes from the terminal and is
15
+ designed for agents: every command supports `--json` with a stable contract.
16
+
17
+ Run commands with `npx --yes @artifactshare/cli`. When unsure about a
18
+ command or flag, read `npx --yes @artifactshare/cli --help` first.
19
+
20
+ ## Output contract
21
+
22
+ - 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.
23
+ - 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.
24
+
25
+ ## Authentication
26
+
27
+ - Use `ARTIFACTSHARE_TOKEN`, `--token`, or a saved profile (`--profile`).
28
+ - `login --profile <name>` prints a sign-in URL and code (device flow); only suggest it in interactive sessions.
29
+ - Check the current state with `whoami --json`, or `doctor --json` for authentication, destination, network, and upload access at once.
30
+
31
+ ## Choosing the destination
32
+
33
+ 1. `projects list --json` shows the projects this account can publish into; `is_default` marks the working-directory default.
34
+ 2. `init --project-id <id> --json` saves a default project for the working directory.
35
+ 3. `publish` resolves the destination from `--project-id`, then the saved default, then `--home` (the unfiled home destination). Without any of these it fails with `destination_required`.
36
+
37
+ ## Core commands
38
+
39
+ ```bash
40
+ npx --yes @artifactshare/cli publish ./report.html --json
41
+ npx --yes @artifactshare/cli publish ./site-dir --project-id <id> --json
42
+ npx --yes @artifactshare/cli update <artifact-id-or-url> ./report.html --json
43
+ npx --yes @artifactshare/cli artifacts get <artifact-id-or-url> --json
44
+ npx --yes @artifactshare/cli download <artifact-id-or-url> --output ./out --json
45
+ npx --yes @artifactshare/cli comments list <artifact-id-or-url> --json
46
+ npx --yes @artifactshare/cli comments post <artifact-id-or-url> --body "<text>" --json
47
+ ```
48
+
49
+ - `publish` accepts a single `.html` / `.md` file or a static-site directory. The returned `share_url` is the link to give the user.
50
+ - `update` adds a new version to an existing artifact; pass the same kind of input (file vs directory) it was created with.
51
+ - When the user gives a title, project name, or URL instead of an ID, run `resolve <value> --json` first and use the returned ID.
52
+ - `artifacts get` reads back single-file sources (use `--offset` to continue truncated reads); `download` saves static-site bundles.
53
+
54
+ ## Upload access
55
+
56
+ If `publish` or `update` fails with `upload_not_allowed`, run
57
+ `request-access --note "<why>" --json` to join the waitlist, then tell the
58
+ user that publishing stays closed until an operator opens it. Do not retry
59
+ publish in a loop.
@@ -0,0 +1,23 @@
1
+ ---
2
+ description: Use the Artifact Share CLI to publish, update, and read back shared artifacts.
3
+ alwaysApply: false
4
+ ---
5
+
6
+ <!-- artifactshare-skill
7
+ version: 2
8
+ managed: true
9
+ -->
10
+
11
+ # Artifact Share CLI
12
+
13
+ Artifact Share hosts shared artifacts (HTML pages, Markdown documents, static
14
+ sites) with versions and comments. Use `npx --yes @artifactshare/cli` to
15
+ publish from the terminal, and read
16
+ `npx --yes @artifactshare/cli --help` before choosing a command.
17
+
18
+ - Always pass `--json`; on failure read `error.code`, `error.hint`, and `error.recovery`.
19
+ - Pick the destination with `projects list --json`, `init --project-id <id>`, or `--project-id`.
20
+ - Publish with `publish <path> --json`; add a version with `update <artifact-id-or-url> <path> --json`.
21
+ - Resolve titles, project names, and URLs to IDs with `resolve <value> --json` before writing.
22
+ - Read back with `artifacts get` / `download`; comment with `comments list` / `comments post`.
23
+ - On `upload_not_allowed`, run `request-access --note "<why>" --json` and tell the user an operator opens publishing; do not retry in a loop.