| Crates.io | quickctx |
| lib.rs | quickctx |
| version | 0.1.2 |
| created_at | 2025-10-25 19:52:19.978025+00 |
| updated_at | 2025-10-25 19:52:19.978025+00 |
| description | A bidirectional file content aggregator and extractor that converts between files and markdown-formatted representations |
| homepage | https://github.com/CaddyGlow/quickctx |
| repository | https://github.com/CaddyGlow/quickctx |
| max_upload_size | |
| id | 1900554 |
| size | 476,815 |
Quickly extract file contents and code context to share with LLMs.
Quickctx is designed for one thing: getting your code into LLM conversations as fast as possible. Point it at files or directories, and instantly get markdown-formatted output ready to copy/paste into ChatGPT, Claude, or any other LLM.
When working with LLMs on code, you need to:
Quickctx does all of this in a single command.
.gitignore by default.gitignore patterns by defaultHomebrew (macOS/Linux):
brew tap CaddyGlow/packages
brew install quickctx
Scoop (Windows):
scoop bucket add caddyglow https://github.com/CaddyGlow/homebrew-packages
scoop install quickctx
See INSTALL.md for detailed installation instructions and other methods.
Unix-like systems (Linux, macOS, Android/Termux):
curl -fsSL https://raw.githubusercontent.com/CaddyGlow/quickctx/main/install.sh | bash
Or with wget:
wget -qO- https://raw.githubusercontent.com/CaddyGlow/quickctx/main/install.sh | bash
Windows (PowerShell):
irm https://raw.githubusercontent.com/CaddyGlow/quickctx/main/install.ps1 | iex
Custom installation directory:
# Unix-like systems - set QUICKCTX_INSTALL_DIR
export QUICKCTX_INSTALL_DIR="$HOME/bin"
curl -fsSL https://raw.githubusercontent.com/CaddyGlow/quickctx/main/install.sh | bash
For manual installation or troubleshooting, see install.sh or install.ps1.
# Install from crates.io
cargo install quickctx
# Or use cargo-binstall for faster binary installation
cargo binstall quickctx
This installs both quickctx and quickctx-analyze binaries.
git clone https://github.com/CaddyGlow/quickctx.git
cd quickctx
cargo build --release
The binaries will be available at:
target/release/quickctxtarget/release/quickctx-analyzeQuickctx includes a built-in self-update feature:
# Check for updates
quickctx update --check-only
# Install latest version (interactive)
quickctx update
# Install without confirmation
quickctx update --yes
Quickctx automatically checks for updates every 7 days and notifies you if a new version is available.
1. Extract files to clipboard:
# Get all source files, copy output to clipboard
quickctx src/ | pbcopy # macOS
quickctx src/ | xclip -selection clipboard # Linux
quickctx src/ | clip # Windows
# Or save to file first
quickctx src/ -o context.md
2. Paste into your LLM conversation (ChatGPT, Claude, etc.)
3. Get generated/modified code back:
# Paste the LLM's response back to files
quickctx paste response.md
Copy specific files:
quickctx file1.rs file2.rs # Outputs to stdout
Copy entire directory:
quickctx src/ # Respects .gitignore by default
Copy with glob patterns:
quickctx "src/**/*.rs" # Just Rust files
Choose output format:
quickctx src/ -f heading # Include headings with file paths
quickctx src/ -f comment # Paths as comments in code blocks
Analyze code symbols:
# Get function signatures, types, and documentation
quickctx-analyze src/main.rs src/lib.rs
quickctx [OPTIONS] [PATH]... [COMMAND]
Arguments:
[PATH]... Files, directories, or glob patterns to copy
Options:
--config <FILE> Path to configuration file (defaults to quickctx.toml)
-v, --verbose... Increase log verbosity (repeatable)
-o, --output <FILE> Write output to file instead of stdout
-f, --format <FORMAT> Output format [possible values: simple, comment, heading]
--fence <FENCE> Fence style [possible values: auto, backtick, tilde]
--no-gitignore Don't respect .gitignore files
--ignore-file <FILE> Additional ignore file(s) to apply
--exclude <GLOB> Exclude glob pattern(s)
-h, --help Print help
-V, --version Print version
quickctx paste [OPTIONS] [INPUT]
Arguments:
[INPUT] Markdown input file (omit to read from stdin)
Options:
-o, --output <DIR> Output directory [default: current directory]
--conflict <ACTION> Conflict handling [possible values: prompt, skip, overwrite]
-h, --help Print help
quickctx-analyze [OPTIONS] <FILE>...
Arguments:
<FILE>... Source file(s) to analyze
Options:
-f, --format <FORMAT> Output format [possible values: markdown, json, csv,
compact, symbol-list] [default: markdown]
-o, --output <OUTPUT> Output file (defaults to stdout)
--config <FILE> Path to configuration file (defaults to quickctx.toml)
--project-root <DIR> Override project root directory
--lsp-server <CMD> Override LSP server command
-v, --verbose... Increase log verbosity (repeatable)
--diagnostics Show diagnostics (errors/warnings) instead of symbols
--diagnostics-timeout <SECS>
Timeout for diagnostics [default: 30]
--no-gitignore Don't respect .gitignore when walking directories
--hidden Include hidden files and directories
--lsp-timeout <SECS> LSP server readiness timeout [default: 30]
--filter-symbols <NAMES>
Filter to specific symbol names (comma-separated or file)
--no-cache Disable symbol cache (force fresh extraction)
--clear-cache Clear cache before running
-h, --help Print help
-V, --version Print version
file.c
```c
int main() {
return 0;
}
#### Comment Format
```markdown
```c
// src/main.c
int main() {
return 0;
}
#### Heading Format
```markdown
## `src/main.c`
```c
int main() {
return 0;
}
### Analysis Formats
#### Markdown Format
```markdown
# Code Analysis: `src/lib.rs`
## Functions
### `run` (Function)
**Signature:** `fn(cfg: RuntimeConfig) -> Result<()>`
**Location:** Line 42-58
**Documentation:** Main entry point for the application...
---
{
"file": "src/lib.rs",
"symbols": [
{
"name": "run",
"kind": "Function",
"detail": "fn(cfg: RuntimeConfig) -> Result<()>",
"documentation": "Main entry point...",
"line_start": 42,
"line_end": 58
}
]
}
One-line summaries per symbol for quick scanning.
Structured data for spreadsheet analysis:
file,name,kind,signature,line_start,line_end
src/lib.rs,run,Function,"fn(cfg: RuntimeConfig) -> Result<()>",42,58
Simple list of symbol names, one per line.
Quickctx automatically detects code fences in your files and adjusts the delimiter to avoid conflicts:
Input file contains:
```rust
let x = 42;
```
Output uses 4 backticks:
example.md
````markdown
```rust
let x = 42;
```
````
By default, quickctx respects .gitignore files:
# Respects .gitignore (default)
quickctx src/
# Include ignored files
quickctx src/ --no-gitignore
# Use custom ignore file
quickctx src/ --ignore-file .customignore
# Add additional exclude patterns
quickctx src/ --exclude "*.tmp" --exclude "*.bak"
Create a quickctx.toml file for project-specific settings:
[general]
verbose = 1
[copy]
# Copy mode settings
paths = ["src/", "tests/"]
format = "heading"
fence = "backtick"
respect_gitignore = true
exclude = ["*.tmp", "*.bak"]
# output = "project.md"
# ignore_files = [".customignore"]
[paste]
# Paste mode settings
# output_dir = "restored/"
conflict = "skip"
[analyze]
# Optional: default output format
format = "markdown"
# Additional paths to search for LSP server binaries
# These paths will be prepended to PATH when spawning LSP servers
# Supports tilde expansion (e.g., ~/.local/bin)
bin_paths = [
"~/.local/share/nvim/mason/bin", # Mason LSP servers
# "~/mycode/.venv/bin", # Python virtual environment
]
# LSP server commands/paths by language
[analyze.lsp_servers]
rust = "rust-analyzer"
python = "pyright-langserver --stdio"
typescript = "typescript-language-server --stdio"
javascript = "typescript-language-server --stdio"
go = "gopls"
Use it with:
# Config file is loaded automatically if quickctx.toml exists
quickctx src/
# Or specify a custom config file
quickctx --config my-config.toml src/
The bin_paths configuration in [analyze] allows you to extend the PATH when searching for LSP server binaries. This is useful for LSP servers installed in non-standard locations:
~/.local/share/nvim/mason/bin~/myproject/.venv/bin~/.local/bin, /opt/lsp-servers/binFeatures:
~/ is automatically expanded to your home directorySettings are applied in this order (highest to lowest priority):
quickctx.toml or --config fileNo additional dependencies required.
You need the appropriate LSP server installed for your language:
rust-analyzer (usually installed with rustup)pylsp or pyright-langservertypescript-language-servergoplsGet your code into an LLM conversation:
# Quick: pipe directly to clipboard
quickctx src/ | pbcopy
# Or save to file and review first
quickctx src/ -f heading -o context.md
# Include specific files only
quickctx src/main.rs src/lib.rs src/config.rs | pbcopy
# Get detailed symbol analysis for complex refactoring
quickctx-analyze src/ -o symbols.md
Then paste into ChatGPT/Claude with a prompt like:
"Here's my codebase. Can you help me refactor the error handling to use a custom Result type?"
Share project files with colleagues or in bug reports:
quickctx src/ tests/ -f comment -o share.md
Paste code examples from documentation:
quickctx paste API_EXAMPLES.md -o examples/
Create and instantiate project templates:
# Copy template
quickctx template-project/ -o rust-template.md
# Paste template
quickctx paste rust-template.md -o my-new-project/
Generate comprehensive code analysis:
# Analyze all source files
quickctx-analyze src/*.rs --format json -o analysis.json
# Extract just function names
quickctx-analyze src/lib.rs --format symbol-list
# Get diagnostics
quickctx-analyze src/main.rs --diagnostics
# Filter specific symbols
quickctx-analyze src/lib.rs --filter-symbols "run,main"
Analyze multiple files efficiently:
# Analyze all files in one pass (shares LSP server)
quickctx-analyze src/main.rs src/lib.rs src/config.rs -o analysis.md
# Use glob pattern with find
find src -name "*.rs" -exec quickctx-analyze {} -o {}.analysis.md \;
cargo build --release
# Run all tests
cargo test
# Run specific test
cargo test copy_single_file_to_markdown_file
# Run tests with output
cargo test -- --nocapture
# Lint with Clippy
cargo clippy -- -D warnings
# Format code
cargo fmt
# Check formatting
cargo fmt -- --check
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
ignore crate for gitignore supportIf you encounter any issues or have questions, please open an issue.