Skip to main content

Build and run Taji from source

You finish with Taji's kernel built from this checkout, running windowed or headless. You need macOS 26 or later on Apple Silicon, Linux (builds on Debian 13, where the sandbox suite passes; CI runs the workspace tests on Ubuntu 24.04, but no installed build has been walked there), or Windows 11 24H2, build 26100.9278 or later (x64); a network, since the build downloads dependencies and keyless data sources read the internet; and disk and time: a cold build takes minutes and target/ passes 10 GB. To use the app instead, install it. Run every command at the repository root, in Git Bash on Windows.

Prerequisites​

On Windows, do Windows first.

  1. Install your platform's build tools, then rustup, mise and uv. rustup and mise fetch the pinned toolchain in step 3; uv lays Taji's Python in Build. Each installer's script asks you to follow its on-screen instructions.

    # macOS: the Command Line Tools, since `make dev` compiles the Touch ID helper with `xcrun swiftc`
    xcode-select --install
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    curl -fsSL https://mise.run | sh
    curl -LsSf https://astral.sh/uv/install.sh | sh

    Open a new terminal (Git Bash on Windows) so the new tools are on PATH. mise must be 2026.11.15 or later, which reads mise.lock's format; on Windows winget upgrade jdx.mise moves an older one.

  2. Clone the repository and enter it.

    # macOS and Linux
    git clone https://github.com/TajiAI/Taji.git
    cd Taji
  3. Install the toolchain .mise.toml pins (Rust, Node, Go for the Tailscale sidecar, Bun and pnpm). Without mise, install Rust, Go 1.27, Node 22.13 or later, pnpm 12 and Bun 1.4 yourself.

    # macOS (zsh)
    eval "$(~/.local/bin/mise activate zsh)"
    mise trust
    mise install

Build​

  1. Set up the checkout:

    make setup

    It adds Rust's wasm32-unknown-unknown target, runs pnpm install --frozen-lockfile, unpacks Electron, installs the headless browser the gate scripts drive, and lays Taji's Python, Yahoo's and EDGAR's runtime, in .python. It ends with the interpreter .python/python (python.exe on Windows) in place.

  2. Build the page, the window, the kernel and the sidecars the kernel spawns from its own directory, in this order: the kernel embeds the page, and a debug kernel spawns window/.

    # macOS
    pnpm --filter @taji/ui build
    pnpm --filter @taji/window build
    cargo build --locked -p taji-open
    make sidecar whatsapp unlock

    Cargo ends with Finished. The kernel is target/debug/taji, with taji-tailscale and taji-whatsapp beside it (.exe on Windows), and taji-unlock on macOS, the Touch ID helper.

Run​

  1. With the window. make dev runs the builds above, then opens Taji's window.

    make dev

    FRESH=1 make dev starts empty, with state, store and home under target/fresh on port 7790, and never attaches to a kernel on 7780.

  2. Headless, the wire the only client. TAJI_WIRE=0 takes a free port, which the kernel writes to wire-port in its state dir, after its token:

    export TAJI_STATE_DIR=$(mktemp -d) TAJI_STORE_DIR=$(mktemp -d) TAJI_HOME=$(mktemp -d) TAJI_WIRE=0
    TAJI_HEADLESS=1 target/debug/taji &
    until [ -s "$TAJI_STATE_DIR/wire-token" ]; do sleep 1; done
    curl -H "x-taji-token: $(cat "$TAJI_STATE_DIR/wire-token")" "http://127.0.0.1:$(cat "$TAJI_STATE_DIR/wire-port")/read/desks"

    The kernel listens on 127.0.0.1 only. Each launch writes new tokens to the state dir, and every request carries wire-token as x-taji-token (the wire). One kernel runs per state dir and store. The answer lists the desks of the empty state, one active:

[
{
"active": true,
"created_at": 1796331819,
"id": "01a23db8-4fff-7583-ae2b-b12000a08625",
"last_active": 1796331819,
"name": null,
"notes": 0
}
]

