Skip to content

feat(pass): support custom store directory via store_dir URI param#116

Merged
domenkozar merged 1 commit into
mainfrom
pass-store-dir
Jun 22, 2026
Merged

feat(pass): support custom store directory via store_dir URI param#116
domenkozar merged 1 commit into
mainfrom
pass-store-dir

Conversation

@domenkozar

Copy link
Copy Markdown
Member

Closes #115

Problem

pass (password-store) supports a custom store location only through the PASSWORD_STORE_DIR environment variable (man pass), but secretspec gave no way to set it — it always used the hardcoded ~/.password-store.

Upstream pass has no CLI flag or config file for this; a dir subcommand was proposed years ago on the mailing list but never landed. The env var is the only supported mechanism.

Change

The pass provider now accepts a store_dir query parameter:

pass://?store_dir=/path/to/store
pass://shared/{profile}/{key}?store_dir=/path/to/store

When set, PASSWORD_STORE_DIR is exported scoped to each spawned pass process — secretspec's own environment is left untouched. The value round-trips through uri() (it's a path, not a credential, so it's safe in the audit log).

Tests

Added unit tests for query parsing (with and without a folder prefix) and URI round-tripping. All pass-provider tests pass; package builds clean.

Docs

  • docs/src/content/docs/providers/pass.md — documented the store_dir param with an example.
  • CHANGELOG.md — entry under the Unreleased "Added" section.

🤖 Generated with Claude Code

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 20, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
secretspec c0b9223 Commit Preview URL

Branch Preview URL
Jun 21 2026, 08:40 PM

@domenkozar domenkozar force-pushed the pass-store-dir branch 2 times, most recently from d4f140a to 47598fc Compare June 21, 2026 18:17
pass has no CLI flag for the store location; PASSWORD_STORE_DIR is the
only mechanism. The pass provider now accepts a store_dir query parameter
(e.g. pass://?store_dir=/path/to/store), applied as PASSWORD_STORE_DIR
scoped to each pass invocation without mutating secretspec's environment.

Closes #115

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@domenkozar domenkozar merged commit 4a92b80 into main Jun 22, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support change pass PASSWORD_STORE_DIR other than hardcoded ~/.password-store

1 participant