Installation
Requires Python 3.12 or newer. In your project:
uv add redwood-trillim
uv run redwood version
For pip environments, use pip install redwood-trillim, then redwood version.
The first redwood command sets up the bundled CPU worker, kernels and benchmark helper, and moves skills into your project’s .agents/skills/. No compiler is needed for inference or tuning. Python imports and CLI commands use redwood.
Build from source
Source builds require uv and a C/C++ toolchain. Run these commands from a Redwood checkout:
uv sync
uv run task build-cpu
uv run task kernels
uv run redwood version
uv sync installs the Python package and development dependencies. build-cpu builds the executable that runs the model. task kernels builds the scalar and host-backend libraries as kernels.so and index.json in the active version directory.
The build tasks install the native components in your Redwood data directory.
Toolchains
For source builds and custom kernels, Redwood tries available toolchains, starting with Zig, followed by GCC and Clang. Windows also has MinGW candidates. You can explicitly select C and C++ compilers with CC and CXX.
| Platform | Source-build setup |
|---|---|
| Linux | Install Zig, GCC or Clang, including C++ support |
| macOS | Install a compatible toolchain; Apple platforms can use Accelerate for BLAS kernels |
| Windows | Use a compatible Zig or MinGW toolchain |
Build scalar or the current machine’s x86 or neon backend.
Some kernels require OpenBLAS or Accelerate. The compiler considers each kernel when its hardware and software requirements are available.
Choose a data directory
Redwood writes generated data under:
~/.redwood/<installed-version>/
Set REDWOOD_HOME before first use to select another location. In a POSIX shell:
export REDWOOD_HOME=/path/to/redwood-data
uv run redwood version
In PowerShell, set $env:REDWOOD_HOME instead. Set the variable to the base directory. Redwood appends the installed package version.
If a wheel’s native files have already been moved, changing the location requires a forced reinstall. From a source checkout, rebuild the components in the selected location. See files and versions.
From a source checkout, build only one backend with uv run task kernels --backend scalar or select the host backend. The task runs scripts/build_kernels.py and replaces that backend’s built-in library and index. Custom kernels remain separate.
Check the setup
uv run redwood version
uv run redwood compile --help
uv run redwood run --help
These check the command installation. The quick start exercises compilation and inference.
When working inside the uv project, prefix commands with uv run. Outside it, redwood must be installed in the active Python environment.