keylock

Crates.iokeylock
lib.rskeylock
version0.1.2
created_at2025-08-12 04:51:09.872657+00
updated_at2025-08-12 04:53:55.811716+00
descriptionA CLI application starter template
homepage
repositoryhttps://github.com/Execute-Soft/rust-cli-setter
max_upload_size
id1791361
size95,123
Morshedul Munna (morshedulmunna)

documentation

README

Keylock CLI

A simple local password manager CLI with Argon2id key derivation and AEAD encryption.

Features

  • Argon2id key derivation with per-install random salt
  • AEAD encryption: AES-256-GCM or ChaCha20-Poly1305
  • Per-entry unique 12-byte nonce
  • Local JSON store at ~/.config/keylock/store.json
  • Commands: setup, add, list, view (clipboard), edit, delete

Install

cargo build --release

Usage

# Show help
./target/release/keylock --help

Initialize storage

keylock setup

Add a credential

keylock add --site example --username alice --algo aes
# You will be prompted for the entry password and the master decoder signature

List entries

keylock list

View and copy to clipboard

keylock view example

Edit an entry

keylock edit example --username alice --algo chacha

Delete an entry

keylock delete example --username alice

Non-interactive/Test mode

Environment variables for automation:

  • KEYLOCK_DECODER: master decoder signature
  • KEYLOCK_PASSWORD: password for add command
  • XDG_CONFIG_HOME: override config home (useful in tests)

Security Notes

  • The master decoder signature is never stored; only a random salt is saved under ~/.config/keylock/salt.
  • Keys are derived using Argon2id with memory hardness.
  • Each password is encrypted with a unique 12-byte nonce and AEAD (AES-GCM or ChaCha20-Poly1305).
  • view copies the password to the system clipboard instead of printing.
  • Clipboard contents are managed by the OS; clear it if needed.
  • Data is stored locally; protect your user account and backups.

Testing

cargo test

Release builds

cargo build --release
strip target/release/keylock || true
Commit count: 0

cargo fmt