GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - kpaschalidis/anvil

BranchesTags
Open more actions menu

Latest commit

 

History

113 Commits
113 Commits

Folders and files

NameName
Last commit message
Last commit date
.anvil/commands
.anvil/commands
 
 
.github
.github
 
 
docs
docs
 
 
examples
examples
 
 
src
src
 
 
tests
tests
 
 
.env.example
.env.example
 
 
.gitignore
.gitignore
 
 
CLI_EXAMPLES.md
CLI_EXAMPLES.md
 
 
MIGRATION_PLAN_V2.md
MIGRATION_PLAN_V2.md
 
 
README.md
README.md
 
 
SCOUT_QUICKSTART.md
SCOUT_QUICKSTART.md
 
 
TODO.md
TODO.md
 
 
anvil.code-workspace
anvil.code-workspace
 
 
main.py
main.py
 
 
pyproject.toml
pyproject.toml
 
 
raw.jsonl
raw.jsonl
 
 
temp.html
temp.html
 
 
uv.lock
uv.lock
 
 

Repository files navigation

Anvil

AI coding agent with structured tool support. Built with LiteLLM for multi-model support.

Prerequisites

  • Python 3.11+
  • uv package manager
  • API key for your chosen provider (OpenAI, Anthropic, Google, etc.)

Setup

# Install uv (if not installed)
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install dependencies (creates .venv/ automatically)
uv sync

# Create .env file with your API keys
echo "OPENAI_API_KEY=sk-..." > .env

Anvil auto-loads .env from the current directory. Add keys for the providers you use:

OPENAI_API_KEY=sk-...              # for gpt-4o, gpt-4
ANTHROPIC_API_KEY=sk-ant-...       # for Claude models
GEMINI_API_KEY=...                 # for Gemini models

Optional: Web Search (Deep Research)

Deep research uses Tavily web search.

uv sync --extra search
export TAVILY_API_KEY="tvly-..."

Note: uv sync creates a virtual environment in .venv/. All uv run commands execute inside this venv automatically.

GUI

# Install gradio
uv sync --extra gui

# Launch
uv run anvil gui                    # Default port 7860
uv run anvil gui --port 8080        # Custom port
uv run anvil gui --share            # Public link (Gradio hosting)

CLI

# Interactive agent (default model = gpt-4o)
uv run anvil

# Interactive agent with model aliases
uv run anvil repl --model sonnet
uv run anvil repl --model opus
uv run anvil repl --model flash
uv run anvil repl --model deepseek

# Use full model names
uv run anvil repl --model claude-sonnet-4-20250514
uv run anvil repl --model gemini/gemini-2.5-flash

# With files pre-loaded
uv run anvil repl src/anvil/cli.py

# With initial message
uv run anvil repl -m "Add error handling to the main function"

# Fetch raw documents (Scout sources; fetch-only)
uv sync --extra fetch
uv run anvil fetch "AI note taking" --source producthunt --max-documents 50

# Resume fetch (uses `data/sessions/<id>/state.json`)
uv run anvil fetch --resume <session_id>

# Web research (orchestrator-workers; requires Tavily)
uv sync --extra search
export TAVILY_API_KEY="tvly-..."
uv run anvil research "competitive analysis of AI coding agents"

# Research profiles
uv run anvil research --profile quick "competitive analysis of AI coding agents"   # default
uv run anvil research --profile deep "competitive analysis of AI coding agents"    # ~15–20m, includes round-2 gap fill

Reference: `docs/DEEP_RESEARCH_SYSTEM_REFERENCE.md` explains what “Deep Research” systems do (and what’s still needed to reach Anthropic/ChatGPT-level behavior).

    # Saved artifacts (default)
    # - `data/sessions/<session_id>/meta.json`
    # - `data/sessions/<session_id>/research/report.md`
    # - `data/sessions/<session_id>/research/report.json` (structured)
    # Flags: --profile, --session-id, --data-dir, --output, --no-save-artifacts, --min-citations, --min-domains,
    #        --target-web-search-calls, --max-web-search-calls, --max-web-extract-calls, --verify-max-tasks, --best-effort

# Resume research (reruns failed workers; fails unless all succeed)
uv run anvil research --resume <session_id>

# Sessions (list/show/open)
uv run anvil sessions list
uv run anvil sessions list --kind research
uv run anvil sessions open <session_id>

# Options
uv run anvil --help
uv run anvil repl --no-lint        # Disable auto-linting
uv run anvil repl --no-auto-commit # Disable auto-commit
uv run anvil repl --dry-run        # Preview changes without applying

Commands (inside the agent)

Command Description
/add <file> Add file to context
/drop <file> Remove file from context
/files List files in context
/clear Clear chat history
/undo Revert last auto-commit
/model [name] Show or switch model
/tokens Show token usage
/git status Show git status
/git diff Show git diff
/help Show all commands
/quit Exit

Supported Models

Anvil uses LiteLLM, supporting 100+ models:

Alias Model
sonnet claude-sonnet-4-20250514
opus claude-opus-4-20250514
haiku claude-3-5-haiku-20241022
4o gpt-4o
flash gemini/gemini-2.5-flash
deepseek deepseek/deepseek-chat

Or use any LiteLLM-supported model name directly.

Features

  • Multi-model support via LiteLLM (OpenAI, Anthropic, Google, DeepSeek, etc.)
  • Structured tools for file operations, git, shell commands
  • Auto-linting with automatic fix attempts for Python files
  • Auto-commit changes with undo support
  • Streaming responses

Development

# Install with dev dependencies
uv sync --extra dev

# Run tests (runs inside .venv)
uv run pytest

# Run tests verbose
uv run pytest -v

# Activate venv manually (optional, for IDE integration)
source .venv/bin/activate

Project Structure

src/
├── anvil/          # AI coding agent
│   ├── cli.py          # Entry point
│   ├── config.py       # Configuration + model aliases
│   ├── linter.py       # Python linter
│   ├── tools/          # Tool registry
│   ├── git.py          # Git operations
│   ├── files.py        # File operations
│   ├── shell.py        # Shell commands
│   ├── parser.py       # Response parsing
│   └── history.py      # Message history
│
├── scout/          # Fetch-only sources + storage (no CLI)
│   ├── services/       # FetchService
│   ├── sources/        # Data sources (HN, Reddit, PH, GitHub)
│   ├── storage.py      # Session persistence (writes raw.jsonl + sqlite)
│   └── session.py      # Fetch resume state.json
│
└── common/
    └── llm.py      # Shared LLM utilities

Fetch (Scout sources)

Scout is now a fetch-only module (sources + storage + resumable sessions). Use anvil fetch ... and anvil sessions ....

About

No description, website, or topics provided.

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.