Getting Started
Install
Section titled “Install”One line on Windows (PowerShell):
irm https://raw.githubusercontent.com/lacodda/sefy/main/tools/install.ps1 | iexOne line on macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/lacodda/sefy/main/tools/install.sh | shVia npm:
npm install -g sefy-cliVia cargo:
cargo install sefyOr take a prebuilt archive from Releases
(Windows x86_64, Linux x86_64, macOS arm64), unpack it and put sefy on your
PATH.
Both one-line installers also place any transport the archive carries into
sefy’s plugins directory, so sefy sync has something
to call. Installing through cargo or npm gets the CLI alone; add the git
transport with cargo install sefy-plugin-github and see
Syncing through a transport.
Shell completions:
sefy completions bash > /etc/bash_completion.d/sefysefy completions zsh > ~/.zfunc/_sefyfish, powershell and elvish work the same way.
Point sefy at a file
Section titled “Point sefy at a file”sefy has no default vault location. A file at a predictable path would undo the point of one that looks like nothing, so you say where it lives:
export SEFY_VAULT=~/backups/notes.bakEvery command also takes --vault <FILE> if you would rather be explicit, or
keep several vaults.
The name is yours. notes.bak, archive-2019.dat, anything at all — there is
no extension sefy expects and none it writes.
Create the vault
Section titled “Create the vault”$ sefy initNew master password:Repeat it:created /home/you/backups/notes.bakThe password is asked for twice, because a typo here would lock you out of the vault forever. It is never echoed, and it cannot be passed as an argument: that would put it in your shell history and in every process listing.
Put things in
Section titled “Put things in”$ sefy add note "bank card" --text "PIN 4815" --tag moneyadded "bank card" as 1
$ sefy add credential mail --login someone@example.com --url https://mail.example.com --tag mailPassword for this item:added "mail" as 2
$ sefy add file ~/.ssh/id_ed25519 --tag keysadded "id_ed25519" as 3A long note is easier in your editor:
sefy add note "journal" --editorGet things out
Section titled “Get things out”$ sefy ls3 id_ed25519 file [keys]2 mail credential [mail]1 bank card note [money]
$ sefy get mailcopied password of "mail" to the clipboard; clearing in 45sclipboard clearedFor pipes and scripts, print it instead — knowing that the secret then lives in your terminal scrollback:
$ sefy get "bank card" --stdoutPIN 4815Files come back exactly as they went in:
sefy extract id_ed25519 -o ~/.ssh/id_ed25519Naming what you want
Section titled “Naming what you want”Commands take an item’s title, an id, or text to search for. An exact title always wins; when several items still match, sefy shows them rather than picking one:
$ sefy get maerror: 2 items match "ma": 4 mailing list note 2 mail credentialnarrow the text, or use an idIn scripts
Section titled “In scripts”Passwords come from environment variables you name yourself:
export VAULT_PW='…'sefy --password-env VAULT_PW lsWithout a terminal, sefy refuses to prompt rather than hanging — and sefy rm
refuses to assume “yes” unless you pass --yes.
Where next
Section titled “Where next”- Moving a vault between machines — copying it, syncing services, and what to do when two copies drifted apart.
- Keeping ssh keys in a vault — keys and passphrases together, and putting them back on a new machine.
- Commands — every command, one page each.
- How the vault works — the file format and the cryptography behind it.
- Threat model — what sefy protects against, and what it does not.