human-tar
@readwithai - X - blog - machine-aided reading - 📖⚡️🖋️
A human-readable tar format for text files. Easy for AIs to write and read.
This includes AI generated code. The interface is liable to change -- so do not use this in programs.
Motivation
I've been doing a little vibe-coding with online LLMs and found myself occasionally producing a number of files to share. While some online LLMs can produce tar files, this process is often buggy and slow compared to producing output like this (using prompts)
Alternatives and prior Work
This format is based on the output of grep . -r . - which can be used to produce output to give to an LLM (with the appropriate ignore flags)
You could use claude code cursor/windsurf or another AI tool to circumvent the need for this sort of tool. There are various tools to wrap up a codebase ready to be sent into an AI, but not necessarily the other way.
Installation
Install human-tar from PyPI using pipx
pipx install human-tar
Usage
human-tar will give you the output for the current git repo in this format.
human-tar bytes tells you how many bytes each file is taking up.
human-tar exclude '*.json' excludes all json iles
human-tar exclude files excludes a files.
human-untar unpacks the output in the form of grep . -r into the original file structure. It reads input from a file or stdin and writes files to the current directory by default.
Compression
While very-readable, and the output of a grep a standard tool, the default output is longer than it needs to be causing claude to hit up against limits.
Examples
As a demonstraction, this command produces human-tar input using grep and feeds this into human-tar.
grep . -r /path/to/dir | human-untar
You can also provide a path on the current directory or from the clipboard using xclip on linux or pblaste on mac
human-untar file.txt
human-untar <(xclip -o -selection CLIPBOARD)
For testing purposes, you might want to output into a different directory using the -o option
human-tar file.text -o file
Input Format
The input should be in the format of grep . -r output, e.g.:
src/main.c:int main() {
src/main.c: printf("Hello, world!\n");
src/utils/helper.c:void help() {
This will create (in the current directory by default):
./
├── src/
│ ├── main.c
│ └── utils/
│ └── helper.c
Options
-o, --output-dir: Specify the output directory (default: current directory).- Example:
human-tar -o my_output_dir grep_output.txt
About me
I am @readwithai. I create tools for reading, research and agency sometimes using the markdown editor Obsidian.
I also create a stream of tools like this that are related to carrying out my work. As users of tool are likely interesting in AI you might like to read my blog about tools for reading with ai.
I write about lots of things - including tools like this - on X. My blog is more about reading and research and agency.
Metadata
Release files for human-tar 3.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| human_tar-3.0.2.tar.gz | 8.3 kB | Without provenance | Details for human_tar-3.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| human_tar-3.0.2-py3-none-any.whl | Python 3 | none | any | Details for human_tar-3.0.2-py3-none-any.whl |
Total release size: 17.4 kB
Release files / human_tar-3.0.2.tar.gz
| Download URL | human_tar-3.0.2.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e129556090c55748d14b1b8186f91a799103d2d6a14b01f759b9935443ee7dbf
|
|
BLAKE2b-256 checksum How to use checksums |
80c36bfd274a09b83cc18b7ffc1ebcd60097a7d6f2a5c57441bc9b09bbdc99d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / human_tar-3.0.2-py3-none-any.whl
| Download URL | human_tar-3.0.2-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
57e52bcec8efd55621f560b0c940c1eddbf90a46b31ebe55d98e1e754a42c020
|
|
BLAKE2b-256 checksum How to use checksums |
6b492a3f5e62a9249cdc8d520808d577a47d6602650cbae0186562430dd3209a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for human-tar 3.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.