Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

1Password CLI

$ op Official High Risk
1Password · Security & Secrets · Proprietary · macos / linux / windows

op lets developers and headless automation read vault items with --format json or inject secrets into child processes via op run --env-file without writing plaintext .env files to disk. Agents must avoid op read or --reveal to keep secrets out of LLM context.

FCRS-1.0 Score
83 /100
Good
Medium Confidence
Zero-Friction Install
brew install --cask 1password-cli
CLI vs MCP Decision CLI Preferred vs MCP

op run passes secrets straight from 1Password into child process env vars, keeping plaintext credentials out of both MCP payloads and LLM context.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
— Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 23 / 25

Supports --format json, op:// URI references, and headless OP_SERVICE_ACCOUNT_TOKEN authentication.

  • Native --format json and non-interactive service account tokens
Trust & Safety 16 / 25

op run safely masks/injects env vars, but op read or --reveal prints plaintext secrets directly into LLM context.

  • Plaintext secret exposure risk if --reveal or op read is invoked
Setup & Portability 12 / 15

Available via brew --cask and official installers, though desktop app biometric auth is unavailable on headless Linux.

  • Requires OP_SERVICE_ACCOUNT_TOKEN for headless environments
Utility & Efficiency 14 / 15

op run --env-file eliminates .env secret sprawl in agent workspaces.

  • Direct child-process secret injection via op:// references
Maintenance & Lineage 9 / 10

First-party CLI actively maintained by 1Password.

  • Official vendor binary with regular security updates
Docs & Verifiability 9 / 10

Comprehensive CLI reference and dedicated CI/service-account guides.

  • Official reference at developer.1password.com/docs/cli

Security, Auth & Guardrails

Auth Modes
Env API Key OS Keychain Service Account OAuth Browser
Credential Storage

Authenticates via OP_SERVICE_ACCOUNT_TOKEN in headless CI/agents or biometric unlock bridged from the 1Password Desktop app.

Side Effects
Read-Only Local Write Remote Write Destructive
Cost & Quotas

CLI is free; requires a 1Password account or Service Account plan.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 1Password CLI (op) Agent Rules
- Prefer `op run` and `op vault list --format json`; NEVER run `op read` or `op item get --reveal` into agent stdout.
- Use a dedicated least-privilege `OP_SERVICE_ACCOUNT_TOKEN` scoped only to dev/staging vaults.

Agent-Ready Command Recipes

Safe Read-Only Queries

List vault names and IDs without revealing secrets
op vault list --format json

Enumerates accessible vaults in JSON with zero secret values exposed.

Inject secrets into a child process via op run
op run --env-file=.env.tpl -- npm test

Resolves op:// secret references into child env vars without printing them to stdout.

Controlled Writes & Previews

Create a tagged secret item in a specific vault
op item create --category=login --title='Staging API' --vault='Dev' --format=json

Creates a new item scoped to a non-production vault and returns metadata JSON.

Strengths for Agents

  • + op run injects op:// secrets into subprocesses without writing .env files or printing values.
  • + Consistent --format json output and fine-grained Service Account vault scoping.

Caveats & Pitfalls

  • ! Running op read or op item get --reveal leaks raw secret values directly into agent transcripts.
  • ! Desktop biometric integration prompts interactively unless OP_SERVICE_ACCOUNT_TOKEN is configured.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI