Skip to content

Releases: gaoze1998/zero-code-cli

v0.3.0 — Configurable agent iteration limit

Choose a tag to compare

@gaoze1998 gaoze1998 released this 04 Jul 01:51

Highlights

  • Configurable agent iteration limit — The agent loop's maximum number of reasoning/tool-call turns per message is no longer hard-coded. A new max_iterations key in ~/.zero-code-cli/config.toml controls it, and the default has been raised from 10 to 50, giving the agent more room to complete multi-step tasks before bailing out.
    • Config gains a max_iterations: u32 field with #[serde(default = "default_max_iterations")], mirroring the existing max_tokens / retry_count pattern — omit the key and you get the default, set it to override.
    • agent_loop() in src/main.rs drops its const MAX_ITERATIONS: usize = 10 and now iterates 0..config.max_iterations; all debug/error messages reference the configured value.
    • As with the other numeric settings, there is no environment-variable override — configure it in config.toml.
  • Documentation — README's config.toml examples and the "Configurable" feature list now mention max_iterations, and the architecture/data-flow note reflects the new default of 50 (previously "max 10 iterations"). A small Windows-usage README clarification is also included.

Configuration

Key Type Default Description
max_iterations u32 50 Max reasoning/tool-call turns the agent runs per message before reporting "max iterations reached"

Example:

# ~/.zero-code-cli/config.toml
max_iterations = 30   # lower it to cap long-running loops; raise it for complex tasks

Tests

Added 3 unit tests in src/config.rs:

  • test_default_max_iterationsConfig::default() yields 50
  • test_empty_toml_uses_default_max_iterations — empty config falls back to 50
  • test_explicit_max_iterations_overridemax_iterations = 99 is honored

Full suite: 88 passed, 0 failed, 1 ignored (live API test). cargo clippy --all-targets clean.

Project stats

  • ~4000 lines of Rust across 11 modules
  • Still #![forbid(unsafe_code)] — zero unsafe blocks

Full changelog: v0.2.0...v0.3.0

v0.2.0 — Long-term memory & native Windows tool support

Choose a tag to compare

@gaoze1998 gaoze1998 released this 04 Jul 01:29

Highlights

  • Long-term memory — A new /summary command distills all past sessions for a project into a topic-based memory.md via the API. On every new user message, topic blocks are keyword-scored against your input and the relevant ones (above a 0.10 relevance threshold) are injected as system context, so the agent remembers past decisions across sessions. Sessions older than 7 days are auto-summarized on save/quit, and memory.md is capped at 10 MB with automatic pruning of the oldest topics. New module: src/memory.rs (~755 lines).
  • Native Windows tool support — The bash and grep tools now actually run on Windows. Through conditional compilation, the tools module is split into shell_unix.rs and shell_windows.rs, compiled per-target with #[cfg] while keeping tool names and the dispatch interface identical across platforms.
    • On Windows, bash executes commands via cmd.exe /C and enforces timeouts with taskkill /T /F /PID (killing the whole process tree).
    • On Windows, grep is backed by ripgrep (rg -n --no-heading --color never), respecting .gitignore by default. Exit-code handling mirrors grep (0 = match, 1 = no match, 2 = error).
    • On Unix, behavior is unchanged (bash -c + kill -9, grep -rn).
  • Documentation — Added a demo screenshot to the top of the README and a new "Long-term memory" section documenting the /summary workflow, recall, auto-summarization, and the size guard.

New command

Command Action
/summary Summarize all sessions for the current project into long-term memory (memory.md), then delete the raw session files

Windows requirement

The grep tool on Windows requires ripgrep (rg) to be installed and available on your PATH. If rg is absent, grep calls return an error; all other tools work without extra dependencies.

Project stats

  • ~4300 lines of Rust across 9 files (up from ~3400 lines / 8 files in v0.1.0)
  • Still #![forbid(unsafe_code)] — zero unsafe blocks

Full changelog: v0.1.0...v0.2.0

v0.1.0 — Terminal AI coding agent in safe Rust

Choose a tag to compare

@gaoze1998 gaoze1998 released this 02 Jul 15:01

First release of zero-code-cli — a concise, high-performance terminal AI coding agent written in safe Rust, powered by the DeepSeek API.

Highlights

  • Plan / Build dual-mode workflow — separate research & design (Plan) from code generation (Build). Switching to Build captures the Plan conversation as a plan artifact and injects it as context, so the coding agent inherits the full design.
  • ReAct agent loop — the agent reasons, calls tools, and iterates (up to 10 turns per message).
  • 5 built-in tools with JSON Schema definitions: read_file, write_file (both support partial read/write via line ranges), bash (with timeout enforcement), grep, ls.
  • Streaming TUI — real-time token streaming rendered with Ratatui, ~60fps redraws.
  • Session persistence — conversations auto-saved per-project under ~/.zero-code-cli/memory/; list and switch with /sessions.
  • DeepSeek reasoning support — handles reasoning_content tokens from DeepSeek reasoning models.
  • API retry with exponential backoff, configurable via config.toml.
  • Safe Rust#![forbid(unsafe_code)], zero unsafe blocks, ~3400 lines across 8 files.
  • Cross-platform — Windows, macOS, and Linux via crossterm.

Configuration

Create ~/.zero-code-cli/config.toml with your DeepSeek API key, then run zero-code-cli from any project directory. See the README for a full quick start.

Example

The examples/tetris project — a classic Tetris game (vanilla JS + HTML5 Canvas, SRS rotation, 7-bag randomizer, ghost piece) — was generated entirely by the agent.

Install

git clone https://github.com/gaoze1998/zero-code-cli.git
cd zero-code-cli
cargo build --release

Full changelog: https://github.com/gaoze1998/zero-code-cli/commits/v0.1.0