prompt-chunker-cli
v1.0.0
Published
Professional CLI tool to split large AI prompts into manageable chunks for AI models.
Downloads
100
Readme
🚀 prompt-chunker-cli
prompt-chunker-cli is a professional, high-performance CLI tool designed for AI engineers and developers. It splits massive AI prompts into manageable, numbered chunks that you can easily copy and paste into LLMs (ChatGPT, Claude, Gemini, etc.).
No more "Message too long" errors! Split your prompts with precision and style.
✨ Features
- 📦 Smart Splitting: Intelligent sentence-aware splitting (prevents cutting sentences in half).
- 🛠️ Pxc Paste: Directly paste prompts without creating files.
- 💾 Session Recovery: Use
pxc lastto recover your last prompt session. - 🎮 Interactive Mode: Navigate chunks with arrow keys, copy with one click, and expand chunks on the fly.
- 📋 Clipboard Integration: Automatically copy chunks to your clipboard.
- ⚙️ Persistent Config: Save your preferred chunk size and delimiters.
🚀 Installation
Install globally via npm:
npm install -g prompt-chunker-cliNote: This installs both prompt-chunker-cli and the short alias pxc.
📖 Usage
Basic Usage
Split a file and enter interactive mode:
pxc my-huge-prompt.txtPaste Mode (The "AI Engineer's Best Friend")
Don't want to create a file? Just paste your prompt directly:
pxc pasteThis opens your default editor (or Notepad on Windows). Paste your prompt, save, and close to start chunking.
Reload Last Prompt
Forgot to copy a chunk? Quickly jump back into your last session:
pxc lastSpecifying Chunk Size
pxc prompt.txt --size 500Divide into N Chunks
pxc prompt.txt --chunks 5Configure Defaults
Set your preferred style once and forget it:
pxc config --size 1000 --delimiter "---"Pipe Input
cat large-log.txt | pxcNon-Interactive Mode
Just output all chunks to the terminal:
pxc prompt.txt --no-interactive🎮 Interactive Mode Commands
Once in interactive mode, you can:
- Arrow Keys: Navigate between chunks.
- Copy: Copy the current chunk to your clipboard.
- Expand (+100): Dynamically add more characters to the current chunk if you need more context.
- Jump: Quickly move to a specific chunk number.
🛠️ Development
git clone https://github.com/aswintt/prompt-chunker-cli.git
cd prompt-chunker-cli
npm install
npm run build
npm start -- --file example.txt📄 License
MIT © aswintt
