Guntar
Guntar is a CLI tool for tar archive. It allows you to read, browse, and extract files directly in memory.
Features
- Browse tar archives in memory
- Extract files from tar archives
- List files within a tar archive
Installation
Work in Progress (I will add a docker image, packages, etc...)
Install binary
For now you can clone the repository and run
make install-binary
Build docker image
make build
Build gifs
After building guntar docker image,
We can build gifs with the following commands
# Build all gifs
make build-gifs
# Build one gif (here list.gif)
make build-gif-list
it will only build updated tapes.
Usage
Basic Command Structure
guntar [command]
Available Commands
explore
Explore your tar archive in memory directly in your CLI. You can browse, look into files, and extract selected files/folders.
This interactive cli is based on bubbletea project
Usage:
guntar explore <archive file> [flags]
Flags:
-h
, --help
: Help for explore
-o
, --output string
: Output directory to extract archive
Example:
guntar explore archive.tar -o output_directory
- Navigate through directories and files with arrows
- Select files or directory to extract with 'a'
- no checkmark -> file or directory not selected
- $\color{Green}{\textsf{✓}}$ -> file selected / all child in directory selected
- $\color{Orange}{\textsf{✓}}$ -> some files are selected in the directory
- Extract files with 'e'
Known Issues:
- big files can break the textbox view -> will set a max size preview
Extract files from a tar archive.
Usage:
guntar extract <archive file> [flags]
Flags:
-e
, --ext []string
: List of files to extract
-h
, --help
: Help for extract
Example:
guntar extract archive.tar -e file1.txt -e file2.txt
help
Display help information about any command.
Usage:
guntar help [command]
list
List all files in the current archive.
Usage:
guntar list <archive file> [flags]
Flags:
-h
, --help
: Help for list
Example:
guntar list archive.tar
Global Flags
-h
, --help
: Display help information for Guntar.
Examples
List All Files in a Tar Archive
guntar list archive.tar
guntar extract archive.tar -e file1.txt -e file2.txt
Explore a Tar Archive in Memory
guntar explore archive.tar -o output_directory
Getting Help
For more information about a specific command, use:
guntar [command] --help
Contributing
TODO
License
this project use MIT license