Skip to content

Build from source

Flint is written in cfire and links three native libraries: libssh (SSH), libsodium (key derivation and encryption) and SQLCipher (the encrypted vault file). They are found through pkg-config and linked dynamically.

Flint is built against cfire commit 3963814. The installer builds whatever cfire’s main points to, so check the commit first:

Terminal window
git ls-remote https://github.com/gsandoval/cfire refs/heads/main
curl -fsSL https://cfire.memo.engineer/install.sh | sh
cfire doctor
Terminal window
brew install libssh libsodium sqlcipher pkg-config
Terminal window
sudo apt install libssh-dev libsodium-dev libsqlcipher-dev pkg-config openssh-server

From the repository root:

Terminal window
cfire build
./build/flint --version

The output lists the library versions that were linked:

flint 0.0.0-dev
libssh 0.12.2/openssl/zlib
libsodium 1.0.22
sqlite 3.54.1 (SQLCipher 4.20.0 community)
Terminal window
scripts/test.sh

The script runs the suites in src/ and spike/. It starts a throwaway sshd on 127.0.0.1:2222, with its own host key, user key and config in a temporary directory, so the SSH tests can open a real PTY. On macOS the spike test also opens the PTY in a hidden WebView and checks that the output reaches the terminal. It does not touch your system sshd or ~/.ssh. To use another port, set FLINT_TEST_SSH_PORT.

To run only the tests that need no network, call cfire test src. The SSH tests then print SKIP.

With Docker running:

Terminal window
scripts/linux-check.sh

It builds a Debian image with cfire pinned to the same commit and the apt packages above, builds flint and the terminal spike, runs the tests, and opens the spike’s real GTK window under Xvfb to check that SSH output reaches the terminal.