Skip to main content

Simple Python CLI tool for turning directories into a single text file for input to LLMs.

Project description

grabit

grabit is a command-line tool for recursively scanning a directory, extracting file contents, and saving or copying them to the clipboard while respecting .grabit ignore rules. The tool helps turn complex projects into LLM input for big context questions.

Features

  • Recursively extracts file contents from a directory.
  • Respects .grabit ignore files (similar to .gitignore).
  • Saves extracted content to a file or copies it to the clipboard.
  • Works on Windows, macOS, and Linux.

Installation

Install grabit using pip:

pip install grabit

Usage

Basic Usage

grabit /path/to/directory

Save Output to a File

grabit /path/to/directory -o output.txt

Copy Output to Clipboard

grabit /path/to/directory -c

Ignore Files

To ignore specific files or patterns, create a .grabit file in the root of your project. This works similarly to .gitignore.

Example .grabit:

*.log
__pycache__/
secrets.txt

Example Output

When run, grabit will generate a structured output:

## `src/main.py`:
``
print("Hello, World!")
``

## `README.md`:
``
# Project Readme
``

License

MIT License

Connor Skelland

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

grabit-0.1.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

grabit-0.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: grabit-0.1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Windows/10

File hashes

Hashes for grabit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0e491c3682f3f6f3aa49a016a6f1fe5f1bb447baea8ae25593f28bc0d9338134
MD5 839c302e64063e35f0a1e34cf8bd1297
BLAKE2b-256 ba68bbcbdcfb3e01ebb23e4c1bc643ce9df661140799c0a7f9b7d0956ed3f97d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: grabit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Windows/10

File hashes

Hashes for grabit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 39e1d230769eb1658215b42e03169888f3df05c3635121caa9c594cdf318ffab
MD5 686397d72057d9da7b56bda7b7f54c83
BLAKE2b-256 44f243885970c2421ab9b40725f3add60cdce1ce68dfe2d101f10c4d94e450d4

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