Skip to main content

Powerful claude code open source alternative. AI coding assistant powered by Abdel-Hazim Lawani — use it in any folder

Project description

openagentic-ai

Powerful open-source alternative to Claude Code. An AI coding assistant that works in any folder, powered by your own API keys.

pip install openagentic-ai

What it does

open-code is a terminal-based AI agent that reads, writes, and edits your code, runs shell commands, searches the web, and navigates your entire codebase — all from a single command.

cd my-project
open-code "add a dark mode toggle to the navbar"

Features

  • Multi-provider — bring your own API key (Together, Groq, Mistral, Gemini, OpenRouter)
  • Full file access — create, read, edit, delete files and directories
  • Shell execution — run any command directly in your project folder
  • Codebase search — glob patterns, regex grep across all files
  • Internet search — built-in Tavily-powered web research
  • Three agent modesask, auto, plan
  • Session memory — context is persisted and trimmed intelligently across turns
  • Rich TUI — beautiful terminal interface with live streaming output

Quick start

1. Install

pip install openagentic-ai

2. Configure your API key

Create a .env file in your project folder (or home directory):

# Pick one provider — the first key found is used

TOGETHER_API_KEY=your_key_here
# GROQ_API_KEY=your_key_here
# MISTRAL_API_KEY=your_key_here
# GEMINI_API_KEY=your_key_here
# OPENROUTER_API_KEY=your_key_here

Get a free key:

3. Run

cd your-project
open-code

Or pass a query directly:

open-code "refactor the auth module to use JWT"
open-code --mode plan "migrate the database to PostgreSQL"

Supported providers & default models

Provider Default model
Together AI Qwen/Qwen3-Coder-Next-FP8
Groq moonshotai/kimi-k2-instruct
Mistral codestral-latest
Gemini gemini-2.5-pro-preview-03-25
OpenRouter kwaipilot/kat-coder-pro-v2

Override the model for any provider:

TOGETHER_MODEL=meta-llama/Llama-3-70b-chat-hf
GROQ_MODEL=llama3-70b-8192
GEMINI_MODEL=gemini-2.0-flash

Agent modes

Mode Behavior
auto (default) Plans, edits files, and runs commands autonomously
ask Read-only — answers questions and explains code, no file changes
plan Produces a step-by-step plan and waits for your approval before acting
open-code --mode ask "how does the authentication flow work?"
open-code --mode plan "add Stripe payment integration"

Available tools

The agent has access to:

Tool Description
create_file Create a new file with full content
read_file Read file contents (with offset/limit)
edit_file Precise string replacement in a file
delete_file Delete a file
view_file Quick file preview
list_dir List directory contents
create_dir / delete_dir Directory management
glob_files Find files by pattern (e.g. **/*.ts)
grep_codebase Regex search across all files
grep_file Regex search in a single file
run_command Execute shell commands
internet_search Web search via Tavily

Environment variables

# Provider API keys (first found is used)
TOGETHER_API_KEY=
GROQ_API_KEY=
MISTRAL_API_KEY=
GEMINI_API_KEY=
OPENROUTER_API_KEY=

# Optional: override default model per provider
TOGETHER_MODEL=
GROQ_MODEL=
MISTRAL_MODEL=
GEMINI_MODEL=
OPENROUTER_MODEL=

# Optional: show full LLM context on each call (debug)
OPENCODE_SHOW_CONTEXT=1

# Optional: Tavily key for internet search
TAVILY_API_KEY=

Requirements

  • Python >= 3.10
  • A valid API key for at least one supported provider

License

MIT — built by Abdel-Hazim Lawani

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

openagentic_ai-0.2.1.tar.gz (28.6 kB view details)

Uploaded Source

Built Distribution

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

openagentic_ai-0.2.1-py3-none-any.whl (32.0 kB view details)

Uploaded Python 3

File details

Details for the file openagentic_ai-0.2.1.tar.gz.

File metadata

  • Download URL: openagentic_ai-0.2.1.tar.gz
  • Upload date:
  • Size: 28.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for openagentic_ai-0.2.1.tar.gz
Algorithm Hash digest
SHA256 bc591d626ff59dd5baeff824b482243ba74257110fb72706c203f11e34c57954
MD5 0cac7283c4f6b681151e43a7530fa108
BLAKE2b-256 66dccc91fcd864bc6173dac0c2b72d8380e74bc3a55f25796cd010c06b9742be

See more details on using hashes here.

File details

Details for the file openagentic_ai-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: openagentic_ai-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 32.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for openagentic_ai-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4e0b2ee5814260f04211301130d63e63b3eae4c15e0e71db40d556599c4d06b2
MD5 a31ef4c25b015c24f6b58180f860d96b
BLAKE2b-256 6fe28a912ea8e616b784125b67090c78caaf1fb6f240f6a1cb73272326141e29

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