A CLI utility to generate prompts from project source code.
Project description
Anti-Cursor
A Python CLI utility to generate a Markdown prompt describing a project's source code structure and contents. The generated prompt includes an introductory explanation, a detailed projection of the file structure, and code listings from each source file (with file names).
Features
- Accepts either a local directory path or a GitHub repository URL.
- Generates a Markdown prompt with:
- A brief introduction to assist language models in understanding the context.
- A detailed project structure tree.
- Code listings from individual source files.
- Clean architecture with clear separation between CLI, core logic, and file parsing.
- Unit tests to ensure proper functionality.
Project Structure
─ README.md ├── src/ │ └── prompt_generator/ │ ├── init.py │ ├── cli.py │ ├── prompt_generator.py │ └── project_parser.py └── tests/ └── test_prompt_generator.py
Installation
- Clone the repository:
git clone https://github.com/Alexander-Ploskin/anti-cursor.git
- Install the dependencies:
pip install poetry
poetry install
sudo apt-get install xclip
Usage
Run the CLI tool using:
anti-cursor <source>
Where <source> is either a local directory path or a GitHub repository URL.
Examples:
- Generate prompt from local directory:
anti-cursor .
- Generate prompt from GitHub repository:
anti-cursor https://github.com/Alexander-Ploskin/anti-cursor
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file anti_cursor-0.1.0.tar.gz.
File metadata
- Download URL: anti_cursor-0.1.0.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71506b2a0c62427308967a35d805c78c7f857be74d18952e76e416cc26419567
|
|
| MD5 |
dc41f1d95270cde489fd7b1aecc0ca25
|
|
| BLAKE2b-256 |
3854716df2628007d6ceb303cc8739ac0e1aa68392e1a019252ccfd6cb60217c
|
File details
Details for the file anti_cursor-0.1.0-py3-none-any.whl.
File metadata
- Download URL: anti_cursor-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
920e9e68dea686e5a9564190ae71d030a8ded107a6f0078bcfc1f6cf10c3670c
|
|
| MD5 |
264010e55f253f42f8bacb353399cad2
|
|
| BLAKE2b-256 |
19e96295fcfeff5b4431168fa24f6cb43c11026cc7e34e0bc94e1c1e2c950625
|