Metadata-Version: 2.4
Name: frumle
Version: 0.2.0
Summary: AI-powered codebase analyzer and API documentation for Python projects
Author: Tellecata LLC
License: MIT
Project-URL: Homepage, https://github.com/tellecata/frumle
Project-URL: Documentation, https://frumle.tellecata.com
Project-URL: Repository, https://github.com/tellecata/frumle
Keywords: ai,code-analysis,documentation,codebase,analyzer,api,flask,fastapi,django
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 :: Documentation
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.28.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: black>=23.0; extra == "dev"

# frumle (Python)

AI-powered codebase analyzer for **Python** projects. Scan your Flask, FastAPI, Django, or Starlette app and get API documentation in your Frumle dashboard.

## What is frumle?

`frumle` scans your Python codebase, sends it to the Frumle backend, and generates documentation including:

- **API Documentation**: Endpoints, request/response bodies, parameters, authentication
- **Structured Analysis**: Overview, architecture, tech stack
- **Dashboard**: View everything at [frumle.tellecata.com](https://frumle.tellecata.com)

Same backend as the [npm](https://www.npmjs.com/package/frumle) and [Maven](https://central.sonatype.com/artifact/com.frumle/frumle-maven-plugin) / Gradle plugins—only the CLI and file scanning are Python-specific.

## Quick Start

### 1. Install

```bash
pip install frumle
```

Or run without installing (from a clone):

```bash
python -m pip install -e .
# or
PYTHONPATH=src python -m frumle --help
```

### 2. Get your API key

1. Go to [frumle.tellecata.com](https://frumle.tellecata.com)
2. Sign up and copy your API key from the dashboard

### 3. Add your API key

```bash
frumle add-key <your-api-key>
```

Or:

```bash
frumle login <your-api-key>
```

### 4. Analyze your project

From your project root:

```bash
frumle
```

Or a specific directory:

```bash
frumle ./src
frumle ./app
```

Analysis runs on the server. When it’s done, open your dashboard to see the docs.

## Commands

| Command | Description |
|--------|-------------|
| `frumle` | Analyze current directory (default) |
| `frumle <directory>` | Analyze a given directory |
| `frumle add-key <key>` | Store and verify your API key |
| `frumle login <key>` | Same as `add-key` |
| `frumle status` | Show API key status and quota |

### Options

- `--project-name <name>` – Project name (default: directory name or `pyproject.toml` / `setup.py` name)
- `--ignore <dirs>` – Comma-separated dirs to ignore (default: `__pycache__,.git,.venv,venv,env,.eggs,dist,build`)

### Examples

```bash
# Use a custom project name
frumle --project-name my-fastapi-app

# Ignore extra directories
frumle --ignore __pycache__,.pytest_cache,.mypy_cache
```

## Supported frameworks

- **Flask** – `@app.route`, blueprints
- **FastAPI** – `@app.get`, `@app.post`, routers, `APIRouter`
- **Django** – URLconf, DRF views, `@api_view`
- **Starlette** – `Route`, `Router`
- **Other** – Any Python web app with route-like patterns

## Config file

Running `frumle` creates or updates `frumle.config.json` in the project with base URLs, e.g.:

```json
{
  "baseUrls": [
    { "environment": "local", "url": "http://localhost:8000" },
    { "environment": "production", "url": "" }
  ]
}
```

You can add your production URL in that file. Local URL is guessed from common patterns (e.g. `app.run(port=5000)`, `uvicorn.run(..., port=8000)`).

## Requirements

- Python 3.8+
- Internet connection (to talk to the Frumle API)

## Other platforms

- **Node.js / TypeScript**: `npm install -g frumle` → [npm](https://www.npmjs.com/package/frumle)
- **Java (Maven)**: `mvn frumle:add-key` then `mvn frumle:start` → [Maven Central](https://central.sonatype.com/artifact/com.frumle/frumle-maven-plugin)
- **Java (Gradle)**: `./gradlew frumle` → Gradle Plugin Portal

## Publishing to PyPI (maintainers)

```bash
cd py-package
pip install build twine
python -m build
twine upload dist/*
```

Use a PyPI account and token (or `~/.pypirc`) for uploads.

## License

MIT © Tellecata LLC
