Pastemax
A simple tool to select files from a repository to copy/paste into an LLM
Install / Use
/learn @kleneway/PastemaxREADME
PasteMax
<p align="center"> <img src="https://github.com/user-attachments/assets/fe5ed9f2-fcb1-41d7-bc38-fb130fadf116" width="150" alt="PasteMaxIcon"> </p> <p align="center"> A modern file viewer application for developers to easily navigate, search, and copy code from repositories.<br/> Ideal for pasting into ChatGPT or your LLM of choice. Built with Electron, React, and TypeScript. </p> <p align="center"> <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a> <a href="https://github.com/kleneway/pastemax/issues"><img src="https://img.shields.io/github/issues/kleneway/pastemax" alt="GitHub issues"></a> <a href="https://github.com/kleneway/pastemax/releases/latest"><img src="https://img.shields.io/github/v/release/kleneway/pastemax" alt="GitHub releases"></a> </p>Overview
PasteMax is a simple desktop app built for developers using AI coding assistants. It makes sharing your code with LLMs easy, thanks to a smart file explorer with token counting, file filtering, quick copy, and a previewer. Select the files you need, skip binaries and junk, and get clean, formatted snippets ready for your LLM.
Video
Features
File Navigation & Management
- File Tree Navigation: Browse directories and files with an expandable tree view
- Search Capabilities: Quickly find files by name or content
- Sorting Options: Sort files by name, size, or token count
- File Change Watcher: Automatically updates the file list when files are added, modified, or deleted
- Manual Refresh: Option to perform a full directory re-scan when needed
AI-Ready Features
- Token Counting: View approximate token count for each file
- Model Context Limit: Select different models (Claude-3.7, GPT-4o, Gemini 2.5, etc.)
- Context Limit Warning: Get alerted when selections exceed the model's context limit
Content & Preview
- File Previewer: View file contents in a dedicated preview pane
- Selection Management: Select multiple files and copy their contents together
- Binary File Detection: Automatic detection and exclusion of binary files
- Smart File Exclusion: Auto-excludes package-lock.json, node_modules, etc.
Workflow Enhancements
- Workspace Management: Save and load workspaces for quick directory access
- Automatic Update Checker: Stay current with the latest releases
- Dark Mode: Toggle between light and dark themes for comfortable viewing
- Cross-Platform: Available for Windows, Mac, Linux and WSL
Installation
Download Binary
Download the latest PasteMax version from the releases page.
Build from Source
- Clone the repository:
git clone https://github.com/kleneway/pastemax.git
cd pastemax
- Install dependencies:
npm install
- Build the app:
npm run build:electron
npm run package
Note: If you encounter issues with npm run package, you can try the platform-specific command:
npm run package:win
npm run package:mac
npm run package:linux
After successful build, you'll find the executable files inside the release-builds directory:
Windows:
PasteMax Setup 1.0.0.exe- Installer versionPasteMax 1.0.0.exe- Portable version
Mac:
PasteMax 1.0.0.dmg- Installer versionPasteMax 1.0.0.zip- Portable version
Linx:
PasteMax 1.0.0.deb- Installer version (Deb package)PasteMax 1.0.0.rpm- Installer version (RPM package)PasteMax 1.0.0.AppImage- Portable version
Development
Prerequisites
- Node.js (v14 or higher)
- npm or yarn
Running in Development Mode
To run the application in development mode:
# Start the Vite dev server
npm run dev
# In a separate terminal, start Electron
npm run dev:electron
Building for Production
To build the application for production:
# Build the React app with Vite and update paths for Electron
npm run build:electron
# Create platform-specific distributables
npm run package
Project Structure
src/- React application source codecomponents/- React componentscontext/- React context providershooks/- Custom React hookstypes/- TypeScript type definitionsutils/- Utility functionsstyles/- CSS stylesassets/- Static assets like images
electron/- Electron-Backend related filespublic/- Public assets (favicon, etc.)scripts/- Utility scripts for building and testingdocs/- Documentation
Libraries Used
- Electron - Desktop application framework
- React - UI library
- TypeScript - Type safety
- Vite - Build tool and development server
- tiktoken - Token counting for LLM context estimation
- ignore - .gitignore-style pattern matching for file exclusions
- chokidar - File Watcher
Troubleshooting
Getting "Warning: Not trusted" on Windows
If you see a warning about the app not being trusted, you can bypass this by clicking "run anyways". This is a common issue with Electron apps, especially since PasteMax is not signed.
Getting "App not responding" on Mac
If you encounter an "App not responding" message on Mac, it may be due to macOS security settings. You can try the following:
- Open System Preferences.
- Go to Security & Privacy.
- Under the General tab, look for the "Allow apps downloaded from" section.
- Look for "PasteMax" and click "Open Anyway".
Other Issues
If you encounter other issues, please report them on GitHub.
License
MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Star History ⭐
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
