Skip to content

1Password ​

Read vault items and 1Password Environments through the 1Password CLI (op). fnox.toml stores references; values stay in 1Password. The provider is read-only: create and edit items in 1Password, not with fnox set.

Config type1password
StorageRemote service (1Password vault)
Writes (fnox set)No (read-only)
Requiresop CLI on PATH

Quick start ​

Sign in with op (the desktop-app integration works), then reference an existing item:

toml
[providers.op]
type = "1password"
vault = "Engineering"

[secrets]
DATABASE_URL = { provider = "op", value = "Database/url" }
sh
fnox provider test op
fnox exec -- npm start

op is the provider instance name; any name works. For a team setup with offline reads, follow use an existing vault.

Authentication ​

fnox runs op and uses whatever session op has. It adds --account when account is set.

Local development ​

Use any op sign-in method, including the desktop-app integration. Check access with op vault list. When op reports that you are not signed in, fnox offers to run op signin in a terminal.

CI ​

Create a service account with access to the vaults the job reads. fnox passes the first token it finds to op as OP_SERVICE_ACCOUNT_TOKEN:

  1. The provider's token field
  2. FNOX_OP_SERVICE_ACCOUNT_TOKEN
  3. OP_SERVICE_ACCOUNT_TOKEN
yaml
- run: fnox --non-interactive exec --if-missing error -- npm test
  env:
    OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}

To keep a token on a workstation, store it with another provider and point token at it:

toml
[providers.op]
type = "1password"
vault = "Engineering"
token = { secret = "OP_SERVICE_ACCOUNT_TOKEN" }

[secrets]
OP_SERVICE_ACCOUNT_TOKEN = { provider = "age", value = "YWdl...", env = false } # ciphertext, abbreviated

Configuration ​

FieldRequiredDefaultDescription
vaultNononeVault for item and item/field references. Those forms fail without it.
accountNoop's defaultAccount passed to op --account, for example my.1password.com.
tokenNoenv varsService account token. Overrides FNOX_OP_SERVICE_ACCOUNT_TOKEN and OP_SERVICE_ACCOUNT_TOKEN.

Each field accepts { secret = "NAME" } to read its value from another secret. Fields shared by all providers, such as auth_command and daemon_cache, are in the configuration reference.

Discover items by tag ​

Narrow discovery to items tagged for a project before selecting a secret reference:

sh
fnox provider discover op --tags project/example
fnox provider discover op --tags project/example --json

Discovery runs op item list with the configured 1Password account. If you configure a vault, results are limited to that vault; otherwise, fnox lists items in every vault accessible to the account. Output includes item IDs, titles, tags, and vault metadata, but no secret fields. Discovery does not change fnox.toml. Provider credential references are resolved directly, bypassing the daemon cache. Archived items are excluded. JSON output is an array; no matches return [].

Pass comma-separated tags or repeat --tags. Matching follows the 1Password CLI's tag rules, including nested tags: project/example also finds project/example/development. Omitting --tags lists every non-archived item within the configured vault, or across all accessible vaults when none is configured.

Once you choose an item, use its vault and item IDs in an op://<vault-id>/<item-id>/<field> reference. Choose the field explicitly; discovery does not assume that every item has a password field. Reading that reference is a separate operation through the normal provider and optional daemon cache.

Reference formats ​

valueWhat fnox reads
Databaseop://<vault>/Database/password
Database/usernameop://<vault>/Database/username
op://Engineering/Database/passwordThat secret reference as written; vault is ignored
environment://<id>/DATABASE_URLOne variable from a 1Password Environment

Copy full op:// references from 1Password when a project reads from several vaults. Field names are the labels shown on the item.

To add a reference without editing TOML, pass it as the value. For a read-only provider, fnox set records the value as the reference:

sh
fnox set DB_USER "Database/username" --provider op

When several secrets use the same provider, fnox resolves them with one op inject call, and falls back to one op read per secret if that call fails.

1Password Environments ​

1Password Environments are named sets of environment variables. Reference one variable with environment://<environment-id>/<VARIABLE>:

toml
[providers.op]
type = "1password"

[secrets]
DATABASE_URL = { provider = "op", value = "environment://blgexucrwfr2dtsxe2q4uu7dp4/DATABASE_URL" }
STRIPE_KEY = { provider = "op", value = "environment://blgexucrwfr2dtsxe2q4uu7dp4/STRIPE_KEY" }
  • fnox runs op environment secret list <id> --reveal --format=dotenv once per Environment and serves every variable that references it from that read.
  • Environment references ignore vault and can sit next to vault item references in the same provider.
  • A variable missing from the Environment is an error, not an empty value.
  • This needs 1Password CLI 2.42.0 or later. fnox falls back to op environment read for the old betas (2.33.0-beta.02 and later) that predate op environment secret list. Authenticate as usual: the desktop app, or a service account that can access the Environment.

Troubleshooting ​

Authentication required ​

op is not signed in to the selected account, or the service account token is not in fnox's environment. Check the session op sees:

sh
op whoami

Unknown secret vault ​

A short reference (Item or Item/field) needs vault in the provider config. Set it, or use a full op://vault/item/field reference.

Item or vault not found ​

Check the vault, item and field names, and that the signed-in identity can access the vault. Item listings show names and metadata, so review output before sharing it.

sh
op item list --vault Engineering
fnox provider test op

unknown command for an environment:// reference ​

Your op build does not include op environment secret list or op environment read. Update the 1Password CLI to 2.42.0 or later (op --version shows the installed version).

See also ​

MIT LicenseCopyright © 2026jdx.dev