Skip to main content

Archive CLI

A simple and interactive command-line tool for creating and extracting archives. Features intelligent path completion and supports both tar.gz and zip formats.

Features

  • Interactive prompts with tab completion for file/directory paths
  • Dual format support: Create and extract tar.gz and zip archives
  • Auto-generated naming: Archives and extraction directories use timestamp-based names
  • Format detection: Automatically detects archive format when extracting
  • Professional structure: Clean, modular codebase with separation of concerns

Installation

# Install dependencies
uv sync

# Install as a CLI tool (optional)
uv pip install -e .

Usage

Basic Commands

# Using uv run
PYTHONPATH=src uv run python -m archive_cli.archive_cli --help

# If installed as CLI tool
archive-cli --help

Creating Archives

# Start the archive command
PYTHONPATH=src uv run python -m archive_cli.archive_cli archive

# Or if installed as CLI tool
archive-cli archive

The tool will prompt you to:

  1. Select a directory to archive (with tab completion)
  2. Choose archive format (tar or zip)
  3. Archives are created in current directory with format: {dirname}_{timestamp}.{ext}

Extracting Archives

# Start the unarchive command
PYTHONPATH=src uv run python -m archive_cli.archive_cli unarchive

# Or if installed as CLI tool
archive-cli unarchive

The tool will prompt you to:

  1. Select an archive file to extract (with tab completion)
  2. Archive format is auto-detected
  3. Contents are extracted to: {archive_name}_{timestamp}/

Supported Formats

Archive Creation

  • tar: Creates .tar.gz compressed archives
  • zip: Creates .zip compressed archives

Archive Extraction

  • tar: Supports .tar, .tar.gz, .tgz files
  • zip: Supports .zip files

Examples

# Example workflow
PYTHONPATH=src uv run python -m archive_cli.archive_cli archive
# Enter path: ./my_project
# Choose format: tar
# Creates: my_project_20240916_143052.tar.gz

PYTHONPATH=src uv run python -m archive_cli.archive_cli unarchive
# Enter path: ./my_project_20240916_143052.tar.gz
# Extracts to: my_project_20240916_143127/

Development

This project uses uv for dependency management and follows a modular structure:

src/archive_cli/
\x00\x00 __init__.py
\x00\x00 archive_cli.py          # Main CLI entry point
\x00\x00 cmd/                    # Command implementations
   \x00\x00 __init__.py
   \x00\x00 archive.py         # Archive creation logic
   \x00\x00 unarchive.py       # Archive extraction logic
\x00\x00 lib/                   # Shared utilities
    \x00\x00 __init__.py
    \x00\x00 prompt.py          # Interactive prompt functions

Metadata

Release files for archive-cli 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for archive-cli 1.0.0
File Size Uploaded
archive_cli-1.0.0.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for archive-cli 1.0.0
File Interpreter ABI Platform
archive_cli-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.6 kB

Release files / archive_cli-1.0.0.tar.gz

Download URL archive_cli-1.0.0.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
931c95f677b50c3558de8c4693af4007c389e8e7108da0a328db3591e6e27d6d
BLAKE2b-256 checksum
How to use checksums
fdbe906ef1b70e9a6d6d9d08cf6cd14901f0fe8cb0199e6dd4ad5dcf6663b13a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.15

Release files / archive_cli-1.0.0-py3-none-any.whl

Download URL archive_cli-1.0.0-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7722ac581634ec90f390cae7dbff11acb749681ee634d2aae0c925b21e94204a
BLAKE2b-256 checksum
How to use checksums
8c82c1a0d9bdbf9bfba38f0eb3770e7d6446d664dff3e2f93c826c394569e6a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.15

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page