Skip to main content

Crate buildwithnexus

Crate buildwithnexus 

Source
Expand description

A hilariously fast, agentic AI coding CLI — one static binary, written in Rust. Works with hosted APIs (Anthropic, OpenAI, OpenRouter, Groq, Hugging Face), local models (Ollama, llama.cpp, LM Studio), and any OpenAI-compatible /v1 endpoint.

This crate is the whole application: the binaries (buildwithnexus and the bwn alias) are thin shims over run. It ships as a library so integration suites can reach the internals directly — it is not a stable API for building other tools on, and minor versions may rearrange it.

§Install

cargo install buildwithnexus --locked   # installs `buildwithnexus` + `bwn`
npm install -g buildwithnexus           # prebuilt, provenance-attested binary

Then run bwn in a repository and describe a task. The agent plans, edits files, and runs commands — asking before each change (permission gates), with checkpoints that can rewind any write (/undo), lifecycle hooks, and hot-swappable models (/model, validated before it commits).

§Map of the crate

ModuleWhat lives there
agentthe ReAct loop: planning, tool calls, recovery, compaction
providerwire protocols (Anthropic, OpenAI-compat, Ollama native), streaming, retries
toolsthe tool surface: file IO, search, shell, web — with permission gating
tuithe alternate-screen terminal UI: incremental wrap cache, diffs, autocomplete
checkpointpre-edit snapshots and turn-grouped undo
sessionsave/resume of conversations
workflowbackground /schedule and /loop runs, persisted across restarts
configprovider presets, settings files, key store, bundled skills
hooksClaude-Code-style lifecycle hooks (deny-capable, never grant)

Performance is the project’s primary design lever; every claim is measured and reproducible — see BENCHMARKS.md in the repository. Docs, guides, and the changelog live at https://buildwithnexus.dev; source at https://github.com/Garretts-Apps/buildwithnexus.

Modules§

agent
checkpoint
config
hooks
knowledge
local
media
onboarding
provider
report
rules
session
tools
trace
tui
update
verifier
workflow

Enums§

Mode

Functions§

build_provider
check_and_offer_install_dependencies
classify
kill_local_server
run