You can build the application using this repository.
Install a compiler and Python setuptools, for example:
# Debian/Ubuntu
apt install build-essential python3-setuptools libnss3
# MacOS
brew install bash python3-setuptools
# Windows
winget install Microsoft.VisualStudio.2022.Community Python.Python.3.13
& 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe'
# then install required componentsUse NVM or mise-en-place or windows-nvm to install the required Node.js version.
From the root of this repository:
nvm install
# or
mise settings add idiomatic_version_file_enable_tools node
mise install
# or
winget install CoreyButler.NVMforWindows
nvm install 24.15.0
nvm use 24.15.0Install Pnpm (if is not yet installed with mise-en-place):
corepack install
# or
curl -fsSL https://get.pnpm.io/install.sh | sh -
# or
winget install pnpm.pnpmpnpm i
pnpm build:di # Generate DI registration files
pnpm build # Build all packages
pnpm build:app:dir # Build Electron app directory
# note: on Windows build:app:dir must be ran in elevated modeRun it from the directory:
pnpm startIf you encounter build or runtime issues, try a clean rebuild:
rm -rf .turbo packages/core/dist freelens/dist
pnpm build:di
pnpm buildThe official binary packages are build in native environment, however you can build arm64 binary on Linux amd64 or amd64 binary on MacOS arm64.
On Linux, install cross-compiler (macOS includes this by default):
# Debian/Ubuntu
apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnuThen set the environment with support for other architectures:
# Debian/Ubuntu
export CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++
export DOWNLOAD_ALL_ARCHITECTURES=true
# MacOS
export DOWNLOAD_ALL_ARCHITECTURES=trueAnd rebuild binary packages for the foreign architecture:
# Debian/Ubuntu
pnpm electron-rebuild -a arm64
# MacOS
pnpm electron-rebuild -a x64Finally, generate binary packages:
# Debian/Ubuntu
pnpm build:app AppImage deb --arm64
# MacOS
pnpm build:app dmg pkg --x64After changing files, especially before commit, run:
trunk check
# or, if trunk is not installed locally
pnpm trunk:checkFor main project TypeScript and HTML files, you can run Biome directly:
biome check
# or, if biome is not installed locally
pnpm biome:checkFor other file types, use Trunk:
trunk check
# or, if trunk is not installed locally
pnpm trunk:checkFor active development with automatic rebuilds:
pnpm dev # Starts the app with file watchingNote: pnpm dev is not recommended as it doesn't work correctly with
webpack. You can use standard workflow
pnpm build && pnpm build:app:dir && pnpm start instead.
pnpm test:unit # Run unit tests
pnpm test:integration # Run integration testsThe project uses an explicit dependency injection registration system. Run pnpm build:di when:
- Adding new
.injectable.tsfiles - Moving or renaming injectable files
- Changing directory structure
- Seeing DI-related runtime errors
The build process runs this automatically, but you can run it manually to verify changes:
pnpm build:diChanges not appearing:
- Clear cache:
rm -rf .turbo packages/core/dist freelens/dist - Full rebuild:
pnpm build && pnpm build:app:dir - Restart app:
pnpm start
Build failures:
- Check build errors:
pnpm build - Check linting:
pnpm lint - Verify dependencies:
pnpm install - Check Node.js version matches
.nvmrc
Runtime errors:
- Check dev console (renderer process) or terminal output (main process)
- For DI-related errors, try regenerating:
pnpm build:di
For more development patterns and troubleshooting, see AGENTS.md.