Skip to main content

A CLI tool to generate prompts with project structure and file contents

Project description

kopipasta

Version Downloads

A CLI tool for generating AI-assisted code prompts with project structure and file contents, using an interactive editor-based workflow.

kopipasta
  • An LLM told me that kopi means Coffee in some languages.. and a Diffusion model then made this delicious soup.

Installation

You can install kopipasta using pipx (or pip):

pipx install kopipasta

Usage

To use kopipasta, run the following command in your terminal:

kopipasta [files_or_directories_or_urls]

Replace [files_or_directories_or_urls] with the paths to the files or directories you want to include in the prompt, as well as any web URLs you want to fetch content from.

Example:

kopipasta src/ config.json https://example.com/api-docs

This will guide you through an interactive process to:

  1. Select files and directories to include in the prompt
  2. Choose between full content, snippets, or patches for large files
  3. Fetch and include content from provided URLs
  4. Open an editor for you to input the specific task or code generation instructions
  5. Generate a comprehensive prompt that includes project structure, selected file contents, and your task instructions

The generated prompt will be displayed in the console and automatically copied to your clipboard, ready to be used with an AI code generation tool.

Features

  • Generates structured prompts with project overview, file contents, web content, and task instructions
  • Interactive file selection process with options for full content, snippets, or specific patches
  • Fetches and includes content from web URLs
  • Opens your preferred editor (configurable via EDITOR environment variable) for task input
  • Detects and securely handles environment variables from a .env file
  • Ignores files and directories based on common .gitignore patterns
  • Allows interactive selection of files to include
  • Supports various file types with syntax highlighting in the selection process
  • Automatically copies the generated prompt to the clipboard

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

kopipasta-0.20.0.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

kopipasta-0.20.0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file kopipasta-0.20.0.tar.gz.

File metadata

  • Download URL: kopipasta-0.20.0.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.7

File hashes

Hashes for kopipasta-0.20.0.tar.gz
Algorithm Hash digest
SHA256 d8b7bb97284c8c11a390f38e6ecda80fad278159b471b09fb8f4d9a87ee77a6e
MD5 36705de2c0099a91fb896e0c2aa09be7
BLAKE2b-256 6db6c9f36ceb6d176852da8b24f2dc6fc051dfe2d10e10733293b0b72f8f70f5

See more details on using hashes here.

File details

Details for the file kopipasta-0.20.0-py3-none-any.whl.

File metadata

  • Download URL: kopipasta-0.20.0-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.7

File hashes

Hashes for kopipasta-0.20.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca5635926723f7258ca87cf859212efb2de26d5e3302c913a9a21f1b40c71029
MD5 31553d9764c1bcdcedc0239648817ec8
BLAKE2b-256 89d4d549caf4fbb5d6127925c05a3ca2be7cc360c90f3f3e753a898f766d6024

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page