Skip to content
Build with Mammoth › CLI reference: open the docs menu

mammoth external-key

Generated from mammoth-cli 2.4.2, released 2026-11-02: mammoth schema list, mammoth capability list and the CLI's own --help. Do not edit by hand; run npm run docs:capabilities.

Manage LLM provider keys (OpenAI, Anthropic, etc.) used by AI features. 4 commands.

Every command also takes the global flags (--output, --yes, --confirm, --dry-run, --input, --profile, ...), which are not repeated below. --input takes a JSON or YAML document of the input fields; mammoth schema get COMMAND_ID prints a command's full input schema.

Confirmation. Commands marked --yes --confirm TARGET or --yes always need those flags, even at a terminal: they never prompt. Commands marked "--yes or prompt" ask at an interactive terminal (table output, no --no-input) and otherwise need --yes. --dry-run skips confirmation and sends nothing.

Summary

CommandWhat it doesEffectConfirmation
external-key createCreate an external (LLM provider) API key.High impact--yes --confirm TARGET
external-key deletePermanently delete one LLM provider key by id. Prompt or '--yes' required.Destructive--yes or prompt
external-key getGet one LLM provider key by id.Read—
external-key listList the workspace's LLM provider keys (OpenAI, Anthropic, etc.).Read—

external-key commands

mammoth external-key create

Create an external (LLM provider) API key.

mammoth external-key create --input /private/path/request.json --yes
NamePassed asRequiredDefaultTypeNotes
key_type--input fieldyes—ExternalKeyTypeOne of open_ai, anthropic, gemini, grok.
key_name--input fieldyes—str
secure_key--input fieldyes—str
description--input fieldno—str
model_id--input fieldno—str
model_settings--input fieldno—ModelConfigSpec
  • Effect: High impact, scope workspace · Confirmation: always --yes --confirm TARGET, even at a terminal (TARGET is the exact id or name acted on; the confirmation_required error's hint names it)
  • Preconditions: secure_key is a secret_fields entry: --input FILE, mode 0600 (shell) or the --input JSON's secure_key field (embedded), behind the confirmation card; never in a reply, note, checkpoint or run log. Response is recursively redacted.
  • Id: external-key.create · Result: ExternalKeyCreateResult · Backed by: SDK mammoth.api.external_keys.ExternalKeysAPI.create, API POST /workspaces/{workspace_id}/external_keys (AddExternalKey)

mammoth external-key delete

Permanently delete one LLM provider key by id. Prompt or '--yes' required.

mammoth external-key delete 123 --yes
NamePassed asRequiredDefaultTypeNotes
KEY_IDpositionalyes—intID of the key.
  • Effect: Destructive, scope workspace · Confirmation: --yes, or answer the prompt at an interactive terminal
  • Preconditions: Immutable ID confirmation.
  • Id: external-key.delete · Result: ExternalKeyDeleteResult · Backed by: SDK mammoth.api.external_keys.ExternalKeysAPI.delete, API DELETE /workspaces/{workspace_id}/external_keys/{key_id} (DeleteExternalKey)

mammoth external-key get

Get one LLM provider key by id.

mammoth external-key get 123
NamePassed asRequiredDefaultTypeNotes
KEY_IDpositionalyes—intID of the key.
  • Effect: Read, scope workspace · Confirmation: none
  • Preconditions: Required inputs: KEY_ID.
  • Id: external-key.get · Result: ExternalKeyGetResult · Backed by: SDK mammoth.api.external_keys.ExternalKeysAPI.get, API GET /workspaces/{workspace_id}/external_keys/{key_id} (GetExternalKey)

mammoth external-key list

List the workspace's LLM provider keys (OpenAI, Anthropic, etc.).

mammoth external-key list
  • Effect: Read, scope workspace · Confirmation: none · Pages: single_page
  • Id: external-key.list · Result: ExternalKeyListResult · Backed by: SDK mammoth.api.external_keys.ExternalKeysAPI.list, API GET /workspaces/{workspace_id}/external_keys (GetKeysByWorkspaceId)

Report an issue · support@mammoth.io