@artifactshare/cli 0.11.1 → 0.11.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.11.1",
3
+ "version": "0.11.3",
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
  "repository": {
@@ -65,14 +65,14 @@ contain `$`, spaces, `*`, or `?`; use single quotes such as
65
65
 
66
66
  ## Authentication
67
67
 
68
- - In non-interactive environments (agents, CI, scripts), ask the user to issue
69
- an API token at `https://artifactshare.com/settings/tokens`, then use
70
- `ARTIFACTSHARE_TOKEN` or `--token` for normal commands.
71
68
  - `login --profile <name> --preset agent --json` starts device login for a
72
69
  project-scoped agent profile. Omit `--preset` for unrestricted login. It may
73
70
  open the OS browser for approval. Use it when a user is present; the pending
74
71
  event on stderr includes `browser_open`. Do not pass API tokens to `login`.
75
72
  Profiles created by `login` renew expired CLI sessions automatically.
73
+ - In unattended CI or scripts without browser approval, ask the user to issue
74
+ an API token at `https://artifactshare.com/settings/tokens`, then use
75
+ `ARTIFACTSHARE_TOKEN` or `--token` for normal commands.
76
76
  - `logout --profile <name> --json` revokes a device-login refresh credential
77
77
  before removing it locally and leaves profile metadata in `config.json`.
78
78
  If remote revoke fails, the local credential is kept and logout fails.
@@ -80,10 +80,15 @@ contain `$`, spaces, `*`, or `?`; use single quotes such as
80
80
  - To keep using an issued token as a named profile without TTY or browser
81
81
  login, pipe it on standard input:
82
82
  `printf '%s' "$TOKEN" | npx --yes @artifactshare/cli profiles import-token --profile <name> --json`.
83
+ Bot tokens (`asb_` prefix, issued by a workspace admin) use the same command; the first
84
+ refresh consumes the displayed token, overwriting an existing profile credential requires
85
+ `--force`, and a revoked or superseded bot token fails with `bot_token_invalid` (ask the
86
+ admin to reissue).
83
87
  Imported API-token profiles are not renewed by the CLI.
84
88
  Use `--allow-plaintext-token-store` only on a trusted machine without a native token store.
85
- - Check the current state with `whoami --json`, or `doctor --json` for
86
- authentication, destination, network, upload access, and skill update status.
89
+ That fallback is mode `0600` on POSIX and unavailable on Windows, where saved profiles require Credential Manager.
90
+ - Check the current state with `whoami --json`, or `doctor --json` for token
91
+ storage, authentication, destination, network, upload access, and skill update status.
87
92
 
88
93
  ## Share
89
94
 
@@ -99,6 +104,9 @@ npx --yes @artifactshare/cli share ./site-dir --project-id <id> --json
99
104
  ```
100
105
 
101
106
  - `share` accepts a single `.html` / `.md` file or a static-site directory.
107
+ If a successful result contains `data.warnings`, tell the user each warning
108
+ explicitly. `slack_reauthorization_required` means project Slack
109
+ notifications are not being delivered until the channel is reauthorized.
102
110
  In JSON output, give the user `data.artifact.url`; the artifact ID is
103
111
  `data.artifact.id`.
104
112
  Do not rerun `share` just to inspect the JSON shape: without `--key`, each
@@ -49,13 +49,16 @@ contain `$`, spaces, `*`, or `?`; use single quotes such as
49
49
  exactly one of `--link-expires-at <RFC3339 UTC>` or `--no-link-expiry`; omit
50
50
  both to use the workspace default on share or preserve the current expiry on
51
51
  edit. Results expose `link_expires_at` as a UTC timestamp or `null`.
52
- - For an agent with a user present, prefer `login --preset agent --profile <name> --json` and let the user select one project during browser approval. In unattended 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`.
53
- - 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`. Imported API-token profiles are not renewed by the CLI. Add `--allow-plaintext-token-store` only on a trusted machine without a native token store.
52
+ - For an agent with a user present, use `login --preset agent --profile <name> --json` and let the user select one project during browser approval. In unattended CI or scripts without browser approval, 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`.
53
+ - 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`. Imported API-token profiles are not renewed by the CLI. Bot tokens (`asb_` prefix) import through the same command as rotating refresh credentials; overwriting an existing profile credential needs `--force`, and a rejected bot token reports `bot_token_invalid` (recovery is an admin reissue). Add `--allow-plaintext-token-store` only on a trusted machine without a native token store. That fallback is mode `0600` on POSIX and unavailable on Windows, where saved profiles require Credential Manager.
54
54
  - Use `login --profile <name> --json` when a user is present for browser approval. The pending event on stderr includes `browser_open`. Profiles created by `login` renew expired CLI sessions automatically.
55
55
  - Use `logout --profile <name> --json` to revoke a device-login credential before removing it locally; this keeps profile metadata. API-token profiles are removed locally only and their server token is not revoked.
56
56
  - Switch profiles with `profiles use <name> --json`; list with `profiles list --json`; remove a profile entry and its credential with `profiles delete <name> --json`.
57
57
  - 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.
58
58
  - Share with `share <path> --json`. In JSON output, give the user `data.artifact.url`; the artifact ID is `data.artifact.id`. Do not rerun `share` just to inspect the JSON shape: without `--key`, each successful run creates a new artifact. Posting to a project delivers to the audience defined by that project. Pick it with `--project-id <id>` or `--project <name>` (by exact name), or use the saved default. With no destination, share posts to home. Choose `home_audience` by purpose: use `config set home_audience private --scope user --json` for a personal safe default in this CLI environment, use `--scope repository` only for a policy agreed by all participants, and use `--visibility private|workspace|link` for one home post. For link sharing, pass exactly one of `--link-expires-at <RFC3339 UTC>` or `--no-link-expiry`; omit both to use the workspace default. Confirm the resolved audience with `config get home_audience --scope effective --json`; `--grant-email` does not change the resolved default.
59
+ - If a successful `share` result contains `data.warnings`, tell the user each
60
+ warning explicitly. `slack_reauthorization_required` means project Slack
61
+ notifications are not being delivered until the channel is reauthorized.
59
62
  - For new projects, pass `projects create <name> --visibility private|workspace`; persistent project defaults are documented in `projects create --help`. The complete `config --help` reference covers the canonical `home_audience`, user/repository/effective scopes, and resolution. `default_artifact_visibility` is a compatibility alias; `default_project_visibility` is the advanced project-creation default. Home resolution checks repository then user settings, including the alias at each scope, then product default `workspace`. Keyless `config get --json` returns only `home_audience`; pass an explicit key for either other setting. These settings do not change update, edit, Web, or MCP defaults.
60
63
  - 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.
61
64
  - To keep an existing share URL, do not use `share --artifact-id`; add a version with `update <artifact-id-or-url> <path> --json`. `update` does not change title, visibility, viewers, or placement.
@@ -76,5 +79,5 @@ contain `$`, spaces, `*`, or `?`; use single quotes such as
76
79
  - Manage projects: `projects list --json`, `projects create <name> --json` (uses `default_project_visibility` when saved, otherwise `workspace`; pass `--visibility private` for a confidential project), `projects edit <id>` for name, description, visibility, audience (`--add-email`/`--remove-email`), and archive state (`--archive`/`--unarchive`).
77
80
  - Save a default project with `init --project-id <id> --json`. Preview setup with `init --dry-run --json`.
78
81
  - Manage skills: `skills ensure --tool auto --json` detects Claude Code, Codex, or Cursor and installs or updates user-scope skills; Cursor project scope needs `skills install --tool cursor --scope project --json`. Use `skills install --tool cursor --scope user --json` for the Cursor user-scope skill explicitly. Project scope is opt-in via `skills install --tool <tool> --scope project --json`. `skills update --json` updates installed managed skills; `--force` overwrites unmanaged files on install.
79
- - Check the current state with `whoami --json` or `doctor --json` for authentication, destination, network, upload access, and skill update status.
82
+ - Check the current state with `whoami --json` or `doctor --json` for token storage, authentication, destination, network, upload access, and skill update status.
80
83
  - First-time setup: `npx --yes @artifactshare/cli init --json` detects Claude Code, Codex, or Cursor, installs or updates user-scope skills, and reports the next steps (sign in, then share). For Cursor project scope, run `skills install --tool cursor --scope project --json` explicitly.