Metadata-Version: 2.4
Name: craft-code
Version: 0.1.0
Summary: A Claude Code-like AI coding assistant built with LangChain Deep Agents
Project-URL: Homepage, https://github.com/shubhamagarwal/code-craft
Project-URL: Repository, https://github.com/shubhamagarwal/code-craft
Project-URL: Bug Tracker, https://github.com/shubhamagarwal/code-craft/issues
Author: Shubham Agarwal
License: MIT
License-File: LICENSE
Keywords: agent,ai,claude,coding-assistant,langchain,llm
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Requires-Python: >=3.11
Requires-Dist: deepagents>=0.4.0
Requires-Dist: langchain-anthropic>=0.3.0
Requires-Dist: langchain-openrouter>=0.1.0
Requires-Dist: langgraph-checkpoint>=2.0.0
Requires-Dist: langgraph>=0.3.0
Requires-Dist: prompt-toolkit>=3.0.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: rich>=13.0.0
Provides-Extra: dev
Requires-Dist: build>=1.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.8.0; extra == 'dev'
Requires-Dist: twine>=5.0; extra == 'dev'
Provides-Extra: openrouter
Requires-Dist: langchain-openrouter>=0.1.0; extra == 'openrouter'
Provides-Extra: sandbox
Requires-Dist: langchain-daytona>=0.1.0; extra == 'sandbox'
Description-Content-Type: text/markdown

# Code Craft

A Claude Code-like AI coding assistant built with [LangChain Deep Agents](https://docs.langchain.com/oss/python/deepagents/overview).

## Features

- **File system access** — reads, writes, and edits project files
- **Shell execution** — runs commands (tests, linters, build tools)
- **Agentic planning** — breaks tasks into steps with `write_todos`
- **Human-in-the-loop** — asks approval before destructive operations
- **Persistent memory** — remembers project context across sessions
- **Subagent delegation** — spawns code-reviewer and researcher subagents
- **Skill system** — lazy-loaded workflows for testing, code review, etc.

## Quick Start

```bash
# 1. Clone and install
cd code-craft
uv venv && source .venv/bin/activate
uv pip install -e .

# 2. Set your API key
cp .env.example .env
# Edit .env and add your ANTHROPIC_API_KEY

# 3. Run
coding-agent
```

## Usage

```bash
# Interactive CLI
coding-agent

# Or run directly
python -m code_craft
```

Inside the CLI:
- Type your coding request
- The agent will ask for approval before file writes and shell commands
- Use `/new` to start a fresh thread, `/quit` to exit

## Programmatic Usage

```python
from code_craft.agent import build_agent
from code_craft.config import AgentConfig

config = AgentConfig(project_root="/path/to/your/project")
agent, checkpointer, store = build_agent(config)
```

## Configuration

Set these in `.env` or as environment variables:

| Variable | Default | Description |
|---|---|---|
| `ANTHROPIC_API_KEY` | (required) | Your Anthropic API key |
| `MODEL` | `anthropic:claude-sonnet-4-6` | Model to use |
| `PROJECT_ROOT` | `.` | Root directory for file operations |

## Architecture

```
code_craft/
  agent.py              — Agent factory with backends, subagents, skills
  cli.py                — Interactive Rich-powered CLI
  config.py             — AgentConfig dataclass
  interrupt_handler.py  — Human-in-the-loop approval UI
  prompts.py            — System prompts
  tools.py              — Custom tools (git, delete, tests)
skills/
  testing/SKILL.md      — Test writing workflow
  code_review/SKILL.md  — Code review workflow
AGENTS.md               — Project context for the agent
```
