# unp: A Universal Command-Line Tool for Effortless Archive Unpacking

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/mitsuhiko-unp
Generated for open source discovery and AI-assisted research.

unp is a versatile command-line utility designed to simplify archive unpacking on POSIX systems. It intelligently determines the correct unpacker to use and safely extracts contents, preventing directory clutter by wrapping multiple top-level items in a new folder. This tool supports a wide array of archive formats, making it an indispensable addition to any developer's toolkit.

GitHub: https://github.com/mitsuhiko/unp
OSRepos URL: https://osrepos.com/repo/mitsuhiko-unp

## Summary

unp is a versatile command-line utility designed to simplify archive unpacking on POSIX systems. It intelligently determines the correct unpacker to use and safely extracts contents, preventing directory clutter by wrapping multiple top-level items in a new folder. This tool supports a wide array of archive formats, making it an indispensable addition to any developer's toolkit.

## Topics

- Python
- CLI
- Archive
- Unpack
- Utility
- File Management
- Tool

## Repository Information

Last analyzed by OSRepos: Mon Feb 23 2026 00:34:39 GMT+0000 (Western European Standard Time)
Detail views: 17
GitHub clicks: 15

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

unp is a powerful command-line utility designed to streamline the process of unpacking various archive formats. Acting as a smart wrapper around existing shell tools on POSIX systems, it intelligently identifies the correct utility needed to extract your files. A key feature of unp is its ability to safely unpack archives, automatically creating a containing folder if an archive would otherwise scatter multiple top-level items directly into your working directory, thus keeping your workspace tidy.

## Installation

Installing unp is straightforward, especially if you use `pipsi`, a pip-like installer for Python applications. If you have `pipsi` configured, you can install unp with a single command:


$ pipsi install unp


## Examples

Using unp is incredibly simple. To unpack an archive, just provide its filename:


$ unp myarchive.tar.gz


unp supports a broad range of archive types, including:

*   7zip Archives (*.7z)
*   AR Archives (*.a)
*   Apple Disk Image (*.dmg; *.sparseimage)
*   Bz2 Compressed Files (*.bz2)
*   Bz2 Compressed Tarballs (*.tar.bz2)
*   Gzip Compressed Files (*.gz)
*   Gzip Compressed Tarballs (*.tar.gz; *.tgz)
*   Uncompressed Tarballs (*.tar)
*   WinRAR Archives (*.rar)
*   Windows Cabinet Archive (*.cab)
*   XZ Compressed Files (*.xz)
*   XZ Compressed Tarballs (*.tar.xz)
*   Zip Archives (*.zip; *.egg; *.whl; *.jar)

Note that DMG support is specific to OS X, where it leverages `hdiutil` to copy out contents.

## Why Use unp

unp stands out for several reasons. Its primary advantage is simplicity, offering a unified command for unpacking diverse formats without needing to remember specific tool names or flags. The automatic directory creation for multi-item archives ensures your projects remain organized. Furthermore, its extensive support for common and less common archive types makes it a highly versatile tool, reducing the need for multiple specialized unpackers.

## Links

For more detailed information, to contribute, or to report issues, please visit the official GitHub repository:

[unp GitHub Repository](https://github.com/mitsuhiko/unp)