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.1.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.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: grabit-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 c025f65c03420fd9e8cc7f644fc6e44a18e42c8e72c09dc0abb70eee532e30ff
MD5 904c64e655ece10469d5a5d1e9ff4770
BLAKE2b-256 7d394ab167ffc5b730e1331f13558e6184190e50b4b0e4ad5d5ab453f6962ca3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: grabit-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a8dada551e2c455212951ed333ac9f6a1b6e72ff27b46c12558d4cdc0b0c93c9
MD5 233ef4e7ba929c634f2806dfb20ef79a
BLAKE2b-256 0f9b0bd4a44b330e48e928c9235a5f6827cb47c6facf10e08d8440f9e467dc61

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