@artifactshare/cli 0.1.1 → 0.1.3

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.1",
3
+ "version": "0.1.3",
4
4
  "description": "Publish and update Artifact Share artifacts from terminals, AI agents, 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 artifacts with the Artifact S
4
4
  ---
5
5
 
6
6
  <!-- artifactshare-skill
7
- version: 2
7
+ version: 5
8
8
  managed: true
9
9
  -->
10
10
 
@@ -17,6 +17,10 @@ designed for agents: every command supports `--json` with a stable contract.
17
17
  Run commands with `npx --yes @artifactshare/cli`. When unsure about a
18
18
  command or flag, read `npx --yes @artifactshare/cli --help` first.
19
19
 
20
+ Use the CLI whenever the artifact already exists as a local file or folder.
21
+ The remote MCP tools accept HTML or Markdown source strings; they cannot read
22
+ paths like `/Users/.../report.html` from the user's filesystem.
23
+
20
24
  ## Output contract
21
25
 
22
26
  - 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.
@@ -24,8 +28,16 @@ command or flag, read `npx --yes @artifactshare/cli --help` first.
24
28
 
25
29
  ## Authentication
26
30
 
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.
31
+ - In non-interactive environments (agents, CI, scripts), ask the user to issue
32
+ an API token at `https://artifactshare.com/settings/tokens`, then use
33
+ `ARTIFACTSHARE_TOKEN` or `--token` for normal commands.
34
+ - `login --profile <name>` prints a sign-in URL and code (device flow); only
35
+ suggest it in interactive sessions. Do not pass API tokens to `login`.
36
+ - To keep using an issued token as a named profile without TTY or browser
37
+ login, pipe it on standard input:
38
+ `printf '%s' "$TOKEN" | npx --yes @artifactshare/cli profiles import-token --profile <name> --json`.
39
+ Use `--allow-plaintext-token-store` only on a trusted machine without a native token store.
40
+ - Saved profiles (`--profile`) are created by `login` or `profiles import-token`.
29
41
  - Check the current state with `whoami --json`, or `doctor --json` for authentication, destination, network, and upload access at once.
30
42
 
31
43
  ## Choosing the destination
@@ -4,7 +4,7 @@ alwaysApply: false
4
4
  ---
5
5
 
6
6
  <!-- artifactshare-skill
7
- version: 2
7
+ version: 5
8
8
  managed: true
9
9
  -->
10
10
 
@@ -15,7 +15,14 @@ sites) with versions and comments. Use `npx --yes @artifactshare/cli` to
15
15
  publish from the terminal, and read
16
16
  `npx --yes @artifactshare/cli --help` before choosing a command.
17
17
 
18
+ Use the CLI for local files and folders. The remote MCP tools accept HTML or
19
+ Markdown source strings; they cannot read paths like `/Users/.../report.html`
20
+ from the user's filesystem.
21
+
18
22
  - Always pass `--json`; on failure read `error.code`, `error.hint`, and `error.recovery`.
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
+ - 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
+ - Use `login --profile <name>` only in an interactive terminal where the user can approve the browser device flow.
19
26
  - Pick the destination with `projects list --json`, `init --project-id <id>`, or `--project-id`.
20
27
  - Publish with `publish <path> --json`; add a version with `update <artifact-id-or-url> <path> --json`.
21
28
  - Resolve titles, project names, and URLs to IDs with `resolve <value> --json` before writing.