
| Asset | Module | What it does |
|---|---|---|
| zarlcode | zarlcode/ | Terminal coding-agent TUI/CLI — plan, build, switch models, resume sessions, inspect diffs, verify. |
| zkit | zkit/ | The Go agent substrate: streaming runner, tool registry, LLM providers, guardrails, compaction, MCP, sandboxing, vault. |
| swebench-eval | swebench-eval/ | SWE-bench evaluation driver on the same coding-agent assembly. |
| examples | examples/ | Deterministic harnesses that isolate individual patterns, runnable with no LLM. |
# Homebrew
brew install zarldev/tap/zarlcode
# or build from source
cd zarlmono && go tool task zarlcode
# first run
zarlcode init
zarlcode keys set anthropic "$ANTHROPIC_API_KEY"
zarlcode
zarlcode # interactive TUI
zarlcode -continue # resume the last session
zarlcode --headless --prompt-file t.md # one-shot for scripts/CI
zarlcode keys list # show provider keys (masked)
zarlcode upgrade # self-update from GitHub Releases
Supported providers: Anthropic, OpenAI, DeepSeek, Gemini, Vertex AI, llama.cpp, Ollama, plus OAuth-backed Claude Code and OpenAI Codex surfaces.
[!NOTE] zarlcode configures model endpoints but doesn't start model servers. Run Ollama, llama.cpp, LM Studio, or another OpenAI-compatible server yourself for local inference.
| Mode | Tools | Use case |
|---|---|---|
| Plan | Read-only | Investigate the codebase, propose a strategy — no edits, no shell. |
| Build | Full tool surface | Read, edit, patch, bash, web, MCP, plans, sub-agents — subject to guardrails. |
The TUI streams everything live: model output, tool calls, command results, diffs, plan state, and the file-change log. Sessions persist locally — zarlcode -continue picks up right where you left off.
See the interface tour →
go get github.com/zarldev/zarlmono/zkit@latest
A minimal agent is just a provider, a tool registry, and the runner:
package main
import (
"context"
"fmt"
"log"
"os"
"github.com/zarldev/zarlmono/zkit/agent/runner"
"github.com/zarldev/zarlmono/zkit/ai/llm/anthropic"
"github.com/zarldev/zarlmono/zkit/ai/tools"
)
type weatherArgs struct {
City string `json:"city" doc:"City to report the weather for"`
}
type weather struct{}
func (weather) Definition() tools.ToolSpec {
return tools.ToolSpec{
Name: "weather",
Description: "Report the weather for a city.",
Parameters: tools.SchemaFor[weatherArgs](),
}
}
func (weather) Execute(_ context.Context, call tools.ToolCall) (*tools.ToolResult, error) {
args, err := tools.DecodeArgs[weatherArgs](call.Arguments)
if err != nil {
return tools.Failure(call.ID, err), nil
}
return tools.Success(call.ID, args.City+": sunny, 21C"), nil
}
func main() {
prov, err := anthropic.NewProvider(os.Getenv("ANTHROPIC_API_KEY"))
if err != nil {
log.Fatal(err)
}
r := runner.New(runner.ClientFromProvider(prov),
runner.WithTools(tools.NewRegistry(weather{})),
runner.WithMaxIterations(8),
)
res := r.Run(context.Background(), runner.TaskSpec{Prompt: "What is the weather in Oslo?"})
if res.Err != nil {
log.Fatal(res.Err)
}
fmt.Println(res.FinalContent)
}
Swap anthropic for openai, gemini, deepseek, ollama, or llamacpp — the runner stays the same. To run without a key or network:
go run -C examples ./shared_infra
go run -C examples ./releasegate -scripted
Add guardrails, compaction, sandboxing, retrieval, and verified completion as options when you need them.
| Layer | Package | Docs |
|---|---|---|
| Runner | zkit/agent/runner | Streaming tool-calling loop |
| Tools | zkit/ai/tools | Registry, schemas, effects, MCP |
| Guardrails | zkit/agent/guardrails | Schema repair, shell policy, caps, verifier feedback |
| Compaction | zkit/agent/compact | Keeping long sessions inside context |
| MCP | zkit/mcp | Model Context Protocol client/server |
| Vault | zkit/vault | Encrypted credential storage |
| Vector store | zkit/vectorstore | Embedding + retrieval |
| Docstore | zkit/docstore | Document storage layer |
| zhttp | zkit/zhttp | HTTP client foundation |
zarlcode/ --- Coding-agent TUI & CLI
zkit/ --- Reusable agent libraries
swebench-eval/ --- SWE-bench evaluation driver
examples/ --- Deterministic harnesses & patterns
site/ --- Astro/Starlight docs site
docker/ --- Container setup for eval runs
dist/ --- Release artifacts
go tool task check # build -> vet -> test (examples, zkit, zarlcode, swebench-eval)
go tool task lint # golangci-lint across CI-covered modules
go tool task race # zkit race-detector suite
go tool task zarlcode # build+install to ~/.local/bin
zarlcode
go run ./zarlcode/cmd # run from source
go run ./zarlcode/cmd -continue # resume last session
zarlcode and zkit code tools can execute processes, mutate files, fetch web pages, connect to MCP servers, and call external LLM APIs. Guardrails and sandboxing reduce risk but don't turn your user account into a disposable sandbox. Review tool calls when using powerful models or unfamiliar workspaces.
MIT — LICENSE
166 commits
Hacker News (1)
Go
99.3%

