Install these two tools (everything else is handled by devbox):
git clone https://github.com/oddur/gnosis.git
cd gnosis
direnv allow # one-time — activates devbox automatically on cd
task setup # installs npm depsAfter this, every time you cd into the repo, devbox activates and puts the correct versions of Node, task, pre-commit, and trufflehog on your PATH.
| Tool | Version | Purpose |
|---|---|---|
| Node.js | 20.x | Matches Electron 34's bundled Node |
| go-task | latest | Runs Taskfile.yml commands |
| pre-commit | latest | Git hook framework |
| trufflehog | latest | Secret detection (used by pre-commit) |
Run task --list to see all tasks. Key ones:
task setup # Install npm deps
task dev # Start Electron dev server
task lint # Run ESLint
task lint:fix # Run ESLint with auto-fix
task format # Format code with Prettier
task format:check # Check formatting
task package # Package the app
task make # Build distributable
Pre-commit hooks catch lint errors, formatting issues, and secrets before they reach the repo. They're optional but encouraged — CI runs the same checks, so setting them up locally saves you a round-trip.
Devbox already puts pre-commit and trufflehog on your PATH. To install the git hooks:
task pre-commit:installThat's it. Hooks now run automatically on every git commit.
- ESLint — lints and auto-fixes JS/TS files
- Prettier — formats code on commit
- TruffleHog — blocks commits containing secrets
- Trailing whitespace / end-of-file fixer — enforces clean files
- check-json / check-yaml — validates config files
- check-added-large-files — prevents files over 1MB
Most hooks auto-fix the files for you. Just re-stage and commit again:
git add -u
git commitTo run all hooks against all files (not just staged ones):
task pre-commit:run- ESLint and Prettier handle formatting — pre-commit fixes it on commit, or run
task formatandtask lint:fixmanually