prompt-for-ai
v2.0.2
Published
Interactive CLI prompt generator for AI — scans project structure and file contents.
Downloads
65
Maintainers
Readme
Prompt For AI
Prompt For AI is an interactive CLI tool that scans your project folder, displays its file structure, and lets you pick files to generate a ready-to-use prompt for AI models.
Features
- 🗂️ Browse & Select: Navigate your project folders and pick specific files or entire directories.
- 🌳 Tree View: Automatically generates a clean project tree structure.
- ⚡ Repeat Last Run: Instantly re-generate prompts using your last configuration.
- 🔄 Back Navigation: Go back to any step (folder selection, file selection, project choice) without restarting.
- ⚙️ Settings Menu: Configure language, export format, token limits, global exclusions, and more.
- 📄 Multiple Formats: Export as Plain Text (
.txt) or Compressed PDF (.pdf). - 📊 Token Estimation: See estimated token counts in real-time while selecting files.
- 🌍 Multilingual: Supports English and Russian interfaces.
- 🛡️ Smart Exclusions: Automatically skips
node_modules,.git,dist, and other common ignored folders. - 📋 Clipboard Copy: Automatically copies the generated text prompt to your clipboard.
Installation
Install globally via npm:
npm install -g prompt-for-ai
Usage
Run the command:
create-promptWorkflow
- Select Language (on first run): Choose between English and Russian.
- Select Project: Pick from favorites, recent projects, browse for a folder, or enter a path manually.
- Folder Analysis: Review folder sizes and choose which ones to include (or use
y/nto include all). - File Selection: Toggle individual files, entire folders, or use quick actions ("Select all", "Only code").
- Export: Choose format (
.txtor.pdf). - Done: The prompt is saved to your project root (and copied to clipboard if
.txt).

Navigation
- Use
↩️ Backat any step to return to the previous screen. - Use
🚪 Exitin the main menu to quit. - Press
Ctrl+Cat any time to immediately exit.

Configuration
Global settings (language, favorites, token limits, exclusions) are stored securely in your system's app data directory using conf.
Per-project settings (last selected files, excluded folders) are also saved globally, so your projects stay clean.
The tool will automatically update your project's .gitignore to exclude generated prompt.txt and prompt.pdf files.

License
This project uses the ISC License.
