Codeclip is now available on the AUR! 🎉
yay -S codeclipor with paru:
paru -S codeclipgit clone https://aur.archlinux.org/codeclip.git
cd codeclip
makepkg -siCodeclip is a fast, minimal CLI tool written in C that turns entire codebases — or single files — into clean, syntax-highlighted Markdown files.
It’s ideal for documentation, sharing snippets, or creating AI-ready context dumps of your code.
- 🪶 Simple CLI: Works with just one command —
codeclip <path> - 🧭 Auto project detection: Finds the project root via
.git - 🧱 Breadth-first traversal: Outputs files in logical, readable order
- 🧹 Smart ignore system: Skips binaries and common junk (
.git,node_modules, etc.`) - 🧩 Single-file mode:
codeclip file.cdumps one file instead of a whole folder - 💾 Automatic config: Creates default config and ignore files on first run
- 📋 Clipboard integration:
- By default: copies the Markdown file path
- With
-cor--clipboard: copies the full Markdown contents
- 🧼 Subcommands:
codeclip clear— clears generated Markdown filescodeclip help— prints this helpcodeclip version— prints current version
- 🕓 Timestamped output names: e.g.
~/.local/share/codeclips/20251017_173455_src_main.c.md
git clone https://github.com/andrepadez/codeclip.git
cd codeclip
make clean && make
sudo make installThis installs the codeclip binary to /usr/local/bin.
To uninstall:
sudo make uninstallcodeclip <path>Dumps the directory or file at <path> into Markdown
and copies the resulting file path to the clipboard.
Example:
codeclip src/→ Creates a file like:
~/.local/share/codeclips/20251017_173455_src_main.c.md
codeclip -c <path>
# or
codeclip --clipboard <path>Copies the full Markdown content instead of the file path.
codeclip src/main.cGenerates and copies:
~/.local/share/codeclips/20251017_173455_src_main.c.md
codeclip clear
# or
codeclip clear --forceDeletes all files in your configured output directory (~/.local/share/codeclips by default).
codeclip help
codeclip -h
codeclip --help
codeclip version
codeclip -v
codeclip --versionYour configuration lives in:
~/.config/codeclip/config.yaml
Default contents:
output_dir: "~/.local/share/codeclips"
clipboard_tool: "xclip" # auto-detected (wl-copy / pbcopy supported)The ignore file (codeclipignore) defines which files and directories are skipped.
Example Markdown generated by Codeclip:
--- src/main.c ---
```c
#include <stdio.h>
int main() {
printf("Hello, Codeclip!\n");
return 0;
}
---
## 🧩 Development
To rebuild with default assets:
```bash
make clean && make
To run without installing:
make run ARGS="src/"Codeclip 1.0.0 — Initial stable release
✨ Refactored codebase with modular helpers, subcommands,
clipboard mode toggle, and timestamped file outputs.
MIT License © 2025 André Pádez
Use freely, modify, share, and have fun!