Artifact Share

Artifact Share CLI リファレンス

CLI バージョン: @artifactshare/cli 0.15.3 · 生成日: 2026-10-11

ターミナルからファイルを共有、更新、読み取り、整理するための公開リファレンスです。

ファイル、フォルダ、静的サイトは share、同じ URL の差し替えは update、読み取りは open または artifacts get、保存は download、レビューは comments、整理は projects、アカウントと設定は profiles と config、agent の準備は skills を使います。REST API の POST /api/shareables/:id/versions?artifact_kind=static_site では、base_version=v1 と繰り返しの delete_path(例: delete_path=data/old.parquet)を指定できます。送信したファイルを差し替え、残りを継承します。基準は現在の公開バージョンに限り、古い場合は 409 version_conflict を返します。基準はエージェントの更新にも必要な期待バージョンを兼ね、expected_version を併記する場合は一致が必要です。削除には基準の指定が必要で、同じパスの送信と削除はできません。削除だけの更新でも index.html または index.md を残してください。バージョンのサイズはファイル一覧の合計、保存容量は重複を除いた実体の合計です。CLI update に継承用のオプションはありません。ブラウザーの共有ページは URL のフラグメント(#)を HTML・Markdown・静的サイトに渡し、フレーム内の変更を URL に反映します。「リンクをコピー」にも含まれるため、絞り込み状態や見出しを共有できます。静的サイトでは入口のページだけが共有 URL のフラグメントを更新し、サブページでは変更しません。CLI のローカルプレビューは対象外です。

以下の command surface は公開 CLI の help から生成されています。構文と受理する option も生成 snapshot から描画します。

公開 command 一覧

append

ローカルの UTF-8 ファイルを既存の単一 HTML / Markdown の末尾へ追記します。

代表例
npm exec --yes --package=@artifactshare/cli -- artifactshare append <artifact-id-or-url> ./section.md --json

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare append <OPTIONS> <artifactIdOrUrl> <path>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost

artifacts

成果物の一覧表示、読み取り、削除を行います。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare artifacts [COMMANDS] <OPTIONS>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost

artifacts delete

delete の別名です。成果物を完全に削除します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare artifacts delete <OPTIONS> <artifactIdOrUrl>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost

artifacts get

成果物とメタデータを読み取ります。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare artifacts get <OPTIONS> <artifactIdOrUrl>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --offset · --include

artifacts list

project または home を含む、アクセスできる成果物を一覧表示します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare artifacts list <OPTIONS>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --project-id · --home · --query · --cursor

changelog

CLI のリリースノートを表示します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare changelog <OPTIONS>

option

--help · --version · --json

comments

成果物のコメントを扱います。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare comments [COMMANDS] <OPTIONS>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost

comments delete

コメントメッセージを削除します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare comments delete <OPTIONS> <artifactIdOrUrl>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --thread-id · --message-id

comments edit

コメントメッセージを編集します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare comments edit <OPTIONS> <artifactIdOrUrl>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --message-id · --body

comments list

コメントのスレッドとメッセージを一覧表示します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare comments list <OPTIONS> <artifactIdOrUrl>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost

comments post

コメントや返信を投稿します。引用位置は、その版をビューアーで開いてから完全一致で確認します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare comments post <OPTIONS> <artifactIdOrUrl>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --body · --reply-to · --quote · --quote-before · --quote-after · --agent

comments reopen

解決済みのコメントスレッドを再開します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare comments reopen <OPTIONS> <artifactIdOrUrl>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --thread-id

comments resolve

コメントスレッドを解決済みにします。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare comments resolve <OPTIONS> <artifactIdOrUrl>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --thread-id

config

ローカル CLI 設定を確認、変更します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare config [COMMANDS] <OPTIONS>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost

config get

user、repository、effective のスコープで設定を読み取ります。

代表例
npm exec --yes --package=@artifactshare/cli -- artifactshare config get home_audience --scope effective --json

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare config get <OPTIONS> [<key>]

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --scope

config set

user または repository のスコープに設定を保存します。

代表例
npm exec --yes --package=@artifactshare/cli -- artifactshare config set home_audience private --scope user --json

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare config set <OPTIONS> <key> <value>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --scope

config unset

スコープに保存した設定を削除します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare config unset <OPTIONS> <key>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --scope

delete

成果物を完全に削除します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare delete <OPTIONS> <artifactIdOrUrl>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost

doctor

トークンの保存先、認証、設定、接続状態を確認します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare doctor <OPTIONS>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost

download

成果物をローカルパスへダウンロードします。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare download <OPTIONS> [<artifactIdOrUrl>]

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --project-id · --output · --force

edit

成果物のタイトル、visibility、共有先、投稿先を編集します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare edit <OPTIONS> <artifactIdOrUrl>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --title · --visibility · --link-expires-at · --retain-versions · --no-link-expiry · --grant-email · --revoke-email · --project-id · --home

--visibility <visibility> private, workspace, project, or link (project requires placement in a project)

--retain-versions <retain-versions> N または all(持ち主のみ)。最新の N 版を残します。publisher の資格で作成したファイル、または publisher のクライアントに割り当てられたファイルでは、publisher の資格で追加した版だけを数え、人が追加した版はすべて残します。対象となる古い版の削除は取り消せません。all で制限を外します。

init

agent を検出し、skill をインストールして初期設定を始めます。

代表例
npm exec --yes --package=@artifactshare/cli -- artifactshare init --json

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare init <OPTIONS>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --project-id · --dry-run

login

通常権限または1プロジェクトに制限した agent 権限で CLI を認証します。

代表例
npm exec --yes --package=@artifactshare/cli -- artifactshare login --profile agent --preset agent --json

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare login <OPTIONS>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --preset · --project

logout

保存済みの認証情報を失効して削除します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare logout <OPTIONS>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost

move

成果物を project または home へ移動します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare move <OPTIONS> <artifactIdOrUrl>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --project-id · --home

open

Artifact Share URL を読み取り、必要なら CLI skill を準備します。

代表例
npm exec --yes --package=@artifactshare/cli -- artifactshare open <artifact-id-or-url> --json

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare open <OPTIONS> <artifactIdOrUrl>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost

preview

ローカルファイルを共有ページと同じ見た目で表示し、コメントできます。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare preview [COMMANDS] <OPTIONS>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost

preview done

標準入力の JSON で結果を一括報告します(世代単位で冪等)。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare preview done <OPTIONS> [<file>]

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --stdin · --session

preview next

未処理のコメントバッチをエージェントへ返します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare preview next <OPTIONS> [<file>]

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --wait · --session

preview reply

スレッドへ返信を追記します。状態は変わりません。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare preview reply <OPTIONS> [<file>]

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --thread · --body · --session

preview start

ローカルの .md / .html を配信します。preview <file> として起動します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare preview start <OPTIONS> [<file>]

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --no-open

preview stop

プレビューを終了します。コメントは保存されたままです。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare preview stop <OPTIONS> [<file>]

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --session · --force

profiles

名前付きの認証 profile を管理します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare profiles [COMMANDS] <OPTIONS>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost

profiles delete

名前付き profile を削除します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare profiles delete <OPTIONS>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost

profiles import-token

CI または手動発行 token を profile に取り込みます。

代表例
printf '%s' "$ARTIFACTSHARE_TOKEN" | npm exec --yes --package=@artifactshare/cli -- artifactshare profiles import-token --profile ci --json

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare profiles import-token <OPTIONS>

option

--help · --version · --json · --base-url · --profile · --allow-plaintext-token-store · --insecure-localhost · --force

profiles list

保存済み profile を一覧表示します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare profiles list <OPTIONS>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost

profiles use

使用する active profile を選択します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare profiles use <OPTIONS> <name>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost

projects

project を管理します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare projects [COMMANDS] <OPTIONS>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost

projects create

project を作成します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare projects create <OPTIONS> <name>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --description · --visibility

projects edit

project の詳細、audience、アーカイブ状態を編集します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare projects edit <OPTIONS> <id>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --name · --description · --visibility · --add-email · --remove-email · --archive · --unarchive

projects list

利用できる project を一覧表示します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare projects list <OPTIONS>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost

resolve

URL、ID、その他の Artifact Share の値を解決します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare resolve <OPTIONS> <value>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost

share

ローカルのファイル、フォルダ、静的サイトを共有します。login --preset agent でログインしたプロファイルでは、--key で再公開する際に --expected-version の指定も必要です(「失敗と復旧」を参照)。

代表例
npm exec --yes --package=@artifactshare/cli -- artifactshare share ./report.html --json

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare share <OPTIONS> <path>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --project-id · --project · --home · --visibility · --link-expires-at · --no-link-expiry · --no-slack-notify · --grant-email · --key · --expected-version

skills

インストール済みの Artifact Share agent skill を管理します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare skills [COMMANDS] <OPTIONS>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost

skills ensure

検出した tool に skill があることを確認します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare skills ensure <OPTIONS>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --tool · --scope · --dry-run

skills install

選択した tool に skill をインストールします。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare skills install <OPTIONS>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --tool · --scope · --dry-run · --force

skills list

skill がインストールされた tool を一覧表示します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare skills list <OPTIONS>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost

skills remove

tool からインストール済み skill を削除します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare skills remove <OPTIONS>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --tool · --scope · --dry-run

skills update

インストール済み skill を更新します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare skills update <OPTIONS>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --tool · --scope · --dry-run · --force

update

既存の共有 URL の背後に新しい版をアップロードします。login --preset agent でログインしたプロファイルでは --expected-version の指定も必要です(「失敗と復旧」を参照)。任意の --label で変更内容のメモを付けられます。NFC 正規化と前後の Unicode 空白の除去後、1〜80 コードポイントが必要です。内部の空白と大文字小文字は保持します。文字・結合文字・数字・句読点・記号・空白・結合絵文字を許可します。省略時はラベルなしの版を作成し、作成後のラベルは変更できません。成功時の JSON は data.version.label に保存されたラベルを返し、省略時は null を返します。data.version.number は Viewer の版番号(v{number})と一致します。古いサーバーではこのフィールドが省略される場合があります。artifacts get --include versions で履歴を取得できます。--label の値が空、制御文字を含む、不正、不可視文字のみ、または指定が重複している場合は、認証前にローカルで validation_failed エラーになります。

代表例
npm exec --yes --package=@artifactshare/cli -- artifactshare update <artifact-id-or-url> ./report.html --expected-version <version-id> --json

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare update <OPTIONS> <artifactIdOrUrl> <path>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost · --label · --expected-version

whoami

active account と workspace を表示します。

構文

npm exec --yes --package=@artifactshare/cli -- artifactshare whoami <OPTIONS>

option

--help · --version · --json · --base-url · --token · --profile · --allow-plaintext-token-store · --insecure-localhost

--json、pipe、その他の非対話実行では、成功を schema_version: 2、ok: true、command、data の共通 envelope として stdout に出します。失敗は schema_version: 2、ok: false、command、error として stderr に出します。終了コード 0 は成功、1 は command の失敗、130 はキャンセルです。auth_required には verification URL と user code が含まれるので、承認後に同じ command を再実行します。

edit は --visibility private|workspace|project|link を指定できます。project の共有範囲には、編集後の保存先がプロジェクトであることが必要です。必要なら同じコマンドに --project-id <id> を指定します。home での明示的な --visibility project(--home との併用を含む)は変更せずに拒否します。プロジェクトの成果物を home に移す場合、project を明示指定していなければ private になります。 project への投稿はその project の audience に届きます。投稿先を指定しない share は home に投稿します。home_audience は目的別に使い分けます。個人の安全な既定値には user、一緒に使う全員が合意した方針には repository、一回限りの指定には明示 --visibility を使い、config get home_audience --scope effective --json で実効値を確認します。正本の設定は home_audience で、private は自分だけ、workspace は社内全員です。repository 設定は .artifactshare/config.json、user 設定は user config directory に保存します。home の解決順は repository の home_audience、repository の default_artifact_visibility、user の home_audience、user の default_artifact_visibility、製品既定 workspace です。default_artifact_visibility は互換 alias の補足に限ります。default_project_visibility は projects create 用の独立した既定値です。--grant-email は project の個別共有先を追加するだけで、project の visibility を暗黙に変更しません。

auth_required または token_invalid なら login か有効な profile token の import を行い、同じ command を再実行します。validation_failed は構文と option を確認します。target_not_found は URL または ID を解決し直します。self_upload_disabled は Google または Microsoft でログインして、同じ command を再実行します。network_failed は base URL を確認して、投稿先を変えずに再試行します。login --preset agent でログインして expected_version_required が返された場合は、前回成功した share または update の出力にある data.version.id を --expected-version に指定して、update または share --key を再実行します。前回の出力がない場合、単一ファイルの HTML・Markdown では artifacts get <target> --json が現在のバージョンを data.version_id として返します。静的サイトでは download <target> --json が data.version.id として返します。返された現在の内容(data.content、静的サイトではダウンロードしたファイル)を確認し、編集元の内容と異なる場合は、その現在の内容に変更を適用し直します。返された値を --expected-version に指定します。