Getting Started
Requirements
- Java 21
- Either a GGUF model on disk (a coding-capable model of roughly 7B parameters or more; ~1B models usually cannot follow the tool protocol) or a reachable Llamatik Server
Build
./gradlew build # compile and test everything
./gradlew :cli:installDist # cli/build/install/llamatik/bin/llamatik
./gradlew :acp:installDist # acp/build/install/llamatik-acp/bin/llamatik-acpChoose the model
Pass exactly one of these (--discover replaces --server):
| Option | What it does |
|---|---|
-m, --model <file.gguf> | Runs the model in-process through the Llamatik native library (Metal, CUDA or CPU). |
-s, --server <host[:port]> | Uses a Llamatik server. Accepts host, host:port or http://host:port. If the server asks for per-device approval, accept the request on the server’s device; the access token is then kept in ~/.llamatik/cli.properties (readable only by you). Dropped connections are resumed without losing or repeating text. |
--discover | Scans the local network for Llamatik servers (devices with Share this device on) and lets you pick one. Uses mDNS, so both devices must be on the same network with multicast not blocked. |
Inference options (both commands): --temperature, --max-tokens, --context, --threads, --gpu-layers.
Traffic to a server is plain HTTP and is not encrypted. Only use servers you trust on a network you trust.
Using a Llamatik server
A server is the same thing the Llamatik app and the IntelliJ plugin connect to: the app with Share this device turned on, or a Llamatik Server. The CLI and ACP agent share their server client with the plugin, so discovery, pairing and resumable streaming behave the same way.
- The server chooses the model. The agent uses whichever text model is loaded on the server (read from
GET /v1/models) and renders prompts with that model’s chat template. There is no way to pick or load a different model from the CLI. - One backend per run. You cannot switch between a local model and a server inside a session; restart with different flags.
- No automatic tuning. Tuning to your machine does not run with
--server; the server decides. Yourinferenceoptions (temperature, max tokens) still apply. - Pairing. If the server asks for approval, accept the request on its device. The token is kept in
~/.llamatik/cli.properties.
Run it
# Interactive session in the current folder, local model
llamatik --model ~/.llamatik/models/Qwen3-14B-Q4_K_M.gguf
# A Llamatik server
llamatik --server 192.168.1.20
# Scan the network and pick a server
llamatik --discover
# One task, then exit
llamatik -s mac-studio.local -p "fix the failing test in src/Calc.kt"
# Another project folder, approve everything (unattended)
llamatik -C ~/code/app -m model.gguf --yes -p "add a README section about setup"The agent works in the project folder (-C, default: the current directory). It can read, search and list files, use git, and propose edits.
Project rules
Put project rules in LLAMATIK.md (or AGENTS.md) at the project root; they are added to the prompt (only the first 2000 characters by default; raise agent.instructionChars for more, see project notes size). A line @docs/style.md in LLAMATIK.md is replaced by that file. Type /init in a session to have the agent write LLAMATIK.md for you.
Exit codes
| Code | Meaning |
|---|---|
0 | OK |
1 | The task failed or was cancelled |
2 | No usable model or server |
64 | Bad usage |
Debugging
--debugprints each raw model reply, which helps when a small model ignores the tool format.--native-logsshows llama.cpp’s own log output (Metal kernel compilation and similar). The launcher hides it by default; the CLI’s own errors are still shown. Unix launcher only.
