Skip to content

Releases: fathriAbanoub/codegluer

v1.1.0 — Zip support, safety guards, chip UI, scoped excludes, timestamp checkbox

Choose a tag to compare

@fathriAbanoub fathriAbanoub released this 10 Jul 04:36
4e81bd7

What's new

🗜️ Zip file support

Pass a .zip as an input path (CLI or GUI) and its contents are glued directly — no manual extraction needed. GitHub-style zips with a single top-level folder (e.g. repo-main/) are auto-unwrapped so the tree shows src/app.py, not repo-main/src/app.py. Includes zip-slip (path traversal) protection and a pre-extraction size guard that rejects oversized archives before they hit disk.

🛡️ OOM / freeze safety guards

Recursive glues (-r) on real-world projects can otherwise choke on node_modules/.git/dist/etc. and thrash the system to a freeze. CodeGluer now guards against this by default:

  • Auto-skip common dependency/build folders (node_modules, .git, .next, .nuxt, dist, build, __pycache__, .venv, venv, target, .cache, .pytest_cache, vendor, .turbo) during -r. Disable with --no-default-ignore.
  • 20MB default size cap on total glued content, aborting before the offending file is appended. Adjust with --max-size <MB>, or --max-size 0 to disable.

🏷️ Chip-based exclude UI

The old comma-separated exclude text field is gone. Exclude patterns now show as removable chips (tags) — type a pattern and press Enter, or click Browse… to pick files/folders visually. Includes theme-aware chip colors and a fix for the chip reflow bug where chips would silently not appear after the first add.

🖱️ Scoped Browse button

The Browse button now opens anchored inside your selected folder — it won't let you wander off and exclude something outside your selection. Rejects:

  • Picks outside the selected directory or zip
  • Absolute paths (/etc/passwd)
  • Home paths (~/secret.txt)
  • .. traversals that escape the scope

Also includes a lighter _looks_heavy() heuristic that prevents the file picker from pointing directly at folders like node_modules (which would freeze GTK while thumbnailing).

Chip-based exclude UI and Browse button

🕐 Timestamp checkbox (GUI)

A new Timestamp checkbox next to the output filename. When checked, the default filename includes the current date and time in YYYYMMDD_HHMMSS format (e.g. Glued_Code_20260710_143022.md).

  • The entry field updates live as you toggle the checkbox.
  • Collision suffixing still applies: if Glued_Code_20260710_143022.md already exists, you get ..._1.md, ..._2.md, etc.
  • Toggling won't overwrite a custom filename you've typed — it only updates the field if it still holds a default value.
  • Switching format (Markdown ↔ Plain) respects the timestamp setting.
  • The post-glue notification shows the actual filename that was written, not a recomputed one.

🛡️ Uninstall fixes

uninstall.sh previously left two files behind:

  • ~/.local/bin/codegluer-gui — the GUI launcher itself
  • ~/.local/share/nautilus/scripts/CodeGluer — the current Nautilus right-click entry

Both are now correctly removed.

📚 README overhaul

  • Added CLI examples for --version, --toc, --stats, --estimate-tokens, --ai-prompt, and --tree-max-files.
  • New Known Limitations section covering mixed zip+non-zip inputs, naive zip unwrap, and the zip size guard's adversarial-zip-bomb caveat.
  • Softened the "Why CodeGluer?" pitch: pipx now mentions the pip --user fallback, and "no config files" → "zero required configuration".
  • Added screenshots/browse-scoped.png showing the scoped browse dialog.

Upgrade instructions

If you installed v1.0.0 via install.sh:

git pull
./install.sh

That's it. install.sh reinstalls the Python package (picking up the new version) and refreshes the codegluer-gui binary and file-manager integration files. The version bump to 1.1.0 ensures pip/pipx actually pick up the new code instead of skipping with "already satisfied."

Full changelog

v1.0.0...v1.1.0

v1.0.0 - Initial Stable Release

Choose a tag to compare

@fathriAbanoub fathriAbanoub released this 01 Jul 23:06

✨ Features

  • GTK4 GUI with theme support (auto/light/dark/roselle) and persistent settings
  • CLI with advanced filtering, tree output, stats, and token estimation
  • Native right-click integration for Nautilus (GNOME) and Nemo (Cinnamon)
  • Smart filtering with .gitignore and .codegluerignore support
  • Binary file detection to skip non-text files
  • Markdown mode with syntax highlighting and auto-generated TOC
  • Plain text mode with clear BEGIN/END FILE markers
  • Priority patterns to control file ordering
  • AI prompt support (inline or from file)
  • Pipe to stdout (-o -) for LLM workflows
  • Auto-timestamping to prevent accidental overwrites
  • Desktop notifications on GUI completion

🖼️ See it in action

Smart GUI adapts to your selection:

When selecting files (directory-only options hidden):

GUI for files

When selecting a directory (Tree, TOC, .gitignore appear):

GUI for directory

Clean, pasteable output:

Shows stats, tree, TOC, and syntax-highlighted code:
Markdown output

📦 Installation

git clone https://github.com/fathriAbanoub/codegluer.git
cd codegluer
./install.sh

Note: Ensure ~/.local/bin is in your PATH.

🐧 Requirements

  • Python 3.8+
  • GTK4 bindings: sudo apt install python3-gi gir1.2-gtk-4.0
  • Optional: pip install tiktoken (accurate token estimation)

💻 Quick Start

# Glue files
codegluer file1.py file2.js -o output.md

# Recursive directory
codegluer src/ -r --format markdown

# Via GUI
codegluer-gui file1.py file2.js

🧪 Testing

pip install pytest
pytest

Ready to glue some code? 🚀