Menu ▾ ▴

#42 feat(cli): support JSON and YAML secret files

closed
nobody
None
2026-09-20
2026-09-12
Anonymous
No

Originally created by: thomijasir

Summary

Add dotenv, JSON, and YAML support to secret initialization, import, and export. The CLI infers formats from filenames, accepts explicit --format overrides, reads init and import data from stdin, and validates JSON and YAML as flat string mappings without exposing secret values.

The change keeps import previews, expected revisions, export password confirmation, overwrite protection, private file permissions, and server schemas unchanged. Public CLI documentation now covers the new formats and notes that the Admin UI remains dotenv-only.

Closes [#18]

Compatibility

Existing dotenv commands remain compatible. Unknown extensions, including .env.production, still default to dotenv. Stdout export still defaults to dotenv, and global --json remains separate from secret serialization.

No migration is required. The changelog is intentionally left for the next release preparation commit, following the current release workflow.

Verification

  • cargo fmt --manifest-path app/Cargo.toml -- --check
  • cargo clippy --manifest-path app/Cargo.toml --locked --all-targets --all-features -- -D warnings
  • cargo test --manifest-path app/Cargo.toml --locked --all-targets --all-features
  • bun run docs:build
  • codegraph sync

Checklist

  • [x] I kept this pull request focused on one problem.
  • [x] I added or updated tests for behavior changes, or explained why tests are not needed.
  • [x] I updated the documentation and CHANGELOG.md when public behavior changed, or explained why they are not needed.
  • [x] I updated relevan documentation inside /docs

Related

Tickets: #18

Discussion

  • Anonymous

    Anonymous - 2026-09-12

    Ticket changed by: dopbase

    • status: open --> closed
     

Log in to post a comment.