Stop copying files into ChatGPT one by one...
# 1. Grab your backend context in one command
codepicker "src/**/*.ts" -c
# 2. Paste into your LLM and copy the response
# 3. Apply it back to your project
codepicker apply -ccodepicker is a bidirectional CLI that turns your codebase into structured Markdownβand back again!
Itβs designed to make working with LLMs on real projects fast and predictable. Instead of juggling files manually, you move context in and out of your project with a couple of commands.
Working with LLM chats on existing codebases usually looks like: open files, copy paths and content, paste into chat, repeat, manually reconstruct changes...
Even with IDE agents, you're often locked into their workflow.
- Instant context β copy entire project slices with
-c - Reverse workflow β
applyturns Markdown back into files - Noise-tolerant parsing β ignores explanations, keeps only code
- Smart Markdown wrapping β prevents broken code blocks
- Precision controls β limit lines, add numbers, absolute paths (only for context)
- Documentation mode (
-D) β helps LLMs follow the codepick format correctly - Binary-safe β avoids dumping unreadable content
- .gitignore aware β respects your repo by default
To apply the copied LLM response, a format called codepick is used. This is perfectly parsed, and βunlike diffs or other response formatsβ it packages the entire content of the file.
npm install -g codepicker-toolcodepicker --version
# or
codep --version
codepis just a shorter alias forcodepicker.
codepicker pick [options] <patterns...>Note
pick command is optional, just use:
codepicker [options] <patterns...>
| Option | Description |
|---|---|
<patterns...> |
Required glob file patterns to find |
-c, --clipboard |
Copy output to clipboard |
-D, --doc |
Append format documentation |
-I, --include-ignored |
Include .gitignore files |
-a, --absolute |
Use absolute paths |
-l, --lines <n> |
Limit lines per file |
-p, --paths |
Output only file paths |
-n, --line-numbers |
Show line numbers |
-V, --version |
Show version |
-h, --help |
Help |
codepicker apply [options] [dump-file]| Option | Description |
|---|---|
[dump-file] |
Markdown file with code blocks |
-c, --clipboard |
Read from clipboard instead of dump file |
-d, --dir <path> |
Target directory (default current) |
--dry-run |
Preview changes without write |
codep -Dc "src/services/*.ts" "src/views/**/*.tsx"Paste and instruct:
Modify the view with a blue button and modern shadow.
IMPORTANT: Use Codepick format.
codep apply -cSome models need guidance. Use:
codepicker "src/**/*.ts" -cDThe -D flag appends the full format spec so the model responds correctly.
codepicker "src/**/*" > backup.mdRestore anytime:
codepicker apply backup.mdcodepicker "src/**/*.ts" -l 5 -nNeed to feed file paths into another tool (like xargs or grep)? Use -p:
codepicker "src/**/*.ts" -p -a/home/user/project/src/index.ts
/home/user/project/src/utils/helpers.ts
codepicker "dist/**/*.js" -Iapply ignores everything outside code blocks.
If the response includes explanations, theyβre safely discarded.
Only valid code is written.
Binary files are replaced with metadata instead of raw bytes:
```png
// assets/logo.png
// [BINARY FILE] - Size: 0.024 MB
```
Uses fast-glob.
Supports:
**(globstars)!(negation)- advanced matching
More info:
MIT
