Metadata-Version: 2.4
Name: deleetify
Version: 0.7.0
Summary: Makes local leetcode setup less painfull
Author-email: "Dharshan.S" <me.dharshan.1@gmail.com>
Maintainer-email: "Dharshan.S" <me.dharshan.1@gmail.com>
License-Expression: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development
Requires-Python: >=3.13
Requires-Dist: agent-client-protocol>=0.10.1
Requires-Dist: beautifulsoup4>=4.15.0
Requires-Dist: httpx>=0.28.1
Requires-Dist: typed-clap>=0.11.1
Description-Content-Type: text/markdown

# Deleetify

> Makes local LeetCode setup less painful.

A CLI tool that fetches any LeetCode problem and uses an AI agent to generate a ready-to-run boilerplate solution file — so you can jump straight into solving, not scaffolding.

## Features

- Fetch any LeetCode problem by id
- AI-generated boilerplate via any ACP-compatible agent (e.g., opencode, claude-code)
- Supports Python and JavaScript starter code
- Configurable AI provider via TOML

## Installation

Note: If any problem encountered, try installing with python 3.13

```bash
pip install deleetify
```

Or with [uv](https://docs.astral.sh/uv/):

```bash
uv tool install deleetify
```

## Usage

```bash
# Basic usage — generates Python boilerplate
deleetify "208"

# Specify language
deleetify "1" --lang javascript

# Custom config path
deleetify "15" --config ./my-agent.toml
```

## Configuration

Deleetify uses a `deleetify.toml` to configure the AI provider. By default it looks for the file in the current directory.

```toml
[provider.opencode]
command = "opencode"
args = ["acp"]
```

If you have multiple providers, set a default:

```toml
[default]
provider = "opencode"

[provider.opencode]
command = "opencode"
args = ["acp"]

[provider.gemini]
command = "gemini"
args = ["--acp"]
# envs = {SOME_ENV = "value"}
```

## How it works

1. You pass a LeetCode problem id (e.g., `208`)
2. Deleetify parses the name and fetches the problem from the LeetCode API
3. It scrapes the description, examples, and starter code from the HTML response
4. It spawns an AI agent subprocess over the Agent Communication Protocol (ACP)
5. The agent receives a prompt with the problem details and generates boilerplate code with built-in test cases

## Supported languages

| CLI flag     | Language   |
|--------------|------------|
| `python3`    | Python 3   |
| `javascript` | JavaScript |

## Requirements

- Python 3.13+
- An ACP-compatible agent (e.g., [opencode](https://opencode.ai))

## License

MIT
