Introduction
The NordPass CLI lets you work with your vault from a terminal. This guide will explain how to manage vault items and personal folders, read shared folders, manage trash, generate passwords, and pass secrets to other programs without ever writing them to a file.
Before you start
- Install the NordPass CLI by following our guides for macOS, Windows, and Linux.
Here's what to do
How to set your privacy choices
The first time you run the CLI, it asks two questions before anything else:
- Share usage data? Which commands are run, errors, the version, and your operating system. We never collect your passwords, usernames, or vault data.
- Share marketing data? Helps us measure how relevant our campaigns are and tailor what we send you. Turning it off does not change your notification preferences. Two service providers are involved: AppsFlyer, which measures and analyzes how you engage with our marketing campaigns, and Braze, which adapts and delivers tailored messages to you in real time.
Answer each with “Yes” or “No”. Your answers are saved on this device, and the marketing answer is also applied to your NordPass account. Only np -help and np --version run without asking. Every other command waits for an answer, including np item --help.
You can change either answer at any time:
| Command | What it covers |
| np consent | Review and update your privacy choices |
If your vault is locked when you run it, the CLI saves your choice on this device and asks you to run np unlock followed by np consent again so the change reaches your account. The command needs a terminal, so it cannot run in a script or a pipeline.
How to get around
Every command has built-in help, so you never need to memorize this page:
1. np --help # all commands
2. np item --help # everything under "item"
3. np item create --help # options for one command
Additionally, commands are grouped by what they act on:
| Group | What it covers |
| Session | Signing in and out, locking and unlocking your vault, syncing |
np update |
Keeping the CLI itself up to date |
np account |
Working with more than one NordPass account on the same machine |
np item |
Passwords, secure notes, credit cards, and personal info |
np folder |
Organizing items into folders |
np trash |
Restoring or permanently deleting items you have deleted |
np generate |
Creating strong passwords and passphrases |
np run and np inject |
Passing secrets to other programs and configuration files |
How to get access
NordPass separates "Signing in" from "Unlocking your vault" - exactly as the Desktop and Web apps do:
1. np signin # opens your browser to sign in to your NordPass account
2. np unlock # unlocks the vault so items can be decrypted
The np signin command opens your default browser. Sign in there, and the browser hands control back to the CLI automatically. If the browser cannot be opened, the CLI tells you and prints the URL so you can open it yourself.
Your vault stays unlocked between commands, so you do not re-enter your password for each one. It locks itself after 15 minutes without any CLI activity, and every command resets that timer — so if you are working continuously, it stays open. You can lock it immediately with the np lock command.
How to refer to items by name or by ID
Most commands accept either. Titles are matched without regard to capitalization, and must match exactly one item — if two items share the same title, the command stops and asks you to use the ID instead of guessing:
1. np item get "GitHub"
2. np item get 550e8400-e29b-41d4-a716-446655440000
How to supply a secret
Any option that takes a secret value accepts all four of these methods. The last three keep the secret out of your shell history and out of the process list:
| Form | Example | What happens |
| Value | --password "s3cret" |
Used directly. Visible in shell history |
| Prompt | --password |
The CLI asks you and hides what you type |
| Standard input | --password - |
Read from a pipe |
| File | --password @secret.txt |
Read from a file |
How to create machine-readable output
Add -- format json to any command that produces output, so you could pipe results into other tools:
np item list --format json | jq -r '.[].title'
How to work across several accounts
If you have more than one NordPass account signed in, --account runs a single command against a specific one without changing which account is active:
np --account alice@example.com item list
Session
| Command | What it does | Options |
np signin |
Sign in to your NordPass account through your browser |
--force sign in again even if you already have a valid session |
np signout |
Sign out of the current account |
--all sign out of every account |
np unlock |
Unlock your vault so items can be read | — |
np lock |
Lock your vault immediately | — |
np whoami |
Show which account is currently active | --format json |
np sync |
Sync your vault with the server | — |
How to keep the CLI up to date
The CLI can update itself. The np update command checks for a newer version, downloads the build for your operating system and processor, verifies that the download is intact, and replaces the installed program in place. It does not ask for confirmation, so it is safe to use in scripts. You stay signed in, and your vault is not affected:
| Command | What it does | Options |
np update |
Install the latest version. If you already have it, the CLI says so and changes nothing | — |
np update --check |
Only report whether a newer version is available, without installing it | --format json |
If the CLI is installed in a folder you cannot write to, the command tells you. Run it again with the permissions needed for that folder, for example with sudo on macOS and Linux, or from a terminal opened as administrator on Windows. On Windows, the previous version stays next to the new one as np.exe.old until you run the CLI again, which removes it.
If you installed the CLI through a package manager rather than as a standalone program, np update does not replace it and tells you to update through that package manager instead.
Accounts
| Command | What it does |
np account list |
List every account signed in on this machine |
np account switch <email> |
Make a different account the active one |
np account remove <email> |
Remove an account from this machine |
Items
| Command | What it does | Options |
np item list |
List your items. Deleted items are not included — use np trash list for those |
--type, --search, --folder, --limit, --format
|
np item get <id or title> |
Show one item |
--field show a single field, --copy copy to clipboard instead of printing, --format
|
np item create |
Create a password, note, card, or identity | See below |
np item edit <id or title> |
Change any combination of fields on an item | Same field options as create, plus --remove-field
|
np item delete <id or title> |
Move one or more items to Trash |
--yes, --format. Accepts several at once, and reads from a pipe |
When creating items, every item needs --type and --name. The remaining options depend on the type:
| Type | Options |
| password |
--username, --password, --url
|
| note | --note |
| card |
--cardholder, --number, --expiry, --cvv, --pin, --zip
|
| identity |
--full name, --email, --phone, --address1, --city, --country, --state, --address2
|
| Any type |
--folder, --text-field, --hidden-field, --date-field
|
Custom fields take a Label=Value pair. Use --hidden-field for anything sensitive, so it is stored and displayed as a secret.
# A password item, prompting for the password rather than typing it inline
np item create --type password --name "GitHub" --username "alice" --password
# A card, reading the security code from a prompt
np item create --type card --name "Amex" --cardholder "Alice" \ --number "4111111111111111" --expiry "12/28" --cvv
# Custom fields, one visible and one hidden
np item create --type password --name "AWS" \ --text-field "Account ID=123456" --hidden-field "Recovery=@code.txt"
# Copy just the password to your clipboard
np item get "GitHub" --field password --copy
# Move an item to a different personal folder
np item edit "GitHub" --folder "Work"
# Remove a custom field
np item edit "AWS" --remove-field "Account ID"
# Delete everything in a personal folder, without prompts
np item list --folder "Archive" --format json | jq -r '.[].id' | np item delete --yes
Folders
Deleting a personal folder that still contains items asks whether you want the items moved to Trash as well. Empty personal folders are deleted without asking. --trash-items answers that question in advance, which is what you want in a script.
If any of those items were shared with other people, deleting the folder also stops that sharing, and any reminders set on those items are cleared. Restoring the items from Trash does not restore the sharing.
Shared folders can be listed and their items read, but the CLI cannot create, rename, or delete a shared folder, and cannot move an item into one. Use the NordPass app for that.
If you pass a shared folder's name to --folder when creating or editing an item, the CLI reports that the folder was not found. The name is correct — the CLI simply does not place items into shared folders.
| Command | What it does | Options |
np folder create <name> |
Create a personal folder | --format |
np folder list |
List all of your folders |
--type personal or --type personal,--search, --format
|
np folder edit <name> |
Rename a personal folder |
--name, --format
|
np folder delete <name> |
Delete one or more personal folders |
--trash-items also move the contents to Trash --format
|
Trash
| Command | What it does | Options |
np trash list |
List deleted items |
--search, --format
|
np trash restore <id or title> |
Restore items from Trash | Accepts several at once, and reads from a pipe |
np trash delete <id or title> |
Permanently delete specific items. This cannot be undone |
--yes, --format
|
np trash empty |
Permanently delete everything in Trash |
--yes, --format
|
Generating passwords
--no-ambiguous leaves out characters that are easy to confuse, such as l, I, and 1.--count generates several at once.
| Command | Default | Options |
np generate password |
20 characters, all character types |
--lenght, --uppercase, --lowercase, --digits, --symbols, --no-ambiguous, --count, --copy, --format
|
np generate passphrase |
4 words separated by hyphens |
--words, --seperator, --capitalize, --include-digit, --count, --copy, --format
|
How to use secrets in other programs
This is the part of the CLI that has no equivalent in the app. Instead of copying a password out of your vault into a .env file, you leave a reference in the file and let the CLI fill it in at the moment it is needed.
There are two ways to do it:
| Command | What it does |
np run |
Runs a program with secrets available to it as environment variables. Nothing is written to disk |
np inject |
Fills in a template file and prints the result, or writes it to a file |
How to reference a secret
| Reference | Meaning |
| item:<id>/password | A standard field on the item with that ID |
| item:<id>/custom:API_KEY | A custom field on the item with that ID |
| Production DB/password | A standard field, using the item's title |
| Production API/custom:API_KEY | A custom field, using the item's title |
How to pass secrets to a program
# One secret, by item title
np run --env DB_PASSWORD="Production DB/password" -- your-command
# Several secrets, from a template file
np run --env-file .env.template -- your-command
A template file looks like an ordinary .env file, except the values are references rather than secrets, so it is safe to commit:
DB_USERNAME=item:550e8400-e29b-41d4-a716-446655440000/username
DB_PASSWORD=item:550e8400-e29b-41d4-a716-446655440000/password
API_KEY=Production API/custom:API_KEY
How to fill in a configuration file
or anything that is not an env file, np {{...}} placeholders in a template and render it:
database:
username: '{{Production DB/username}}'
password: '{{Production DB/password}}'
apiKey: '{{Production API/custom:API_KEY}}'np inject --in config.template.yaml --out config.yaml
np inject --env-file .env.template --out .env
np inject --env-file .env.template --format json
How to get logs from CLI
CLI writes one log file per day and keeps it for 7 days:
| OS | Folder |
| macOS, Linux | ~/.nordpass-cli/logs/ |
| Windows | %USERPROFILE%\.nordpass-cli\logs\ |
In case you encounter any issues, follow these steps:
- Run the failed command again.
- Open the log folder.
- Send the file to our customer support with today's date, for example: log_2026-09-09.log,
Additional Tips
- Resolution is deliberately strict, so a script fails clearly rather than quietly using the wrong value:
- A title must match exactly one item. If two items share it, the command stops and asks you to use the ID.
- Items in Trash are never resolved.
-
np inejctcommand rejects duplicate keys in an env-style template;np runcommand silently uses the last value. - Duplicate keys in an env-style template are rejected.
- A reference that cannot be found stops the command.
--ignore-missingleaves it as-is instead.
Note:-- ignore-missingexist only for the inject command.
- Deleting anything will ask if you wish to do so and show you the name of what is about to be affected. Add
--yeswhen you are scripting to not receive the prompt. - Once a secret has been passed to another program or written into a file, how it is handled is up to that program. Keep rendered files out of version control, and make sure your build system hides injected environment variables in its log. Here are the output formats:
# Several secrets, from a template file np run --env-file .env.template -- your-command
A template file looks like an ordinary .env file, except the values are references rather than secrets, so it is safe to commit:
DB_USERNAME=item:550e8400-e29b-41d4-a716-446655440000/username DB_PASSWORD=item:550e8400-e29b-41d4-a716-446655440000/password API_KEY=Production API/custom:API_KEY
How to fill in a configuration file
or anything that is not an env file, put {{...}} placeholders in a template and render it:
database:
username: '{{Production DB/username}}'
password: '{{Production DB/password}}'
apiKey: '{{Production API/custom:API_KEY}}'
np inject --in config.template.yaml --out config.yaml np inject --env-file .env.template --out .env np inject --env-file .env.template --format json
How to get logs from CLI
CLI writes one log file per day and keeps it for 7 days:
| OS | Folder |
| macOS, Linux | ~/.nordpass/logs/ |
| Windows | %USERPROFILE%\.nordpass\logs\ |
In case you encounter any issues, follow these steps:
- Run the failed command again.
- Open the log folder.
-
Send the file to our customer support with today's date, for example -
log_2026-09-09.log,
Additional Tips
-
Resolution is deliberately strict, so a script fails clearly rather than quietly using the wrong value:
A title must match exactly one item. If two items share it, the command stops and asks you to use the ID.
Items in Trash are never resolved.
Duplicate keys in an env-style template are rejected.
A reference that cannot be found stops the command.
--ignore-missingleaves it as-is instead.
Deleting anything will ask if you wish to do so and show you the name of what is about to be affected. Add
--yeswhen you are scripting to not receive the prompt.Once a secret has been passed to another program or written into a file, how it is handled is up to that program. Keep rendered files out of version control, and make sure your build system hides injected environment variables in its log. Here are the output formats:
| Mode | Default | Also available |
| --env-file | env | json |
| --in | raw | json |