Skip to main content

A tool to print git repository files with tree structure

Project description

ctxify 🎉

Turn Your Git Repo into a Clipboard-Ready Context Machine

GitHub release (latest by date) License

ctxify is a sleek CLI tool that grabs all tracked files in your Git repository, builds a neat tree structure, and copies everything—code and all—to your clipboard with a single command. Perfect for sharing project context, debugging, or feeding your code straight into AI assistants. Oh, and it even throws in an approximate token count for good measure! 🚀


Why ctxify?

Ever wanted to:

  • Share your project structure and code in one go?
  • Skip the hassle of manually copying files?
  • Know how many tokens your project weighs in at (for AI fun)?

ctxify does it all. It’s lightweight, fast, and skips the fluff (like lock files or .gitignore). Plus, it’s built with Python 3.13 and Git magic. ✨


Features

  • 📂 Git-Powered Tree View: Prints a gorgeous file tree of tracked files.
  • 📋 Clipboard Ready: Copies the tree and file contents instantly.
  • 🚫 Smart Filtering: Ignores non-code files (e.g., package-lock.json, .txt) by default.
  • 📝 Markdown Support: Optionally include .md files with a simple flag.
  • 📏 Token Count: Estimates tokens (1 token ≈ 4 chars) for the full output.

Installation

  1. Clone the repo:

    git clone https://github.com/yourusername/ctxify.git
    cd ctxify
    
  2. Set up Python 3.13: Use pyenv or your favorite tool to install Python 3.13 (check .python-version).

  3. Install dependencies:

    pip install click gitpython
    
  4. Optional (for clipboard support): On Linux, install xclip:

    sudo apt install xclip
    

Usage

Run it from your Git repo’s root:

python -m src.ctxify.cli

Options

  • --md / -md: Include .md files (like README.md) in the output.
    python -m src.ctxify.cli --md
    

Example Output

Files Included in Context:
├── .python-version
└── src
    └── ctxify
        ├── __init__.py
        ├── cli.py
        └── main.py

Approximate token count: 512 (based on 1 token ≈ 4 chars)

The clipboard gets the tree plus all file contents—ready to paste anywhere!


Contributing

Love ctxify? Want to make it even better?

  • Fork it.
  • Submit a PR.
  • Open an issue with ideas or bugs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ctxify-0.1.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ctxify-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file ctxify-0.1.0.tar.gz.

File metadata

  • Download URL: ctxify-0.1.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.1

File hashes

Hashes for ctxify-0.1.0.tar.gz
Algorithm Hash digest
SHA256 43375750d0be37e07345898b431e32ab67f7642570d51a9056f71b0b9824a5ce
MD5 c3155ce30317560dc88c90816d2c4db2
BLAKE2b-256 dffe9117ba6fb3959eefc4a64c04026f4968cf2585b61d19eeb1dc22ba2f01ae

See more details on using hashes here.

File details

Details for the file ctxify-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ctxify-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.1

File hashes

Hashes for ctxify-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5dad7ff025cf3ad7f483d869e0a830ad4188b3415869b10c2eb4059395a0e1c1
MD5 298f5b14b03b8c121e3b9e7509be822c
BLAKE2b-256 5f6d1cf2e8ad3d7b1ec6533912852ce80ecf563b52f2f248620eed90404a0b66

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page