ZwimKI is a local-first developer tool that turns source code into a navigable architecture model and uses that model as the anchor for AI-assisted changes.
It is an experiment in approaching AI-assisted vibe coding with more planning and understanding: keeping context visible, making changes reviewable, and helping users learn the code and its connections instead of treating AI output as a black box.
- Scans source files and builds an intermediate architecture graph (IR)
- Generates focused slices around an anchor node instead of sending whole files
- Supports structured
opscommands for deterministic, reviewable code edits - Provides a local UI for project exploration, context docs, and provider setup
ZwimKI turns source code into a navigable graph and lets you inspect generated descriptions for individual code elements.
ZwimKI is pre-alpha software. It is actively developed, incomplete, and best suited for local experimentation and development workflows.
- Language support is parser-based and still evolving
- The UI/API surface may change between versions
- Security defaults are local-first (see below)
- The project is especially aimed at people who want to understand the code, architecture, and dependencies they are asking AI to change
ZwimKI is also a live example of the problem it wants to solve: an AI-assisted vibe coding experiment that grew faster than its structure. Before broad feature work, the first priority is cleanup and refactoring, especially in the largest files.
ui/app.jscurrently holds much of the SPA state, rendering, planning, diagram, export, chat, and settings logic in one place.src/api.rscurrently combines routing, API handlers, prompt construction, validation, feature/use-case generation, and parsing/orchestration logic.ui/styles.cssandsrc/extract.rsare secondary refactor candidates once the two largest files are split.
The goal is not cosmetic line-count reduction. The goal is to make ownership boundaries explicit, reduce accidental coupling, and dogfood the product honestly: ZwimKI should become the kind of tool that helps keep AI-assisted projects from drifting into this shape as quickly.
- Open a project without AI first. ZwimKI scans the source code and shows it as a navigable architecture graph.
- Add project context. Describe what the project is, what it is trying to do, and what constraints matter.
- Create descriptions. ZwimKI builds descriptions bottom-up, from smaller code units toward larger structures, so they can be checked and corrected along the way.
- Find or define features. Let ZwimKI suggest features from the code, then edit them or create your own.
- Do the same for use cases. Capture what the project should support from a user or workflow perspective.
- Create a plan. Build a tree-shaped plan, optionally with AI support, before changing code.
- Discuss and apply changes. Talk through plan sections or the whole plan with AI, review the proposed changes, then apply them deliberately.
- Rust toolchain (stable)
cargo runThe app starts on http://127.0.0.1:8787 by default and opens the browser.
cargo test
cargo run -- ui --port 8787
cargo run -- ops validate path/to/ops.json
cargo run -- ops apply path/to/ops.json path/to/file --write- UI binds to
127.0.0.1by default - Optional UI auth via
ZWIMKI_ACCESS_TOKEN(or legacyZWIMKI_UI_PASSWORD) - Provider API keys are stored via OS keychain where available, with file fallback when configured
- Codex can be used via local Codex CLI sign-in (ChatGPT) without storing an API key in ZwimKI
- Claude Code can be used via local Claude Code CLI sign-in without storing an Anthropic API key in ZwimKI
If you intentionally expose the UI on your network:
ZWIMKI_BIND=0.0.0.0 ZWIMKI_ACCESS_TOKEN='choose-a-strong-secret' cargo run -- ui --port 8787Do not expose the UI without setting an access token.
ZwimKI writes local cache/state into .zwimki/ directories. These are ignored by .gitignore and should not be committed.
AI request/response persistence (.zwimki/ai_log.jsonl) is size-capped. Default max size is 8 MiB. Override with ZWIMKI_AI_LOG_MAX_BYTES if needed.
Node description prompts omit context.md by default to keep bulk generation small. Set ZWIMKI_NODE_DESCRIPTION_INCLUDE_PROJECT_CONTEXT=1 to include the project context in scope=node prompts.
cargo check
cargo testA minimal GitHub Actions CI pipeline runs cargo check and cargo test on push/PR.
MIT. See LICENSE.
