Lilt is a cross-platform command-line tool that converts Hi-Res FLAC and ALAC files to 16-bit FLAC files with a sample rate of 44.1kHz or 48kHz. Written in Go for excellent performance and cross-platform compatibility.
Lilt stands for "lightweight intelligent lossless transcoder". It is also a form of traditional singing common in the Goidelic speaking areas of Ireland, Scotland and the Isle of Man, though singing styles like it occur in many other countries.
--prefer-hardlinksFor Linux and macOS, you can use the installation script:
curl -sSL https://raw.githubusercontent.com/Ardakilic/lilt/main/install.sh | bash
Or download and run it manually:
wget https://raw.githubusercontent.com/Ardakilic/lilt/main/install.sh
chmod +x install.sh
./install.sh
For macOS users, you can install Lilt using Homebrew:
brew tap Ardakilic/tap
brew install lilt
Download the latest release for your platform from the Releases page:
lilt-windows-amd64.exe (x64) or lilt-windows-arm64.exe (ARM64)lilt-darwin-amd64 (Intel) or lilt-darwin-arm64 (Apple Silicon)lilt-linux-amd64 (x64), lilt-linux-arm64 (ARM64), lilt-linux-386 (x86), or lilt-linux-arm (ARM)git clone https://github.com/Ardakilic/lilt.git
cd lilt
go build -o lilt .
You can use this tool in one of two ways:
Uses ardakilic/sox_ng:latest by default, which includes both sox_ng and FFmpeg.
Using Local Installation:
sudo apt install soxbrew install soxsudo apt install ffmpegbrew install ffmpeglilt <source_directory> [options]
--target-dir <dir> Specify target directory (default: ./transcoded)
--copy-images Copy JPG and PNG files
--no-preserve-metadata Do not preserve ID3 tags and cover art using FFmpeg (default: false)
--enforce-output-format <fmt> Enforce output format for all files: flac, mp3, or alac
--prefer-hardlinks Prefer filesystem hardlinks over copying for files that do not need transcoding
--use-docker Use Docker to run Sox instead of local installation
--docker-image <img> Specify Docker image (default: ardakilic/sox_ng:latest)
--self-update Check for updates and self-update if newer version available
Using local SoX installation:
# Windows
lilt.exe "C:\Music\MyAlbum" --target-dir "C:\Music\MyAlbum-16bit" --copy-images
# macOS/Linux
./lilt ~/Music/MyAlbum --target-dir ~/Music/MyAlbum-16bit --copy-images
Using Docker:
# Windows
lilt.exe "C:\Music\MyAlbum" --target-dir "C:\Music\MyAlbum-16bit" --use-docker
# macOS/Linux
./lilt ~/Music/MyAlbum --target-dir ~/Music/MyAlbum-16bit --use-docker
Convert all files to MP3:
# Windows
lilt.exe "C:\Music\MyAlbum" --enforce-output-format mp3 --target-dir "C:\Music\MyAlbum-MP3"
# macOS/Linux
./lilt ~/Music/MyAlbum --enforce-output-format mp3 --target-dir ~/Music/MyAlbum-MP3
Convert all files to ALAC:
# Windows
lilt.exe "C:\Music\MyAlbum" --enforce-output-format alac --target-dir "C:\Music\MyAlbum-ALAC"
# macOS/Linux
./lilt ~/Music/MyAlbum --enforce-output-format alac --target-dir ~/Music/MyAlbum-ALAC
Check for updates:
lilt --self-update
When source and target directories reside on the same filesystem, you can use --prefer-hardlinks to create filesystem hardlinks for files that do not need transcoding instead of making full copies. This saves disk space while preserving the directory structure. If a hardlink cannot be created (cross-device link, unsupported filesystem, etc.), lilt falls back to a normal copy and emits a warning.
# Windows
lilt.exe "C:\Music\MyAlbum" --target-dir "C:\Music\MyAlbum-16bit" --prefer-hardlinks
# macOS/Linux
./lilt ~/Music/MyAlbum --target-dir ~/Music/MyAlbum-16bit --prefer-hardlinks
Note: Hardlinks share inode data. Any in-place modification to the source or target file will affect both paths.
When using the --use-docker option:
ardakilic/sox_ng:latest by default, which is a containerized version of SoX-NGYou can specify a different Docker image with the --docker-image option:
lilt ~/Music/MyAlbum --use-docker --docker-image your/sox-image:tag
Alternative Docker images you can use:
- bigpapoo/sox: Another SoX Docker image
- Any image that provides SoX installed as the sox command
Lilt includes Serena — a semantic code retrieval MCP server that gives AI coding tools (Claude Code, OpenCode, VS Code extensions, etc.) IDE-level understanding of the codebase through symbol indexing, semantic search, and structured editing. Serena uses gopls (the Go language server) for deep Go-specific code understanding.
make serena-up
| Command | Description |
|---|---|
make serena-up |
Start Serena MCP service |
make serena-stop |
Stop Serena MCP service |
make serena-logs |
View Serena logs |
make serena-index |
Index the project workspace |
make serena-health |
Health check the project workspace |
| Service | Port |
|---|---|
| SSE (MCP endpoint) | 10122 |
| Dashboard | 34283 |
Access the Serena dashboard at http://localhost:34283
OpenCode — opencode.jsonc is pre-configured in the project root.
Claude Code:
claude mcp add serena --transport sse --url http://localhost:10122/sse
VS Code / Cursor / Windsurf:
Create .vscode/mcp.json:
{
"mcpServers": {
"serena": {
"type": "sse",
"url": "http://localhost:10122/sse"
}
}
}
After adding new packages, renaming functions, or making other structural changes, re-index the project:
make serena-index
.flac, .m4a (ALAC), and .mp3 files--copy-images is enabled, .jpg and .png files are copied to the target directory--prefer-hardlinks is enabled, files that do not need transcoding are created as filesystem hardlinks when possible; otherwise, they are copied as usualWhen using --enforce-output-format, all audio files are converted to the specified format:
--enforce-output-format flac)--enforce-output-format mp3)--enforce-output-format alac)--multi-threaded option for performance-G flag ensures proper gain handlingdither when downsampling to 16-bit for better qualityFor detailed development information, including advanced build options, testing procedures, and contribution guidelines, see Development.md.
# Clone the repository
git clone https://github.com/Ardakilic/lilt.git
cd lilt
# Build for current platform
go build -o lilt .
# Or use Make
make build
# Run tests
go test -v ./...
# Or use Make
make test
To enable the self-update feature, set the version during build:
# Set specific version
go build -ldflags="-X main.version=v1.2.3" -o lilt .
# Use git tags (recommended)
make build # Automatically uses git describe for versioning
See Development.md for detailed version management and build options.
The project uses GitHub Actions to automatically build binaries for all supported platforms on every commit. The workflow:
If you're migrating from the original bash script (flac-converter.sh), the usage is identical. Simply replace:
# Old
./flac-converter.sh ~/Music/Album --target-dir ~/Music/Album-16bit
# New
./lilt ~/Music/Album --target-dir ~/Music/Album-16bit
All command-line arguments remain the same for seamless migration.
This project is open-source under the MIT License.
Arda Kilicdagi
Contributions are welcome! Please feel free to submit a Pull Request.