Skip to main content

AIForge — a terminal-based autonomous AI agent with TUI and CLI

Project description

AIForge

AIForge is a terminal-based autonomous AI agent with an interactive TUI and full CLI — designed for developers who want an AI coding assistant that runs locally, talks to any LLM, and operates directly on their file system.

aiforge tui       # launch full TUI (chat + file browser + status)
aiforge run "create a Flask REST API"   # one-shot task
aiforge           # interactive REPL

Features

  • Interactive TUI — 3-panel layout: file browser, chat, live status. Press Ctrl+F to toggle the file panel, Escape to cancel a running task.
  • CLI REPL — persistent prompt-toolkit shell with session history, built-in commands (:help, :tools, :sessions, :workspace, …)
  • Autonomous agent — plan → execute → observe loop with stop policy, retry logic, and proper JSON memory
  • 15 built-in tools — file read/write/edit/create/delete/search, shell.run, git commit/diff/rollback, project.workspace/analyze, network.fetch/scrape/search
  • Multi-provider — ZAPI, OpenAI, OpenRouter, Ollama (local), with automatic retry on 5xx errors
  • Session history — every task logged; inspect with aiforge sessions show <id>
  • Portable workspace — resolves via AIFORGE_WORKSPACE env → config → cwd; no hardcoded paths

Installation

pip install aiforge

Requires Python 3.11+.


Quick Start

1. Configure a provider

aiforge setup          # interactive wizard
# or directly:
aiforge keys set zapi YOUR_API_KEY
aiforge models use zapi qwen-3-235b-a22b-instruct-2507

Supported providers: ZAPI, OpenAI, OpenRouter, Ollama (no key needed).

2. Launch

# Full TUI (recommended)
aiforge tui

# One-shot task
aiforge run "write a Python web scraper for example.com"

# Interactive REPL
aiforge

3. Set your workspace

aiforge workspace set /path/to/your/project
# or
export AIFORGE_WORKSPACE=/path/to/your/project

TUI Keybindings

Key Action
Ctrl+Q Quit
Ctrl+F Toggle file panel
Ctrl+L Clear chat
Ctrl+R Refresh file tree
Escape Cancel running task

CLI Commands

aiforge doctor              check environment health
aiforge run <task>          run a one-shot agent task
aiforge tools list          show all available tools
aiforge tool <name> k=v     invoke a tool directly
aiforge sessions            list sessions
aiforge sessions show <id>  inspect a session's task log
aiforge workspace show      print active workspace
aiforge workspace set <p>   persist workspace path
aiforge providers list      show provider status
aiforge providers test      send a test request to verify provider
aiforge models list         list known models per provider
aiforge models use <p> <m>  select active model
aiforge keys set <p> <key>  save provider API key to .env
aiforge config get [key]    read config value
aiforge config set key val  write config value

REPL Commands

In the REPL (plain aiforge) or TUI input, prefix with ::

:help              built-in commands
:tools             list registered tools
:sessions          list sessions
:session <id>      inspect session (prefix match ok)
:workspace         show workspace
:workspace set <p> change workspace
:model             active model
:providers         provider status
:test [name]       test a provider
:clear             clear screen/chat
:quit              exit

Configuration

Config lives at <workspace>/.aiforge/config.json. Use aiforge config set to edit, or directly:

{
  "default_provider": "zapi",
  "providers": {
    "zapi": {
      "enabled": true,
      "model": "qwen-3-235b-a22b-instruct-2507"
    }
  }
}

API keys go in .env:

ZAPI_API_KEY=your_key
OPENAI_API_KEY=your_key
OPENROUTER_API_KEY=your_key

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiforge99-0.1.4.tar.gz (99.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aiforge99-0.1.4-py3-none-any.whl (140.9 kB view details)

Uploaded Python 3

File details

Details for the file aiforge99-0.1.4.tar.gz.

File metadata

  • Download URL: aiforge99-0.1.4.tar.gz
  • Upload date:
  • Size: 99.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for aiforge99-0.1.4.tar.gz
Algorithm Hash digest
SHA256 4c56931b3ae35d6980576b9676e4b3d7cb39fae2090fd93b1b4cd43580802a99
MD5 beb7e73ea78f54d4c45c0eb9de09056a
BLAKE2b-256 b5cead55be6409f847a1f74a6d08262c33e6c4a5fcf54aa78ff9114e21800dc9

See more details on using hashes here.

File details

Details for the file aiforge99-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: aiforge99-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 140.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for aiforge99-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 30df84c0a8edebd20136da11de7b971096820fc8a4530d99f6435763369e5a55
MD5 bd269dd75730eac45da2bb8f21627e5c
BLAKE2b-256 a50d3e75df486a5a08c815733fdcf9b54846774ccf0e65e892f5d36f669d5e2b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page