Skip to main content
A complete reference for the artifacts command. New to the CLI? Start with the CLI guide for setup, auth, and output behavior.
Each command maps directly to a REST endpoint. Run artifacts schema for the machine-readable version of this page.

Global Flags

FlagEnvPurpose
--base-url <url>AGENT_ARTIFACTS_BASE_URLAPI base URL
--web-url <url>AGENT_ARTIFACTS_WEB_URLWeb app URL for browser login
--token <token>AGENT_ARTIFACTS_TOKENBearer token
--token-stdinRead bearer token from stdin
--format <json|text>AGENT_ARTIFACTS_FORMATOutput format
--ndjsonStream list results as NDJSON
--quietSuppress progress messages on stderr
--no-inputAGENT_ARTIFACTS_NO_INPUT=1Disable prompts and browser login
--debugAGENT_ARTIFACTS_DEBUG=1Print stack traces
--dry-runPreview mutating commands without calling the API
--versionPrint CLI version

Discovery

CommandPurpose
artifacts schemaPrint machine-readable command catalog
artifacts healthCall GET /health
artifacts whoamiCall GET /api/profile/me

Auth and Profile

artifacts login stores bearer tokens in the OS credential store: secret-tool/libsecret on Linux, Keychain on macOS, and Credential Manager on Windows. The local credentials JSON file stores only non-secret metadata.
CommandPurpose
artifacts loginBrowser OAuth login and secure credential storage
artifacts logoutClear local credentials from the OS store
artifacts profile getRead current profile
artifacts profile set-username --username <username>Claim username and personal workspace slug

API Keys

CommandAPI
artifacts keys listGET /api/api-keys
artifacts keys create --name <name> --scopes <scopes>POST /api/api-keys
artifacts keys revoke --api-key-id <id>DELETE /api/api-keys/:apiKeyId
Valid scopes:
artifacts:read
artifacts:create
artifacts:update
artifacts:delete
artifacts:share
artifacts:access:read
artifacts:access:write
agents:manage

Projects

CommandAPI
artifacts project list --limit 50GET /api/profile/projects
artifacts project create --json '{...}'POST /api/projects
artifacts project slug-availability --owner <owner> --slug <slug>GET /api/projects/slug-availability/:owner/:slug
Create body:
{
  "ownerUsername": "alice",
  "slug": "default",
  "title": "Default",
  "description": "Optional",
  "icon": "*"
}

Workspaces

CommandAPI
artifacts workspace listGET /api/workspaces
artifacts workspace members --workspace-id <id>GET /api/workspaces/:workspaceId/members
artifacts workspace invite --workspace-id <id> --json '{...}'POST /api/workspaces/:workspaceId/invitations
artifacts workspace revoke-invite --invitation-id <id>POST /api/workspace-invitations/:invitationId/revoke
artifacts workspace audit --workspace-id <id>GET /api/workspaces/:workspaceId/audit-events
Invitation body:
{
  "email": "teammate@example.com",
  "role": "member"
}

Artifacts

CommandAPI
artifacts push --owner <owner> --project-slug <slug> --file <path>POST /api/artifacts
artifacts artifact list --limit 50GET /api/profile/artifacts
artifacts artifact create --json '{...}'POST /api/artifacts
artifacts artifact get --artifact-id <id>GET /api/artifacts/:artifactId
artifacts artifact update --artifact-id <id> --json '{...}'POST /api/artifacts/:artifactId/versions
artifacts artifact restore --artifact-id <id> --version <n>POST /api/artifacts/:artifactId/versions/:versionNumber/restore
artifacts artifact delete --artifact-id <id> --yesDELETE /api/artifacts/:artifactId
artifacts artifact content --artifact-id <id> --version <n>GET /api/artifacts/:artifactId/content
artifacts artifact versions --artifact-id <id>GET /api/artifacts/:artifactId/versions
artifacts artifact diff --artifact-id <id> --from <n> --to <n>GET /api/artifacts/:artifactId/diff
artifacts artifact slug-availability --owner <owner> --project-slug <project> --slug <slug>GET /api/artifacts/slug-availability/:owner/:projectSlug/:slug
artifacts artifact url-preview --owner <owner> --project-slug <project> --slug <slug>GET /api/slug-preview/:owner/:projectSlug/:slug
artifacts artifact access get --artifact-id <id>GET /api/artifacts/:artifactId/access
artifacts artifact access set --artifact-id <id> --json '{...}'PATCH /api/artifacts/:artifactId/access
Create body:
{
  "ownerUsername": "alice",
  "projectSlug": "default",
  "slug": "readme",
  "type": "md",
  "title": "Readme",
  "description": "Optional",
  "content": "# Hi",
  "changelog": "Initial publish",
  "access": {
    "publicView": true,
    "publicEdit": false
  }
}
Update body:
{
  "content": "# Updated",
  "changelog": "Optional",
  "expectedLatestVersion": 2
}
Access body:
{
  "publicView": false,
  "publicEdit": false,
  "viewerEmails": ["teammate@example.com"]
}

Paths

CommandAPI
artifacts path project --owner <owner> --project-slug <slug>GET /api/by-path/:owner/:projectSlug
artifacts path artifact --owner <owner> --project-slug <project> --slug <slug>GET /api/by-path/:owner/:projectSlug/:slug
CommandAPI
artifacts share create --artifact-id <id> --role viewerPOST /api/artifacts/:artifactId/share-links
artifacts share list --artifact-id <id>GET /api/artifacts/:artifactId/share-links
artifacts share revoke --share-link-id <id>POST /api/share-links/:shareLinkId/revoke
artifacts audit list --artifact-id <id> --limit 50GET /api/audit-events
Share link body:
{
  "role": "viewer",
  "expiresAt": "2026-06-30T12:00:00.000Z"
}