Metadata-Version: 2.4
Name: deepclaw-ai
Version: 0.1.1
Summary: A local AI agent powered by DeepSeek — reads, writes, executes, and browses the web from your terminal.
Author: DeepClaw Contributors
License-Expression: MIT
Project-URL: Homepage, https://github.com/boyin111-1/DeepClaw
Project-URL: Repository, https://github.com/boyin111-1/DeepClaw
Project-URL: Issues, https://github.com/boyin111-1/DeepClaw/issues
Keywords: ai-agent,deepseek,cli,terminal,llm,coding-assistant,ai
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Terminals
Classifier: Environment :: Console
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: openai>=1.0.0
Requires-Dist: rich>=13.0.0
Requires-Dist: httpx>=0.24.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: jinja2>=3.0
Dynamic: license-file

# DeepClaw

DeepClaw is a local AI agent powered by DeepSeek models, running in your terminal. It reads/writes files, executes shell commands, searches codebases, and browses the web — autonomously. Features streaming output, context compression, a Jinja2-driven Skill system, and a VS Code-style Plugin architecture for unlimited extensibility. Zero environment variables, one-command setup, ready to work.

## Software Architecture

```
User → CLI (Rich TUI) → Agent Core (streaming + tool-call loop) → DeepSeek API
                              ↓
                    Tool Execution Layer
           (file I/O, shell, grep, web search, HTTP)
                              ↓
              Skill Engine (Jinja2) ←→ Plugin System (hot-load)
```

Built with **Python**, using `openai` SDK for API calls and `Rich` for terminal UI. Skills use Jinja2 templates with YAML front matter; Plugins are dynamically-loaded Python modules following a VS Code Extension-like contract.

## Installation

```bash
# PyPI (recommended)
pip install deepclaw-ai
deepclaw

# From source
git clone https://github.com/boyin111-1/DeepClaw.git
cd DeepClaw
pip install -r requirements.txt
python -m deepclaw
```

On first run, you'll be guided through setup: choose DeepSeek official API (API Key only) or third-party API (Key + URL + model).

## Usage

| Command | Description |
|---------|-------------|
| `deepclaw` | Launch interactive CLI (when installed via pip) |
| `python -m deepclaw` | Launch from source |
| `python -m deepclaw --model deepseek-v4-pro` | Start with a specific model |
| `python -m deepclaw --plugin weather` | Load plugins at startup |
| `python -m deepclaw --resume` | Restore last session |

**In-session commands:**
| Command | Description |
|---------|-------------|
| `/help` | Show all commands |
| `/skill <name>` | List / load / unload skills |
| `/plugin list` | Manage plugins |
| `/model` | View / switch models |
| `/config` | View / edit configuration |
| `/back` | Load / delete saved sessions |
| `/export` | Export conversation to Markdown |
| `/exit` | Quit (auto-saves session) |

## Skill System

Skills are plain Markdown files with YAML front matter and Jinja2 templates. They define custom AI behavior — code review, project workflow, git operations, and more.

Place skills in `~/.deepclaw/skills/<name>/SKILL.md` and load with `/skill <name>`. Example:

```yaml
---
name: My Reviewer
params:
  focus: { type: enum, values: [安全, 性能, 风格], default: 安全 }
---
# {{ name }}
Focus on **{{ focus }}** when reviewing code.
```

Load with `/skill reviewer` — interactive parameter forms appear for skills with parameters.

## Plugin System

Plugins run arbitrary Python code with full freedom:

```python
# ~/.deepclaw/plugins/my-plugin/main.py
def on_load(api):
    api.register_tool({"function": {"name": "my_tool", ... }}, handler)
    api.status_bar.set("my-plugin", "Ready")
    api.on("chat:after", lambda resp: print(resp))
```

Extensions can: inject tools, register commands, subscribe to events, run background services, or even take over the UI entirely (`mode: gui`).

## Contribution

1. Fork the repository
2. Create `Feat_xxx` branch
3. Commit your code
4. Create Pull Request

Share skills and plugins via the [Discussions](https://github.com/boyin111-1/DeepClaw/discussions) tab.

## License

MIT License — see [LICENSE](LICENSE).
