Skip to content

horanf/jarvis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jarvis

An AI coding assistant CLI, inspired by Iron Man's J.A.R.V.I.S.

Jarvis is an interactive REPL harness similar to Claude Code, built with Zig and libvaxis.

What works today

  • Interactive REPL with streaming LLM responses (stdin readline loop)
  • Anthropic provider — SSE streaming via anthropic-sdk-zig
  • Bash tool — shell execution with dangerous-command blocking
  • Multi-turn conversation history (Session)
  • .env config — API key, base URL, model ID loaded from environment or .env file

Coming soon

  • Full libvaxis TUI interface
  • OpenAI-compatible streaming
  • File tools (read / write / edit)
  • Glob / Grep tools
  • TOML config file (~/.config/jarvis/config.toml)

Quick Start

Prerequisites: Zig 0.15.2+, and anthropic-sdk-zig checked out as a sibling directory:

parent/
  jarvis/
  anthropic-sdk-zig/
# Build
zig build

# Run
zig build run

# Test
zig build test

Configuration

Copy .env.example to .env and fill in your values:

cp .env.example .env
ANTHROPIC_API_KEY=sk-ant-...
ANTHROPIC_BASE_URL=https://api.anthropic.com
MODEL_ID=claude-opus-4-5

Environment variables take precedence over .env values.

Architecture

src/
  main.zig          ← CLI entry point
  config.zig        ← Config loading (.env + env vars)
  core/             ← Session & token management
  llm/              ← Provider abstraction + Anthropic SDK wrapper
  tools/            ← Tool registry & implementations (bash)
  repl/             ← Agent loop & stdin REPL

Dependency direction (one-way, no cycles):

main → config
main → repl → llm → core
            → tools
            → core

Development

# Install pre-commit hooks
lefthook install

# Format check
zig fmt --check src/

# Run all tests
zig build test

Roadmap

  • Anthropic SSE streaming
  • Agent loop (tool call → execute → feed result back)
  • Tool: bash execution (with dangerous-command guard)
  • Multi-turn conversation history
  • .env config loading
  • Full libvaxis TUI loop
  • OpenAI-compatible streaming
  • Tool: file read / write / edit
  • Tool: glob / grep
  • TOML config file

About

interactive REPL harness similar to Claude Code, built with Zig and libvaxis

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages