Metadata-Version: 2.4
Name: pynanocode
Version: 0.0.5
Summary: Lightweight Python implementation of Claude Code alternative
Author: zhangsh
Author-email: zhangsh@lamda.nju.edu.cn
License: MIT
Project-URL: Homepage, https://github.com/zhsh9/nano-code
Keywords: Lightweight Coding Agent,Coding Agent,Agent,Claude Code Alternative,Nano Code
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: anthropic>=0.39.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: rich>=13.0.0
Requires-Dist: httpx>=0.27.0
Dynamic: license-file

<p align="center">
    <picture>
        <source srcset="https://raw.githubusercontent.com/zhsh9/nano-code/main/asset/logo-dark.svg" media="(prefers-color-scheme: dark)">
        <source srcset="https://raw.githubusercontent.com/zhsh9/nano-code/main/asset/logo-light.svg" media="(prefers-color-scheme: light)">
        <img src="https://raw.githubusercontent.com/zhsh9/nano-code/main/asset/logo-light.svg" alt="NanoCode logo" width="30%">
    </picture>
</p>
<p align="center"><strong>The lightweight AI coding agent.</strong></p>
<p align="center">
    <img alt="Python" src="https://img.shields.io/badge/Python-3.10-blue?style=flat-square&logo=python&logoColor=white" />
    <a href="https://github.com/zhsh9/nano-code/commits/main">
        <img alt="GitHub Last Commit" src="https://img.shields.io/github/last-commit/zhsh9/nano-code?label=Last%20Commit&style=flat-square&color=green&logo=git&logoColor=white">
    </a>
    <a href="https://pypi.org/project/pynanocode"><img alt="pypi" src="https://img.shields.io/pypi/v/pynanocode?style=flat-square&color=blue&logo=pypi&logoColor=white" /></a>
</p>

<div align="center">
    <img src="https://raw.githubusercontent.com/zhsh9/nano-code/main/asset/demo.gif" alt="EdgeRazor Demo" width="75%">
</div>

---

### Installation

```bash
pip install pynanocode
```

### Usage

```bash
export ANTHROPIC_API_KEY="YOUR_KEY"
export ANTHROPIC_BASE_URL="https://api.deepseek.com/anthropic"
nanocode
```

### Agents

NanoCode includes two built-in agents you can switch between with the `/switch edit` and `/switch plan` commands.

- `edit`: Default, full-access agent for development work.
- `plan`: Read-only agent for exploration and analysis.
  - Deny editing files by default.
  - Ask permission before running bash commands.

### Built-in Tools

- `bash`: Run shell commands in your terminal.
- `read`: Read any file with line numbers.
- `write`: Create or overwrite a file.
- `edit`: Search-and-replace inside a file.
- `grep`: Search code by regex pattern.
- `glob`: Find files by name pattern.

### LLM Provider

- [x] DeepSeek
- [ ] Anthropic
- [ ] OpenAI
