Skip to content

Commit

Permalink
brew: add age and associated shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
knpwrs committed Mar 12, 2024
1 parent 2b9b1df commit 4f5c6a0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions home/config/navi/encryption.cheat
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
% Encryption

# Encrypt a file with age for an ssh public key from 1Password

age --encrypt --recipient '<op_ssh_key_public_key_text>' <file>

# Decrypt a file with age for an ssh private key from 1Password

age --decrypt -i <(op item get <op_ssh_key> --format json | jq -r '.fields[] | select(.id == "private_key") | .value') <file>

# Output an ssh public key from 1password

op item get <op_ssh_key> --format json | jq -r '.fields[] | select(.id == "public_key") | .value'

$ op_ssh_key: op item list --categories "SSH Key" | tail -n +2 --- --map "cut -d ' ' -f1"
$ op_ssh_key_public_key_text: op item get <op_ssh_key> --format json | jq -r '.fields[] | select(.id == "public_key") | .value'
$ file: fd
1 change: 1 addition & 0 deletions vendor/packages/Brewfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Base Packages

brew 'age' # A simple, modern and secure encryption tool (and Go library) with small explicit keys, no config options, and UNIX-style composability.
brew 'aria2' # Multi-protocol download client.
brew 'ast-grep' # A CLI tool for code structrual search, lint and rewriting. Written in Rust.
brew 'bat' # A cat clone with wings.
Expand Down

0 comments on commit 4f5c6a0

Please sign in to comment.