Skip to content

A simple, interactive tool to select and share code with AI assistants like Claude and ChatGPT. Analyzes file relationships and generates context-rich output.

License

Notifications You must be signed in to change notification settings

maynetee/codeselect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeSelect

CodeSelect Logo

Easily select and share code with AI assistants

CodeSelect is a lightweight tool that helps developers share code with AI assistants like Claude or ChatGPT. It provides a simple interface to select files from a project and exports them in an AI-friendly format with intelligent context about project structure and relationships between files.

πŸš€ Quick Install

# One-line installation
curl -sSL https://raw.githubusercontent.com/maynetee/codeselect/main/install.sh | bash

✨ Features

  • Visual File Selection: Interactive UI to easily select files with checkboxes
  • Intelligent Code Analysis: Automatically detects imports and relationships between files
  • Multi-language Support: Works with Python, C/C++, JavaScript, Java, Go, Ruby, PHP, Rust, Swift and more
  • Zero Dependencies: Works with standard Python libraries only
  • Non-admin Installation: No special privileges required
  • Clipboard Integration: Automatically copies output to clipboard
  • AI-optimized Format: Structures output to help AI assistants understand project context

πŸ› οΈ Usage

# Navigate to your project directory
cd ~/projects/myproject

# Run CodeSelect
codeselect

# Export specific directory with custom filename
codeselect /path/to/project -o output.txt

# Help and options
codeselect --help

πŸ–₯️ Interface Controls

  • ↑/↓: Navigate between files
  • Space: Toggle selection of file/directory
  • ←/β†’: Collapse/expand directories
  • A: Select all files
  • N: Deselect all files
  • C: Toggle clipboard copy
  • D or Enter: Complete selection and export
  • X or Esc: Exit without saving

πŸ“„ Output Formats

CodeSelect offers three output formats:

  • LLM (default): Optimized for language models with context about file relationships
  • Markdown: GitHub-compatible markdown with syntax highlighting
  • TXT: Plain text format for maximum compatibility
# Generate GitHub-compatible markdown
codeselect --format md

# Generate AI-optimized format
codeselect --format llm

βš™οΈ Advanced Options

usage: codeselect [-h] [-o OUTPUT] [--format {txt,md,llm}] [--skip-selection] [--no-clipboard] [--version] [directory]

CodeSelect v1.0.0 - Select files to share with AI assistants

positional arguments:
  directory             Directory to scan (default: current directory)

options:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        Output file path (default: based on directory name)
  --format {txt,md,llm}
                        Output format (default: llm - optimized for LLMs)
  --skip-selection      Skip the selection interface and include all files
  --no-clipboard        Disable automatic copy to clipboard
  --version             Show version information

πŸ” How It Works

  1. Scan: CodeSelect scans your project directory structure
  2. Select: Interactive interface lets you choose which files to include
  3. Analyze: Automatically detects dependencies between files
  4. Generate: Creates a specially formatted output optimized for AI assistants
  5. Copy: Automatically copies result to clipboard for easy pasting

πŸ’» Development

CodeSelect was developed in just 30 minutes with the help of Claude, Anthropic's AI assistant. It demonstrates how AI can help create useful developer tools through iterative improvements.

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ—‘οΈ Uninstallation

To remove CodeSelect from your system:

# One-line uninstallation
curl -sSL https://raw.githubusercontent.com/maynetee/codeselect/main/uninstall.sh | bash

About

A simple, interactive tool to select and share code with AI assistants like Claude and ChatGPT. Analyzes file relationships and generates context-rich output.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published