| Asset | Module | What it does |
|---|---|---|
| zarlcode | zarlcode/ | Terminal coding-agent TUI/CLI — plan, build, switch models, resume sessions, inspect diffs, verify. |
| zkit | zkit/ | The Go agent substrate: streaming runner, tool registry, LLM providers, guardrails, compaction, MCP, sandboxing, vault. |
| swebench-eval | swebench-eval/ | SWE-bench evaluation driver on the same coding-agent assembly. |
| examples | examples/ | Deterministic harnesses that isolate individual patterns, runnable with no LLM. |
# Homebrew
brew install zarldev/tap/zarlcode
# or build from source
cd zarlmono && go tool task zarlcode
# first run
zarlcode init
zarlcode keys set anthropic "$ANTHROPIC_API_KEY"
zarlcode
zarlcode # interactive TUI
zarlcode -continue # resume the last session
zarlcode --headless --prompt-file t.md # one-shot for scripts/CI
zarlcode keys list # show provider keys (masked)
zarlcode upgrade # self-update from GitHub Releases
Supported providers: Anthropic, OpenAI, DeepSeek, Gemini, Vertex AI, llama.cpp, Ollama, plus OAuth-backed Claude Code and OpenAI Codex surfaces.
[!NOTE] zarlcode configures model endpoints but doesn't start model servers. Run Ollama, llama.cpp, LM Studio, or another OpenAI-compatible server yourself for local inference.
| Mode | Tools | Use case |
|---|---|---|
| Plan | Read-only | Investigate the codebase, propose a strategy — no edits, no shell. |
| Build | Full tool surface | Read, edit, patch, bash, web, MCP, plans, sub-agents — subject to guardrails. |
The TUI streams everything live: model output, tool calls, command results, diffs, plan state, and the file-change log. Sessions persist locally — zarlcode -continue picks up right where you left off.
See the interface tour →
go get github.com/zarldev/zarlmono/zkit@latest
A minimal agent is just a provider, a tool registry, and the runner:
package main
import (
"context"
"fmt"
"log"
"os"
"github.com/zarldev/zarlmono/zkit/agent/runner"
"github.com/zarldev/zarlmono/zkit/ai/llm/anthropic"
"github.com/zarldev/zarlmono/zkit/ai/tools"
)
type weatherArgs struct {
City string `json:"city" doc:"City to report the weather for"`
}
type weather struct{}
func (weather) Definition() tools.ToolSpec {
return tools.ToolSpec{
Name: "weather",
Description: "Report the weather for a city.",
Parameters: tools.SchemaFor[weatherArgs](),
}
}
func (weather) Execute(_ context.Context, call tools.ToolCall) (*tools.ToolResult, error) {
args, err := tools.DecodeArgs[weatherArgs](call.Arguments)
if err != nil {
return tools.Failure(call.ID, err), nil
}
return tools.Success(call.ID, args.City+": sunny, 21C"), nil
}
func main() {
prov, err := anthropic.NewProvider(os.Getenv("ANTHROPIC_API_KEY"))
if err != nil {
log.Fatal(err)
}
r := runner.New(runner.ClientFromProvider(prov),
runner.WithTools(tools.NewRegistry(weather{})),
runner.WithMaxIterations(8),
)
res := r.Run(context.Background(), runner.TaskSpec{Prompt: "What is the weather in Oslo?"})
if res.Err != nil {
log.Fatal(res.Err)
}
fmt.Println(res.FinalContent)
}
Swap anthropic for openai, gemini, deepseek, ollama, or llamacpp — the runner stays the same. To run without a key or network:
go run -C examples ./shared_infra
go run -C examples ./releasegate -scripted
Add guardrails, compaction, sandboxing, retrieval, and verified completion as options when you need them.
| Layer | Package | Docs |
|---|---|---|
| Runner | zkit/agent/runner | Streaming tool-calling loop |
| Tools | zkit/ai/tools | Registry, schemas, effects, MCP |
| Guardrails | zkit/agent/guardrails | Schema repair, shell policy, caps, verifier feedback |
| Compaction | zkit/agent/compact | Keeping long sessions inside context |
| MCP | zkit/mcp | Model Context Protocol client/server |
| Vault | zkit/vault | Encrypted credential storage |
| Vector store | zkit/vectorstore | Embedding + retrieval |
| Docstore | zkit/docstore | Document storage layer |
| zhttp | zkit/zhttp | HTTP client foundation |
zarlcode/ --- Coding-agent TUI & CLI
zkit/ --- Reusable agent libraries
swebench-eval/ --- SWE-bench evaluation driver
examples/ --- Deterministic harnesses & patterns
site/ --- Astro/Starlight docs site
docker/ --- Container setup for eval runs
dist/ --- Release artifacts
go tool task check # build -> vet -> test (examples, zkit, zarlcode, swebench-eval)
go tool task lint # golangci-lint across CI-covered modules
go tool task race # zkit race-detector suite
go tool task zarlcode # build+install to ~/.local/bin
zarlcode
go run ./zarlcode/cmd # run from source
go run ./zarlcode/cmd -continue # resume last session
zarlcode and zkit code tools can execute processes, mutate files, fetch web pages, connect to MCP servers, and call external LLM APIs. Guardrails and sandboxing reduce risk but don't turn your user account into a disposable sandbox. Review tool calls when using powerful models or unfamiliar workspaces.
MIT — LICENSE
Hacker News (1)
166 commits
Go
99.3%