Metadata-Version: 2.4
Name: nirmal
Version: 1.0.2
Summary: AI-powered code generation streamed live to your terminal.
Author-email: Nirmal <you@example.com>
License: MIT License
        
        Copyright (c) 2025 Nirmal
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://angelthesis.com
Project-URL: Repository, https://github.com/yourusername/nirmal
Keywords: ai,code-generation,llm,groq,developer-tools,cli
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.28.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: black>=23.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Dynamic: license-file

# nirmal ⚡

> AI-powered code generation, streamed live to your terminal.

```python
import nirmal

nirmal.make("create a snake game in pygame")
```

Code starts appearing instantly — character by character — as the AI writes it in real time.

---

## Installation

```bash
pip install nirmal
```

Requires Python 3.8+.

---

## Quick Start

```python
import nirmal

# Generate a complete script from a single sentence
nirmal.make("build a REST API with FastAPI that has CRUD routes for a todo list")
```

That's it. The generated code streams directly into your terminal.

---

## More Examples

```python
import nirmal

# Games
nirmal.make("create a tetris clone using pygame")

# Web
nirmal.make("build a flask web app with user login and a dashboard")

# Scripts
nirmal.make("write a python script that watches a folder and renames files by date")

# Data
nirmal.make("create a pandas script that reads a CSV, cleans missing values, and plots a bar chart")

# Automation
nirmal.make("write a selenium script that logs into a website and scrapes product prices")
```

---

## How It Works

```
Your Python code
     │
     ▼
nirmal.make("your prompt")
     │
     ▼  POST /nirmal/generate.php
PHP Backend (Hostinger)
     │
     ▼  Groq API  (llama-3.3-70b-versatile)
Streaming AI response
     │
     ▼  
Live terminal output ✓
```

1. You call `nirmal.make()` with a plain-English description.
2. The package sends a POST request to the PHP backend.
3. The backend forwards the prompt to Groq with streaming enabled.
4. Each token is forwarded back to Python as it arrives.
5. Python prints each chunk live — no waiting for the full response.

---

## Configuration

If you host your own backend, edit `nirmal/config.py`:

```python
BACKEND_URL    = "https://your-domain.com/"
REQUEST_TIMEOUT = 60  # seconds
```

---

## Package Structure

```
nirmal/
├── nirmal/
│   ├── __init__.py   ← public API (make)
│   ├── client.py     ← streaming HTTP client
│   ├── config.py     ← endpoint + timeout settings
│   └── utils.py      ← markdown cleanup helper
├── backend/
│   ├── generate.php  ← PHP streaming proxy to Groq
│   └── .htaccess     ← security rules for Hostinger
├── pyproject.toml    ← pip package config
├── README.md
└── LICENSE
```

---

## License

MIT — see [LICENSE](LICENSE).
