Metadata-Version: 2.4
Name: paper-code
Version: 0.3.0
Summary: Interactive Project Documentation Generator for AI-Native Development
Author-email: Nguyen Minh Giau <minhgiau04041998@gmail.com>
Project-URL: Homepage, https://github.com/minhgiau998/paper-code
Project-URL: Bug Tracker, https://github.com/minhgiau998/paper-code/issues
Project-URL: Source Code, https://github.com/minhgiau998/paper-code
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer>=0.9.0
Requires-Dist: jinja2>=3.1.2
Requires-Dist: inquirer>=3.1.4
Requires-Dist: rich>=13.7.0
Dynamic: license-file

<div align="center">

# 📄 PAPER-CODE

**The AI-Native Documentation Generator**

[![Python Version](https://img.shields.io/badge/python-3.10%2B-blue?style=for-the-badge&logo=python)](https://www.python.org/)
[![PyPI Version](https://img.shields.io/pypi/v/paper-code?style=for-the-badge&logo=pypi&logoColor=white)](https://pypi.org/project/paper-code/)
[![License](https://img.shields.io/badge/license-MIT-green?style=for-the-badge)](LICENSE)
[![Code Style](https://img.shields.io/badge/code%20style-black-000000?style=for-the-badge)](https://github.com/psf/black)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge)](docs/CONTRIBUTING.md)

> **Stop writing boilerplate docs.**
> Automatically generate **AI Context**, **Architecture Guides**, and **Governance Files** optimized for Cursor, Windsurf, and Copilot.

[✨ Features](#-features) • [🚀 Installation](#-installation) • [📖 Usage](#-usage) • [🗺️ Roadmap](ROADMAP.md)

</div>

---

## 🎬 Demo

<div align="center">

![PAPER-CODE Demo](https://i.ibb.co/W4tWtys8/render1767576944566.gif)

*Watch PAPER-CODE generate AI-ready documentation in seconds*

</div>

---

## 🧐 Why PAPER-CODE?

In the era of AI coding, **Context is King**.
If you ask an AI to "build a feature" without context, it generates generic, legacy code.

**PAPER-CODE** solves this by bootstrapping a robust documentation structure that serves two masters:
1.  **For AI Agents:** Generates `.cursorrules`, `AI_RULES.md`, and strict coding standards to keep your AI (Cursor/Copilot) from hallucinating or using deprecated syntax.
2.  **For Humans:** Creates professional `ARCHITECTURE.md`, `CONTRIBUTING.md`, and tech stack guides so your team stays on the same page.

## ✨ Features

- **🤖 AI-First Context:** Auto-generates `.cursorrules` and prompt instructions tailored to your specific stack (e.g., "Use Next.js App Router, not Pages").
- **🎯 Multi-Stack Support:** Specialized templates for Frontend, Backend, Mobile, Game Dev, and ML.
- **📚 Library Awareness:** Smart docs for 30+ libraries (Tailwind, Prisma, Redux, Zod...).
- **🛡️ Governance Ready:** Generates `LICENSE`, `CHANGELOG.md`, `SECURITY.md`, and GitHub Issue Templates.
- **💻 Interactive & Batch:** Use the beautiful CLI wizard or a JSON config file for automation.

## 🚀 Installation

Requires **Python 3.10+**.

### 1. Via PyPI (Recommended)
You can install **PAPER-CODE** directly from PyPI:

```bash
pip install paper-code
```

### 2. From Source (For Development)
If you want to contribute or use the latest development version:

```bash
# Clone the repository
git clone https://github.com/minhgiau998/paper-code.git
cd paper-code

# Install as an editable tool
pip install -e .
```

## 📖 Usage

### 1. Interactive Mode (Recommended)
Just run the command and follow the wizard.

```bash
paper-code
```

**Terminal Output Preview:**
```text
🚀 Initializing documentation for: My Awesome Project
[?] Select Project Type: Frontend
[?] Select Frontend Stack: Next.js
[?] Select Modules/Libraries: [x] TailwindCSS, [x] Prisma, [x] NextAuth.js, [x] Zod

✨ Done! Generated AI-ready docs in ./docs
```

### 2. Quick Start (Templates)
Skip the questions if you know what you want.

```bash
paper-code --template "Next.js" --output ./my-app
paper-code --template "FastAPI" --output ./my-api
```

### 3. Batch Mode (For CI/CD)
Generate docs based on a configuration file.

```bash
paper-code --config paper.config.json --batch
```

## 🧩 Supported Stacks

**PAPER-CODE** isn't just generic markdown. It contains deep, opinionated knowledge for:

| Category | Supported Stacks |
| :--- | :--- |
| **Frontend** | React, Vue, Next.js, Nuxt.js, Angular, SvelteKit |
| **Backend** | Node.js (Express/NestJS/Fastify), FastAPI, Django, Go (Gin) |
| **Mobile** | React Native (Expo/CLI), Flutter |
| **Desktop** | Electron, Tauri v2 |
| **Data & ML** | PyTorch, TensorFlow, Scikit-learn |
| **Game Dev** | Godot 4, Unity |
| **CLI** | Node.js (Commander), Python (Click), Go (Cobra), Rust (Clap) |
| **Libraries** | TypeScript Lib, Python Lib, Go Lib, Rust Lib |

## 📂 Generated Structure

A typical **Next.js + Prisma** project generated by PAPER-CODE:

```text
my-project/
├── .cursorrules             # 👈 Critical for AI Editors
├── .github/
│   ├── copilot-instructions.md
│   └── workflows/ci.yml
├── docs/
│   ├── ai/
│   │   ├── AI_RULES.md      # The "Constitution" for your AI
│   │   ├── AI_WORKFLOWS.md  # SOPs for common tasks
│   │   └── AI_CONTEXT.md    # Project map
│   ├── libs/                # Specific guides for libraries
│   │   ├── prisma.md
│   │   └── tailwindcss.md
│   ├── ARCHITECTURE.md
│   ├── CODE_STANDARDS.md    # "Do's and Don'ts"
│   ├── CONTRIBUTING.md
│   └── TESTING.md
├── CHANGELOG.md
└── README.md
```

## 🤝 Contributing

We love contributions! Whether it's adding a new Tech Stack template or fixing a typo.
Please read our [CONTRIBUTING.md](docs/CONTRIBUTING.md) to get started.

1.  Fork the repo.
2.  Create your feature branch (`git checkout -b feature/amazing-stack`).
3.  Commit your changes (`git commit -m 'feat: add Astro support'`).
4.  Push to the branch.
5.  Open a Pull Request.

## 📄 License

Distributed under the MIT License. See [LICENSE](LICENSE) for more information.

<div align="center">
  <sub>Built with ❤️ by Developers, for Developers (and their AI assistants).</sub>
</div>
