Vaults
A vault is one file that holds your hosts, groups, SSH keys and credentials. The whole file is encrypted with a key derived from its master password, so you can keep it in a cloud-synced folder (iCloud Drive, OneDrive, Dropbox, Syncthing). Nothing about your servers is readable on disk. Vault format covers how the encryption works.
Create a vault
Section titled “Create a vault”flint vault create ~/Sync/home.flint --name "Home Lab"Flint asks for the master password twice. It must be at least 8 characters. Without
--name, the vault is named after its file (home).
The new vault becomes the current vault: the one every host, key, group and
cred command uses unless you pass --vault.
Flint holds the unlocked vault
Section titled “Flint holds the unlocked vault”An unlocked vault’s key lives in the running Flint app, and only there. Everything else asks the app:
- The app unlocks a vault with its master password. On launch it reopens the last vault without a prompt only if you ticked Remember on this computer for it. The password itself is never stored.
- The
flintCLI never reads that keychain. While Flint is open with the vault unlocked, every command on that vault runs inside the app: the CLI hands it the command line over a local socket and prints what comes back.connect,execandhost testrun there too, with your terminal, the prompts and the remote PTY relayed. The output and exit codes are the same either way. - Otherwise the CLI asks for the master password for that one command, on your
terminal or from
--master-stdin, and keeps nothing. - With no terminal (an agent, a script, a cron job) and no
--master-stdin,flintasks Flint to unlock: it starts the app if it is closed, the unlock screen names the command (“flint exec web -- uptimewants to use this vault”), and the command waits. Unlock in the window and it goes on; if nobody unlocks within the approval wait (Settings → Access, 2 minutes by default), it fails withlocked.
| Command | What it does |
|---|---|
flint vault unlock |
Asks Flint to unlock the vault (starting it if needed) and waits for you to unlock it there, as long as the approval wait |
flint vault lock |
Locks the vault in Flint and removes the key cached on this machine where the CLI may; on macOS only Flint can remove a key it saved, and the command says so |
flint vault status |
Shows whether Flint holds the vault unlocked, what it holds when it does, and why it is locked when it is not (locked (keychain access denied) after a Keychain Deny) |
A command that needs a secret of its own (--password, --passphrase, a host’s
password at login) asks for it in your terminal, and only sends it to
Flint. The socket is flint.sock in the config folder, usable by you only; Flint closes
any connection from another user before reading it.
If Flint has another vault open, a command on this one asks for its master password,
or fails with locked (“Flint has vault ‘Work’ open”) when nobody can type it.
FLINT_APP tells flint where the app is when it is not in the usual place (a path to
the Flint program or to Flint.app); FLINT_APP=off never starts it.
What this protects, and what it does not
Section titled “What this protects, and what it does not”A program reads the vault key from the keychain through flint |
No. The CLI never reads it |
A program runs flint while the vault is unlocked in Flint |
Only once you approve it in Flint’s window, for the hosts, actions and time you choose (Approve a program) |
A program runs flint while the vault is locked or Flint is closed |
No. It gets locked, and Flint’s window asks you |
| On Linux, another program reads the app’s remembered key from the Secret Service | Only if you ticked Remember on this computer: the Secret Service has no per-app access list. Without it no key is ever written there |
| Someone at your unlocked computer opens Flint’s window | Not when you closed it to the menu bar or tray: it asks for the master password or Touch ID. Yes while the window is open |
| Someone at your unlocked Mac starts Flint and it reopens a remembered vault | Not with Touch ID to open a vault on: the key is released only after Touch ID. Yes without it |
No program gets your passwords or keys through flint: no command prints them. What an
approved program can do is run commands on the servers you allowed through flint exec. To narrow that, see
Use Flint with an AI agent.
Locking
Section titled “Locking”A vault locks on its own:
- after a time with nobody using it: no typing or clicking in Flint, no
flintcommand. Settings → Vault → Lock after sets it: 1, 5, 15 or 30 minutes, 1 hour (the default), 4 hours, or never; - when the screen locks;
- before the computer goes to sleep.
And when you choose: Lock in the status bar, ⌘L (Ctrl+Shift+L on Linux), the
command palette, or flint vault lock.
Locking overwrites the vault key in memory. The window shows the lock screen, and the
CLI gets locked until you unlock. Open sessions keep running behind the lock
screen: they hold no key, and you find them as you left them. Once locked, the vault opens
again only with its master password, never from the keychain, until Flint is
restarted; the one exception is a key behind Touch ID on a Mac, which asks for Touch ID
first (below). Close vault on the lock screen ends
its sessions instead.
On Linux, Flint hears the screen lock and sleep from logind (Lock, PrepareForSleep)
and from the desktop’s screensaver (org.freedesktop.ScreenSaver or
org.gnome.ScreenSaver). A desktop that sends none of them still locks on the idle time.
Remember on this computer
Section titled “Remember on this computer”The unlock and create screens have a Remember on this computer box, off by
default. Ticked, the vault key goes into the OS keychain (Keychain on macOS, the Secret
Service on Linux) and Flint reopens the vault on launch without the master password. The
box says what that costs: Flint, the flint CLI and the agents you approve open this
vault without the master password. Anyone using this computer while it is unlocked can
open Flint too. The CLI still goes through Flint and its approvals; it never reads the
keychain.
Ticked, the box also says: Keep your master password somewhere safe: on another computer, or if this one loses the key, only the master password opens this vault. It cannot be recovered. With the key remembered you may not type the password for months, and Flint has no way to recover it: keep it where you keep your other important passwords.
Left unticked, no key reaches the keychain, and Flint asks for the master password on
every launch. Unticking it on a vault this computer remembers removes its key, as do
Forget on this device in Settings → Vault and flint vault lock where the CLI
may remove it. On macOS a key is Flint’s alone (the CLI never reads it), so the keychain
lets only Flint remove it: flint vault lock then locks the vault and says the key
stays, and Forget key in Settings → Vault removes it.
Before version 3 (milestone 14) Flint cached the key on every unlock. The first time a newer Flint starts, it removes those keys once; tick the box at the next unlock to keep a vault remembered.
On macOS, a release of Flint is signed with a Developer ID, so a remembered key opens with no dialog across updates. A build of your own signed ad hoc is a new program to the Keychain each time: the first time it reads a remembered key macOS asks whether Flint may use your confidential information. Always Allow asks for your login password and stops the dialog until the next build; Deny makes Flint ask for the master password instead.
Touch ID to open a vault (macOS)
Section titled “Touch ID to open a vault (macOS)”On a Mac with Touch ID, a release of Flint keeps a remembered vault key behind Touch ID: it is released only after Touch ID, or your Mac’s password when Touch ID cannot be used (the lid closed). So remembering a vault does not let anyone using your unlocked Mac open it. It is one Touch ID per open: Flint reopening the last vault at launch asks for it first. The master password still opens the vault as always.
- On by default wherever it can be: a release of Flint (signed, with its provisioning profile) on a Mac with Touch ID. Elsewhere (Linux, Windows, a build of your own) Remember on this computer works as before, and the Settings → Vault → Touch ID row does not show.
- The first start of a Flint with Touch ID moves the keys this Mac already remembers behind it, asking nothing; from then on opening them asks for Touch ID. A vault you remember later goes there too: on such a Mac the box reads Remember on this computer (open with Touch ID) and says so.
- To open remembered vaults with no prompt instead, turn Settings → Vault → Touch ID off. Flint says what that means (anyone using your unlocked Mac opens them, with no Touch ID and no password), then asks for Touch ID once and moves the keys back. Cancelled, nothing changes. Turning it on again moves them back behind Touch ID, asking nothing.
- Cancelling Touch ID at an open leaves the vault locked: Unlock with Touch ID asks again, or type the master password. Remember on this computer stays ticked, since the key is still there; untick it to remove the key.
- After a lock (⌘L, the idle time, the screen lock, sleep), the lock screen shows
Unlock with Touch ID under the master password field: click it for Touch ID, or type
the password. Flint never asks for Touch ID on its own after a lock; you pick. The same
holds on the lock screen a waiting
flintcommand brings up. With Touch ID off, a vault locked in this run opens only with its master password, as before. - The key is in the Mac’s data-protection keychain with a user presence access control:
macOS itself, not Flint, refuses to hand it over without you. No other program, and no
copy of Flint that is not a release, can read it. Forget on this device removes it.
flint vault lockcannot reach that keychain (the CLI never can): it locks the vault in Flint, and the key stays, still behind Touch ID; with Flint running the command says so.
The window’s own lock
Section titled “The window’s own lock”Closing Flint’s window does not quit it: Flint stays in the menu bar (macOS) or the system tray (Linux), the vault stays unlocked, and the programs you approved keep working. The window is locked: opening it again, from the menu bar icon (Open Flint), the Dock, or by launching Flint again, shows a lock screen that opens with Touch ID (or your Mac’s password), polkit on Linux, or the vault’s master password. Until then the window shows the vault’s name and how many commands wait for an answer, nothing from inside the vault, and nobody can type into the sessions behind it.
A new program that asks while the window is locked waits, as usual, for up to two minutes: Flint comes to the front, and you answer once the window is open.
The menu bar icon also has Lock Vault (the vault’s own lock, which ends every grant) and Quit Flint. ⌘Q, Quit Flint in the command palette and Ctrl+Shift+Q on Linux quit too. On a Linux desktop that shows no tray icon (GNOME without a tray extension, any Wayland session), the first close asks whether to keep Flint running or quit (closing the window); kept running, launch Flint again to bring its window back.
Several vaults
Section titled “Several vaults”Flint remembers every vault it has opened on this machine, most recent first.
flint vault list # * marks the current vaultflint vault open ~/Work/work.flint # open a vault file and make it currentflint vault use "Home Lab" # switch by name (or by path)flint --vault work host list # use another vault for one commandflint vault rename "Home Lab" # rename the current vaultflint vault forget work # drop it from the list; the file is kept--vault takes a vault’s name (any case) or a path to its file.
Rename or move a vault
Section titled “Rename or move a vault”flint vault rename <new-name> changes the name stored inside the vault, and its entry in
the list. The file keeps its name and place, so a test vault can become your real one
without being copied. Two vaults in the list cannot share a name (ignoring case), since
--vault <name> could no longer tell them apart. The desktop app has Rename in
Manage vaults and in Settings → Vault, for the open vault.
To move a vault, move its file (in Finder, a file manager or with mv) and open it from
its new place: Flint recognises it and replaces the old entry in the list instead of
keeping a dead one.
Change the master password
Section titled “Change the master password”flint vault passwd # the current vaultflint --vault work vault passwd # another oneFlint asks for the current master password, then the new one twice, and prints how
strong the new one is, from Very weak (0) to Very strong (4). The estimate is
zxcvbn’s, run inside Flint: common passwords, words
and names (also reversed or with @ for a), rows of keys, repeats, sequences, years
and dates all count as easy to guess, and so does the vault’s own name. Any password of 8
characters or more is accepted, but under Strong (3) Flint warns you: a vault shared
through a remote vault will need at least that.
In the desktop app it is Change master password… in Settings → Vault, with the
estimate shown as you type. While the app holds the vault unlocked, flint vault passwd
is refused and points you there, so two programs never re-key one vault at once.
What changes and what stays:
- The vault gets a new salt and a new key. Every saved password, private key and passphrase is sealed again under the new key, and this machine’s activity file is re-encrypted with it.
- The vault keeps its id, so its place in the vault list, the app’s layout and its activity log stay with it.
- Remember on this computer stays on if it was on: the new key replaces the old one in the keychain.
- Other machines that use the vault through a synced folder need the new password the next time they open it. A vault connected to a server changes it only in step with the server, and its other machines are asked for the new one at their next sync.
Flint writes the re-encrypted vault as a copy next to it (home.flint.rekey) and only
then puts it in place, in one rename. If the computer stops halfway, the vault on disk is
either the old one, which opens with the old password, or the new one; a leftover copy is
removed the next time the vault is unlocked.
The vault list
Section titled “The vault list”The list lives in a small file in your config folder. It holds file paths, vault names and each vault’s id (a random number kept inside the vault, so it survives a new master password), never anything from inside a vault:
| OS | Location |
|---|---|
| macOS | ~/Library/Application Support/Flint/vaults.json |
| Linux | $XDG_CONFIG_HOME/flint/vaults.json (default ~/.config/flint/) |
Set FLINT_CONFIG_DIR to use another folder.
Syncing a vault
Section titled “Syncing a vault”To keep a vault in step on several machines, connect it to a server you run: Sync a vault across machines. The rest of this section is for a vault kept in a cloud folder instead.
A vault is a single file, written with a rollback journal that is removed after each
change, so a sync client only ever sees the .flint file. If two machines change the
vault before it syncs, your sync client keeps one version and usually sets the other
aside as a conflict copy (home (conflict copy).flint, home (1).flint, depending
on the client). Merge it back into the vault:
flint vault merge "~/Dropbox/home (conflict copy).flint"Merged /Users/me/Dropbox/home (conflict copy).flint into vault 'home': 2 added, 1 updated, 1 removed.CHANGE KIND NAMEadded host dbadded host api-2updated host webremoved host oldrenamed host api-2 (was api)The copy was not changed; delete it once the vault looks right.Flint asks for the master password and merges record by record: a host, key, credential,
tunnel or known host changed on both machines keeps the later change, one removed on a
machine stays removed unless the other changed it afterwards, and everything else from
both sides is kept. When both machines added a host with the same alias, the one added
first keeps it and the other becomes api-2; the list says so. The details are in
Vault format.
- The copy must be the same vault under the same master password. A copy of another vault is refused, and so is one that no longer opens with this password (it was changed on one machine and not the other): open the copy with its own password and change it to match first.
- The copy is only read. Flint opens a private copy of it in its config folder and removes it when the merge ends, so the merge itself never sets off your sync client. Once the vault looks right, delete the conflict copy yourself.
- While Flint holds the vault unlocked,
flint vault mergeis refused: lock it in Flint, merge, then unlock it again. --jsonprints the same report: counts, one entry per record changed, and the renames and cleared references innotes.
The merge relies on each machine’s clock. A machine whose clock is far behind can lose an edit made after another machine’s.