Grabit.sh is a powerful command-line tool designed to quickly gather and summarize useful information from Git repositories. It provides developers with a comprehensive overview of a project's structure, Git information, important files, and more.
You can download pre-built binaries for your platform from the Releases page or use curl
for direct download.
Download the grabitsh-linux-amd64
file from the latest release:
curl -L -o grabitsh-linux-amd64 https://github.com/loftwah/grabitsh/releases/latest/download/grabitsh-linux-amd64
Make it executable:
chmod +x grabitsh-linux-amd64
Optionally, move it to a directory in your PATH:
sudo mv grabitsh-linux-amd64 /usr/local/bin/grabitsh
Download the grabitsh-darwin-amd64
file from the latest release:
curl -L -o grabitsh-darwin-amd64 https://github.com/loftwah/grabitsh/releases/latest/download/grabitsh-darwin-amd64
Make it executable:
chmod +x grabitsh-darwin-amd64
Optionally, move it to a directory in your PATH:
sudo mv grabitsh-darwin-amd64 /usr/local/bin/grabitsh
Download the grabitsh-windows-amd64.exe
file from the latest release using a browser or:
curl -L -o grabitsh-windows-amd64.exe https://github.com/loftwah/grabitsh/releases/latest/download/grabitsh-windows-amd64.exe
Optionally, rename it to grabitsh.exe
for convenience.
Add the directory containing the executable to your PATH environment variable.
If you prefer to build from source or want the latest development version:
Ensure you have Go installed on your system.
Clone the repository:
git clone https://github.com/loftwah/grabitsh.git
Navigate to the project directory:
cd grabit.sh
Build the project:
go build -o grabitsh
To use Grabit.sh, navigate to a Git repository directory and run the following command:
grabitsh --output <output_method>
Replace <output_method>
with one of the following options:
stdout
: Display the output in the terminal (default)clipboard
: Copy the output to your clipboardfile
: Save the output to a file (use the -f
flag to specify the file path)llm-chunks
: Generate LLM-friendly chunks of the output (new feature)Display output in the terminal:
grabitsh --output stdout
Copy output to clipboard:
grabitsh --output clipboard
Save output to a file:
grabitsh --output file -f output.txt
Generate LLM-friendly chunks:
grabitsh --output llm-chunks
This will create multiple text files, each containing a portion of the output with a preamble suitable for use with Large Language Models.
Customize chunk size for LLM output:
grabitsh --output llm-chunks --chunk-size 50000
This sets the chunk size to 50,000 tokens. The default is 100,000 tokens.
The LLM-chunks output method is designed to create AI-friendly chunks of the Grabit.sh output. Each chunk includes a preamble that provides context about the tool, its purpose, and instructions for the AI model. This feature is particularly useful when you want to analyze the output using a Large Language Model or other AI tools.
Key points about LLM-chunks:
grabitsh_chunk_1.txt
, grabitsh_chunk_2.txt
, etc.).--chunk-size
flag.Grabit.sh also includes a web server feature. To start the web server, use the following command:
grabitsh serve
This will start a web server on port 42069. You can access it by navigating to http://localhost:42069
in your web browser.
Grabit.sh is evolving beyond its current CLI functionality to include web-based capabilities. The following features and versions are planned for future releases:
Free Hosted Version (Public Repositories)
Paid Hosted Version (Private Repositories)
A subscription-based model designed for users who need to analyze private repositories.
Offers advanced features such as:
The pricing will be tiered based on the number of repositories and users, with options for monthly or annual subscriptions.
grabit.sh/
├── cmd/
│ └── grabitsh/
│ ├── root.go
│ ├── serve.go
│ └── project_detection.go
├── main.go
├── go.mod
├── go.sum
├── LICENSE
├── README.md
└── .gitignore
Contributions to Grabit.sh are welcome! Please feel free to submit a Pull Request.
This project is licensed under the terms of the license included in the LICENSE file.
For any queries or suggestions, please open an issue on the GitHub repository.