Metadata-Version: 2.4
Name: shrip
Version: 0.1.5
Summary: Zip and share files from the terminal — no browser needed.
License-Expression: MIT
Project-URL: Homepage, https://github.com/nbfrodri/shrip
Project-URL: Repository, https://github.com/nbfrodri/shrip
Project-URL: Issues, https://github.com/nbfrodri/shrip/issues
Keywords: share,zip,upload,cli,gofile
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer>=0.12.0
Requires-Dist: requests>=2.31.0
Requires-Dist: requests-toolbelt>=1.0.0
Requires-Dist: rich>=13.0.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-mock; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Dynamic: license-file

# shrip

**Zip and share files from the terminal — no browser needed.**

`shrip` bundles files and folders into a compressed archive and uploads it to [gofile.io](https://gofile.io), giving you a temporary public download link instantly. No accounts, no configuration, no context-switching.

## Installation

**Ubuntu / Debian:**

```bash
sudo apt install pipx
pipx ensurepath   # adds ~/.local/bin to PATH (one-time setup, restart terminal after)
pipx install shrip
```

**macOS:**

```bash
brew install pipx
pipx ensurepath
pipx install shrip
```

**Windows:**

```bash
pip install pipx
pipx ensurepath
pipx install shrip
```

**With pip (any OS):**

```bash
pip install shrip
```

> On Ubuntu 23.04+ and other modern distros, `pip install` is blocked by default to protect the system Python. Use `pipx` instead — it installs `shrip` in an isolated environment and adds it to your PATH automatically.

**From GitHub:**

```bash
pip install git+https://github.com/nbfrodri/shrip.git
```

> Requires Python 3.9 or higher. Works on Windows, macOS, and Linux.

## Updating

```bash
# If installed with pipx
pipx upgrade shrip

# If installed with pip
pip install --upgrade shrip
```

## Uninstalling

```bash
# If installed with pipx
pipx uninstall shrip

# If installed with pip
pip uninstall shrip
```

## Usage

```bash
# Share a single file
shrip report.pdf

# Share multiple files and folders
shrip ./src/ README.md logo.png --name project-handover

# Custom archive name
shrip ./build/ -n release-v2

# Copy the link to clipboard
shrip file.txt --copy

# Open in browser after upload
shrip file.txt --open

# Combine flags
shrip ./dist/ -n release -c -o
```

**Example output:**

```
Compressing 3 items (4.8 MB) into project-handover.zip...
⠋ Compressing ████████████████████████████████████ 3/3 files
Compressed to 1.2 MB (75% smaller). Uploading...
⠋ Uploading   ████████████████████████████████████ 1.2/1.2 MB  850.3 kB/s

╭──────────── Ready to share ────────────╮
│                                        │
│  https://gofile.io/d/AbCd123           │
│                                        │
╰──────── Link copied! ─────────────────╯

(Files are automatically deleted after a period of inactivity.)
```

## Options

| Flag | Short | Description | Default |
|------|-------|-------------|---------|
| `--name` | `-n` | Custom archive name (without `.zip`) | `shrip_archive` |
| `--copy` | `-c` | Copy the download link to clipboard | off |
| `--open` | `-o` | Open the download link in your browser | off |
| `--version` | `-v` | Show version and exit | |
| `--help` | | Show usage help | |

## How It Works

1. Validates that all provided paths exist.
2. Compresses everything into a temporary `.zip` archive — directories are walked recursively, preserving folder structure.
3. Uploads the archive to [gofile.io](https://gofile.io) (anonymous, no account needed, no file size limit).
4. Prints the download URL (and copies/opens it if requested).
5. Deletes the temporary zip file automatically — even if the upload fails or you hit Ctrl+C.

## License

MIT
