All apps/1Password CLI

1Password CLI

1password-cli

1Password from the command line: read secrets and sign commits without leaving the shell.

Runs as op|macOS, Linux, Windows|developer.1password.com

Command form

ai-draft · 7 tasks · 18 fields

Read items and secrets from 1Password. Creating, editing and deleting items, users and groups are left out.

Opens the form; the finished command lands at your prompt, unrun
otty gui 1password-cli
1Password CLIExample values, fixed in this page — nothing here reaches a terminal
Basic
Account
string
Output format
string
ParametersOnly these flags are editable in the form
Account
Shorthand, sign-in address, account ID or user ID.
string
--account
Output format
string
--formathuman-readablejson

op signin

Sign in

Sign in to a 1Password account.

Sign inExample values, fixed in this page — nothing here reaches a terminal
TasksEach one presets the form for one job
Sign in
ParametersOnly these flags are editable in the form
Ignore warnings, raw output
boolean
--force-f

op read

Read a secret

Read a secret by secret reference (op://vault/item/field). Output goes to the terminal unless redirected.

Read a secretExample values, fixed in this page — nothing here reaches a terminal
Basic
Secret reference*
string
No trailing newline
--no-newline
TasksEach one presets the form for one job
Read a secret
referenceno_newline
ParametersOnly these flags are editable in the form
Secret reference
Example: op://Personal/GitHub/token. Not covered by the completion data.
string · positional 0
No trailing newline
boolean
--no-newline-n
Do not prompt
boolean
--force-f

op item get

Get an item

Show an item's details, a single field, its one-time password or share link.

Get an itemExample values, fixed in this page — nothing here reaches a terminal
Basic
Item name, ID or share link*
string
Only these fields
string
TasksEach one presets the form for one job
Get an item
itemfields
Get a one-time password
itemotp
ParametersOnly these flags are editable in the form
Item name, ID or share link
string · positional 0
Only these fields
Comma-separated, for example label=password.
string
--fields
One-time password
boolean
--otp
Share link
boolean
--share-link
Include archived items
boolean
--include-archive

op item list

List items

List items in your vaults.

List itemsExample values, fixed in this page — nothing here reaches a terminal
Basic
Categories
string
Tags
string
Detailed list
--long
TasksEach one presets the form for one job
List items
categoriestagslong
ParametersOnly these flags are editable in the form
Categories
Comma-separated.
string
--categories
Tags
Comma-separated.
string
--tags
Detailed list
boolean
--long
Include archived items
boolean
--include-archive

op vault list

List vaults

List vaults in the account.

List vaultsExample values, fixed in this page — nothing here reaches a terminal
Basic
Vaults a group can access
string
TasksEach one presets the form for one job
List vaults
group
ParametersOnly these flags are editable in the form
Vaults a group can access
string
--group

op run

Run with secrets

Run a command with secret references in its environment resolved. Append the command after --.

Run with secretsExample values, fixed in this page — nothing here reaches a terminal
Basic
Env file
file
Do not mask secrets in output
--no-masking
TasksEach one presets the form for one job
Run with env file
env_fileno_masking
ParametersOnly these flags are editable in the form
Env file
path
--env-file
Do not mask secrets in output
boolean
--no-masking
SourcesEvery flag above is checked against these
fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

Before it fills your prompt, Otty checks the installed op against its version. A form that does not match your version is not offered.