Captured 2026-12-03 on a keyless headless kernel.

  1. Stop it, with the same variables set: target/debug/taji quit prints taji quit: stopped Taji on 127.0.0.1:<port>.

Upgrade​

Stop Taji (below), git pull and build again; the state dir is kept.

Before 1.0 an upgrade can change the store's layout: the next start rebuilds an older store from pulls.db, and refuses one a newer Taji wrote (run that Taji, or delete the store dir's taji.duckdb to rebuild it). Never make reset for this: it deletes the state, store and home. What a version may change: Compatibility.

Stop and reset​

  • Stop one Taji: target/debug/taji quit. It reads TAJI_WIRE (default 7780) and the state dir's token. POST /verb/ui/quit does the same. Holding exits, it refuses, naming them; taji quit --yes stops them too.
  • Stop every running Taji: make down.
  • Start over: make reset lists the state, store and home it would delete and stops there. With Taji stopped, YES=1 make reset deletes them and removes Taji's MCP server and skill from every agent it finds.

Unless TAJI_STATE_DIR, TAJI_STORE_DIR and TAJI_HOME name them, they are:

StateStoreHome
macOS~/Library/Application Support/Taji~/.local/share/taji/store~/.taji
Linux~/.local/share/taji~/.local/share/taji/store~/.taji
Windows%LOCALAPPDATA%\Taji%LOCALAPPDATA%\Taji\store%USERPROFILE%\.taji

On Linux an absolute $XDG_DATA_HOME replaces ~/.local/share.

Windows​

  1. Update Windows to 24H2 build 26100.9278 or later (winver shows it). Process plugins and the Python sources (Yahoo, EDGAR) need a sandbox that KB5120998 rolls out gradually, so a machine at that build may lack it; once built, Yahoo's and EDGAR's GET /read/plugins rows reading enabled: true and reason: null show it, where a machine without it reads no sandbox: ….
  2. The Visual Studio workload Microsoft.VisualStudio.Workload.VCTools (the MSVC x64 tools and a Windows 11 SDK) comes with the Build Tools command above. LLVM 21 or later needs C:\Program Files\LLVM\bin on PATH.
  3. rustup's default host is x86_64-pc-windows-msvc.

You do not need NASM, CMake or Developer Mode. Build and run as above. The kernel is taji.exe in target/debug/, with taji-tailscale.exe and taji-whatsapp.exe beside it.

Linux​

  • Process plugins and the Python sources (Yahoo, EDGAR) run only in the sandbox. Security holds the sandbox suite's results.
  • On Ubuntu 24.04, allow unprivileged user namespaces for unprofiled programs: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0.
  • On Debian, add /usr/sbin to your PATH: iptables lives there.
  • The vault opens by backup password alone.
  • Closing the window leaves Taji running. GNOME shows its tray item only with the AppIndicator extension; without it, taji ui reopens Taji and taji quit stops it.
  • To run plugins you wrote unconfined, use a debug build with TAJI_UNSANDBOXED=1.

If it fails​

  • another Taji owns <dir>, exit 0. A kernel holds that state dir or store. Run target/debug/taji quit or make down, or give the second its own TAJI_STATE_DIR and TAJI_STORE_DIR.
  • no sandbox: … on every process plugin and Python source (Linux). Bubblewrap, unprivileged user namespaces, slirp4netns, iptables or ip is missing or off, the message naming which. Nothing runs unconfined: fix the cause under Linux.
  • no sandbox: needs Windows' process isolation, …: run Windows Update on every process plugin and Python source; the chart shows it for Yahoo's bars (Windows). The build is below the floor or KB5120998's rollout has not reached it; nothing runs unconfined.
  • The linker is killed or the build runs out of memory. Set CARGO_BUILD_JOBS=2 (Linking with GNU ld is memory-hungry; this fits a 16 GB machine).

Next​