2password CLI
A wrapper over the 1Password CLI: agents find, use and save secrets without seeing the values, and ask for approval less often
- 305 ★ on the repository
- Last commit
Broad access
Why this level
- The tool gives an agent access to 1Password vaults and lets it create and update items
- `run` and `env run` hand a plaintext secret to a child process that can print it
- A service account works without approvals, so its vault should be separate and small
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/2passwordDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- The tool gives an agent access to 1Password vaults and lets it create and update items
- `run` and `env run` hand a plaintext secret to a child process that can print it
- A service account works without approvals, so its vault should be separate and small
This is third-party code. Review the repository files before installing.
What it does
2password is a command line on top of the 1Password CLI (op) for coding agents. The agent works with secrets through references like op://Vault/Item/field and never sees the values. All output is JSON, and the tool ships with a skill that gives the agent its rules: do not print, paraphrase or log secrets. `2password find` searches items with several queries at once and returns only op:// references. `2password env run` starts a program with secrets from a .env.tpl template, and no plaintext lands on disk. `2password create api-credential` stores a new key from the clipboard or stdin, then reads the item back and verifies it. Separate commands keep the vault tidy: they update a login password, list item fields without values and find duplicates and stale logins. Batched requests mean one 1Password approval per command, and a service account with its own agent vault removes approvals altogether.
Who it is for. For developers who keep keys in 1Password and let a coding agent run project commands.
Good fit when
- An agent has to start a dev server with OpenAI and Stripe keys from 1Password without being shown the keys
- The project has a .env.tpl template with op:// references that must resolve at launch with no plaintext on disk
- You need to save a new API key into the right vault, whether a program prints it or it sits on the clipboard
- You need a vault audit: duplicate titles, untagged machine credentials and old logins
- You are tired of 1Password approvals for every agent command and want a separate service account with its own vault
Not a fit when
- Your secrets are not in 1Password: the tool wraps only its CLI
- You need to show secret values to the agent: only two read commands do that, and they are meant as a last resort
- You need fully unattended work without a service account: in normal mode every command asks for one approval
Example request
Find the OpenAI key in 1Password and start `bun dev` with it in the environment, showing the value neither to me nor to yourselfLimitations
You need Bun and the 1Password CLI. Only `2password read` and `2password env resolve` deliberately return or materialize a secret. `2password run` and `2password env run` do not print the value but pass it into the child process environment, and that process can print it. Use them only for programs you trust with the key, and never pair them with debug commands that print the environment.
Writing a new key is not retried automatically after a failure: first search to check whether the write went through. A key cannot be passed as a command-line argument, only through the clipboard or standard input.
How to disable. Remove the global package with `bun remove -g 2password` and the skill from your agent's skills folder. If you set up a service account, revoke its token in 1Password and delete the stored token from the machine.
FAQ
How do I install 2password for an agent?
Install the tool with `bun add -g 2password` and the skill with the agent's rules with `bunx skills add kitlangton/2password`. `2password --help` lists all commands.
How do I run a program with secrets from 1Password?
With one command, `2password run --env "OPENAI_API_KEY=op://Personal/OpenAI API Key/credential" -- bun dev`, or through a template: `2password env run .env.tpl -- bun dev`.
How do I save a new key so the agent never sees it?
With `2password create api-credential --title "OpenAI API Key" --vault Personal --clipboard`, or by piping the value in with the --stdin flag. --vault is required. The tool refuses an item with an existing title and overwrites nothing.
How do I get rid of the 1Password approval pop-ups?
Set up a service account: `2password service-account setup --vault Automation --create-vault --write --save-vault Personal`. The token is stored in macOS Keychain or, on Windows, in a DPAPI-encrypted file. After that commands authenticate without prompts.
What does search return, and can it reveal a value?
For each match search returns an op:// reference, a title and the item kind, never a value. If a query finds nothing, the reply lists similar titles, typos included.
Discussion
No questions or reviews yet.
Related
CLI toolsMCP server and CLI for reverse engineering: an agent inspects binaries, JavaScript apps, APKs and websites on your machine and returns the evidence
Nine skills that let an agent run Strix pentests, fix validated findings and add security scanning to CI
A skills router for authorized reverse engineering, pentest, CTF and threat analysis: it picks a methodology for the task and checks available tools
A code security audit skill by Cloudflare: the agent runs recon, coverage-led hunting and independent verification of findings, then produces a structured repor
A cybersecurity skill library: forensics, incident response, pentesting, cloud and malware analysis mapped to MITRE ATT&CK and NIST
NVIDIA's open stack for running OpenClaw, Hermes and LangChain Deep Agents in OpenShell sandboxes with network policy and managed inference
Comparison with similar tools
Entries that share the main search query, and how they differ.
| Entry | Official | Repository stars | Main difference |
|---|---|---|---|
| 2password (this entry) | no | 305 | |
| Varlock | no | 4,820 | a skill and CLI around .env.schema: the agent sees variable names, types and rules while values stay hidden |
| Zerobox | no | 724 | a sandbox for commands and agent-written code that limits writes, network and environment variables |
README in short
The README is short: requirements, two install commands and examples of the main commands. A separate security section lists every command that can return a secret value at all.