Secrets exist but are never observable.
Every command in Phantom Vault 0.1.0. Run phantom <command> --help for the full options on any of them, or phantom help for the top-level list.
Two kinds of command. Most commands never reveal a secret's value, so they're safe for an AI agent to call. A few — get and edit — expose plaintext, so they're gated to a real interactive terminal (TTY). A scripted or agent-driven phantom get is refused.
Safe for an AI agent (or any script) to call — none of these hand back a secret's plaintext.
| Command | What it does | Example |
|---|---|---|
add | Add a secret. The value is entered hidden, or pulled from an existing environment variable. | phantom add API_KEYphantom add DB_URL --from-env MY_VAR |
list | List all secret names. Never shows values. | phantom list |
show | Show a masked secret — the last 4 characters only. | phantom show API_KEY --masked |
run | Run a command with secrets injected as environment variables for that one process. | phantom run -s API_KEY -- curl https://api.example.com |
rotate | Rotate a secret — replace its value with a new one (prompted, hidden). | phantom rotate API_KEY |
import | Import secrets from a .env file. | phantom import .env |
canary | Manage canary (honeypot) secrets — create, list, delete. | phantom canary create BACKUP_AWS_KEY --pattern aws-access-key |
audit | View the audit log (defaults to the last 20 entries). | phantom audit --last 20 |
health | Check vault health status. | phantom health |
These expose secret material or require a person at the keyboard. They need an interactive terminal and are never available to an AI agent.
| Command | What it does | Example |
|---|---|---|
get | Print a secret's full value. Requires authentication and a real terminal — a piped/scripted/agent call is refused. | phantom get API_KEY |
edit | Open the whole vault in $EDITOR as an encrypted notepad (see below). Exposes every value in plaintext, so it's human-only. | phantom edit |
passwd | Change the master password. Re-encrypts the entire vault with the new key. | phantom passwd |
init | Initialize a new vault. Add --biometric for Touch ID unlock on macOS. | phantom initphantom init --biometric |
Administrative commands. They don't reveal values, but they change how the vault behaves.
| Command | What it does | Example |
|---|---|---|
biometric | Manage biometric (Touch ID) unlock — status, enable, disable. | phantom biometric enable |
namespace | Manage namespaces for secret isolation — list, create, use, delete. | phantom namespace use work |
remove | Remove a secret from the vault. | phantom remove API_KEY |
policy | Manage security policies — show, set, reset. | phantom policy show |
guardrail | Set monthly spending caps on credentials — set, list, remove, status. | phantom guardrail set openai-key --cap 50 --provider openai |
mcp | Manage the MCP server for Claude Code — install, uninstall, status. | phantom mcp install |
update | Update phantom to the latest version from GitHub releases. | phantom update |
help | Print help for phantom, or for any single command. | phantom helpphantom add --help |
phantom edit opens your entire vault in $EDITOR as a plain KEY=VALUE list — one secret per line — so you can add, change, or delete many secrets in a single pass. When you save and close the editor, Phantom re-encrypts the whole vault. Remove a line to delete that secret; lines starting with # are comments.
~ % phantom edit # opens $EDITOR with every secret in KEY=VALUE form: OPENAI_API_KEY=sk-... STRIPE_SECRET_KEY=sk_live_... DATABASE_URL=postgres://... # edit a line to update it, delete a line to remove that secret, # add a line to create one, then save to re-encrypt the vault. ~ % EDITOR=nano phantom edit # use a specific editor
Human-only. Because it lays every secret out in plaintext inside your editor, phantom edit requires an interactive terminal and is never exposed to an AI agent — same guarantee as phantom get.
On Mac: Press Cmd + Space, type "Terminal", press Enter.
On Linux: Press Ctrl + Alt + T
~ % curl -fsSL https://phantomvault.riscent.com/install | bash Detecting system... ✓ macOS 15.3 (Apple Silicon) Downloading phantom + vault-mcp (0.1.0)... ✓ Downloaded Installing to /usr/local/bin ... ✓ Installed phantom + vault-mcp to /usr/local/bin 🔐 Phantom Vault is ready. Run 'phantom init' to create your vault.
What the installer does: downloads the phantom CLI and the vault-mcp server as real binaries into /usr/local/bin, so phantom works from any directory. Your vault lives at ~/.phantom-vault (an absolute path, found no matter where you run from). On a fresh machine, phantom init sets up a new vault. On a machine that already has one, phantom init reports "Vault already exists" and leaves it untouched — you just unlock it (run phantom). It never silently creates a second vault over an existing one.
~ % phantom --version phantom 0.1.0
~ % phantom init Creating new vault at ~/.phantom-vault Enter master password: •••••••••••••••• Confirm master password: •••••••••••••••• Vault created successfully! Next steps: phantom add <name> Add a secret phantom mcp install Enable Claude Code integration phantom biometric enable Enable Touch ID unlock
~ % phantom init --biometric Creating new vault at ~/.phantom-vault Enter master password: •••••••••••••••• Confirm master password: •••••••••••••••• Enabling biometric unlock... Touch ID enabled for vault unlock. Vault created successfully!
What just happened? Phantom created an encrypted vault using AES-256-GCM with Argon2id key derivation. With --biometric, your password is stored in macOS Keychain protected by Touch ID.
~ % phantom add OPENAI_API_KEY Enter value for OPENAI_API_KEY: •••••••••••••••••••••••••••••••• ✓ Added OPENAI_API_KEY
~ % phantom mcp install Installing MCP server for Claude Code... ✓ Config written to ~/Library/Application Support/Claude/claude_desktop_config.json Done. Restart Claude Code, then ask: "What secrets do I have in my vault?"
~ % phantom add STRIPE_SECRET_KEY Enter value: •••••••••••••••••••••••• ✓ Added STRIPE_SECRET_KEY
~ % export TEMP_KEY="sk_live_abc123" ~ % phantom add STRIPE_KEY --from-env TEMP_KEY ✓ Added STRIPE_KEY ~ % unset TEMP_KEY
~ % phantom add TEMP_TOKEN --expires 7d Enter value: •••••••••••• ✓ Added TEMP_TOKEN (expires in 7 days)
~ % phantom list Namespace: default NAME CREATED EXPIRES ACCESS OPENAI_API_KEY 2 days ago never 12 times STRIPE_SECRET_KEY 1 day ago never 3 times DATABASE_URL 5 hours ago never 8 times
Notice: Values are never shown. Even phantom list only shows names.
~ % phantom show STRIPE_SECRET_KEY --masked STRIPE_SECRET_KEY: ••••••••••••xyz9
~ % phantom mcp install
After restarting Claude Code, your AI gets these tools:
vault_list — See secret names (never values)vault_exists — Check if a secret existsvault_masked — See last 4 charactersvault_run — Run commands with secrets injectedvault_health — Check expiring secretsvault_rotate — Request rotation (requires your approval)# You say: "Deploy my app to Railway using my RAILWAY_TOKEN" # Claude runs: vault_run(keys: ["RAILWAY_TOKEN"], command: "railway up") # The output sanitizer is designed to redact a leaked token as: Deploying with token [REDACTED:RAILWAY_TOKEN]...
Honest status: the output sanitizer and the network-egress jail are in the codebase but not yet independently verified — treat them as planned, under audit. What is verified today: encryption at rest (AES-256-GCM + Argon2id), mlock memory, the Landlock filesystem sandbox on phantom run, the phantom get non-TTY read guard, canary secrets, and the audit log.
~ % phantom run -s OPENAI_API_KEY -- python my_script.py ✓ Running with 1 secret injected (your script runs with OPENAI_API_KEY in its environment)
~ % phantom run -s DATABASE_URL -s REDIS_URL -- node server.js
Security: The secret only exists in that subprocess. When it exits, it's gone. The subprocess runs under a Landlock filesystem sandbox (verified). Automatic output scanning/redaction is designed but not yet independently verified — treat it as planned.
Keep work and personal secrets separate:
~ % phantom namespace create work ~ % phantom namespace use work ~ % phantom add COMPANY_API_KEY ~ % phantom namespace use default # switch back
~ % phantom health Vault Status: Healthy Secrets: 5 total Expiring soon: 1 - TEMP_TOKEN (expires in 2 days) Last audit entry: 3 minutes ago Canary status: OK
~ % phantom rotate STRIPE_SECRET_KEY Enter new value: •••••••••••••••••••••••• ✓ Rotated STRIPE_SECRET_KEY (v1 → v2) ✓ Old value securely erased
~ % phantom audit --last 10 TIME EVENT SECRET TOOL 2026-02-27 14:23:01 accessed OPENAI_API_KEY vault_run 2026-02-27 14:20:15 accessed DATABASE_URL vault_run 2026-02-27 13:05:44 added STRIPE_SECRET_KEY cli 2026-02-27 12:00:00 vault_opened - cli
Every access is written to the audit log. A tamper-evident HMAC-chained log is designed and in the codebase, but not yet independently verified — treat the tamper-evidence as planned.
Honeypot secrets that alert you if something tries to use them:
~ % phantom canary create BACKUP_AWS_KEY --pattern aws-access-key ✓ Created canary BACKUP_AWS_KEY Looks like: AKIA••••••••••••XXXX ⚠ Alert will trigger if this is ever accessed
On macOS, you can unlock your vault with Touch ID instead of typing your password every time.
~ % phantom biometric status Biometric Authentication Status ================================ [OK] Touch ID is available [OK] Biometric unlock is enabled for this vault
~ % phantom biometric enable Enter master password to enable biometric: •••••••••••• Biometric unlock enabled! You can now unlock with Touch ID.
~ % phantom biometric disable Biometric unlock disabled. You will need to use your password to unlock the vault.
How it works: Your master password is stored in macOS Keychain, protected by Touch ID. When you authenticate with Touch ID, the password is retrieved from Keychain and used to unlock the vault. The password never leaves the secure enclave.
Control which tools can access your secrets and set usage restrictions.
~ % phantom policy show Security Policy: ================ require_confirmation = ["shell_exec"] (Using default policy)
# my-policy.toml allowed_tools = ["exec_sql", "http_request", "vault_run"] blocked_tools = ["shell_exec"] require_confirmation = ["write_file"] rate_limit = 100 # max 100 secret accesses per hour [time_restrictions] enabled = true start_hour = 9 end_hour = 18 timezone = "America/New_York"
~ % phantom policy set my-policy.toml Security policy updated from 'my-policy.toml' New policy: allowed_tools = ["exec_sql", "http_request", "vault_run"] blocked_tools = ["shell_exec"] ...
~ % phantom policy reset Reset security policy to defaults? [y/N]: y Security policy reset to defaults.
Policy Priority: blocked_tools takes precedence over allowed_tools. If a tool is in both lists, it will be blocked.
# Setup phantom init # Create vault phantom init --biometric # Create vault + enable Touch ID phantom mcp install # Connect to Claude # Secrets phantom add SECRET_NAME # Add secret (interactive) phantom add KEY --from-env VAR # Add from environment phantom list # List all secrets phantom show NAME --masked # Show last 4 chars phantom get NAME # Get full value (TTY only) phantom remove NAME # Delete secret phantom rotate NAME # Rotate secret phantom import .env # Import from .env file # Running commands phantom run -s KEY -- cmd # Inject secret into command # Biometric (macOS) phantom biometric status # Check Touch ID status phantom biometric enable # Enable Touch ID phantom biometric disable # Disable Touch ID # Namespaces phantom namespace list # List namespaces phantom namespace create NAME # Create namespace phantom namespace use NAME # Switch namespace phantom namespace delete NAME # Delete namespace # Canary secrets phantom canary create NAME # Create honeypot secret phantom canary list # List canaries phantom canary delete NAME # Delete canary # Security policies phantom policy show # View current policy phantom policy set FILE # Apply policy from file phantom policy reset # Reset to defaults # Bulk edit (human-only, opens $EDITOR) phantom edit # Edit whole vault as KEY=VALUE, re-encrypt on save # Spending caps phantom guardrail set NAME --cap 50 --provider openai # Cap monthly spend phantom guardrail status # Usage vs cap for every guardrail # Maintenance phantom health # Check vault health phantom audit --last N # View last N audit entries phantom passwd # Change master password (re-encrypts vault) phantom update # Update phantom to latest version