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 (a git repository) or
cargo install sefy-plugin-sftp (your own server), and see
Syncing through a transport or
Syncing to your own server.
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.
The master password is the one secret sefy cannot keep for you, and it is typed
by hand. A passphrase of random words is the kind that is both strong and
typeable — gen makes one, no vault needed:
$ sefy gen --words 6 --stdoutgenerated 6 words: 78 bits of entropy, strength 4/4agreeably-cape-valid-unwary-widget-prozacPut things in
Section titled “Put things in”$ sefy add note "bank card" --text "PIN 4815" --tag moneyadded "bank card" as 1
$ sefy add login 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 3For a new account, let sefy make the password and keep it in one step — it is stored as a login and then copied, ready for the sign-up form:
$ sefy gen --save forum --login someone@example.com --url https://forum.example.comadded "forum" as 4generated 20 characters: 130 bits of entropy, strength 4/4copied it to the clipboard; clearing in 45sclipboard clearedA long note is easier in your editor:
sefy add note "journal" --editorComing from another password manager or a browser, bring everything at once:
sefy import reads what KeePass, Bitwarden, Chrome, Firefox and Safari
export, and Moving between password managers
walks through each.
Get things out
Section titled “Get things out”$ sefy ls3 id_ed25519 file [keys]2 mail login [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 loginnarrow 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.
A script that needs a token does not have to fetch it and export it: sefy run
puts it in the environment of one command, and nowhere else.
sefy run -e GITHUB_TOKEN=github -- ./release.shWhere next
Section titled “Where next”- Moving between password managers — arriving from KeePass, Bitwarden or a browser, and leaving again.
- 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.