← Back to CLIs
Melvynx

1password

1Password CLI - manage secrets, vaults, items, inject credentials into commands. Use when user mentions '1password', 'op', 'secrets management', or wants to manage passwords and secrets via CLI.

Install

$ npx api2cli install 1password

Details

Skill type: Official CLI
Auth type: bearer
Version: 1.0.0
Author: Melvynx
Views: 0

README

op

Setup

brew install 1password-cli

Verify installation:

op --version

Use --format json for machine-readable output.

Authentication

op signin

For service accounts, set the OP_SERVICE_ACCOUNT_TOKEN environment variable.

Resources

Items

CommandDescription
op item listList all items
op item list --vault <vault>List items in a specific vault
op item get <name-or-id>Get an item by name or ID
op item get <name> --fields label=passwordGet a specific field from an item
op item create --category login --title <title> --vault <vault>Create a new item
op item edit <name> password=newvalueEdit an item field
op item delete <name>Delete an item

Vaults

CommandDescription
op vault listList all vaults
op vault get <name>Get vault details
op vault create <name>Create a new vault
op vault delete <name>Delete a vault

Documents

CommandDescription
op document listList all documents
op document get <name>Download a document
op document create <file> --title <title>Upload a document
op document delete <name>Delete a document

Secrets Injection

CommandDescription
op inject -i template.env -o .envInject secrets from a template into a file
op run -- <command>Run a command with secrets injected as env vars
op run --env-file .env -- <command>Run with secrets from env file
op read "op://vault/item/field"Read a single secret reference

Account

CommandDescription
op account listList configured accounts
op account getGet current account details
op whoamiShow current signed-in user

Global Flags

FlagDescription
--format jsonOutput as JSON
--vault <vault>Specify vault
--account <account>Specify account
--cacheEnable response caching
--no-newlineDo not append newline to output
Sponsors