A powerful command-line file uploader for bunkr.cr written in Go.
- Parallel Uploads — Upload multiple files simultaneously with configurable workers
- Chunked Uploads — Automatic file chunking for large files
- Album Support — Create new albums or upload to existing ones
- Interactive Mode — User-friendly interactive prompts for album selection
- Progress Bar — Real-time upload progress with speed and ETA
- Auto-Retry — Automatic retry with node switching on failure
- Token Management — Save and reuse your API token securely
- Go 1.24+ installed
# Clone the repository
git clone https://github.com/makt00/bunkrr-cli.git
cd bunkrr-cli
# Build the binary
go build -o bunkrr-cli.exe .
# Or for Linux/macOS
go build -o bunkrr-cli .# Upload a single file
./bunkrr-cli path/to/file.zip
# Upload a directory
./bunkrr-cli path/to/folder/| Flag | Type | Default | Description |
|---|---|---|---|
-token |
string | "" |
Your Bunkr API token |
-node |
string | "" |
Manually specify upload node URL |
-workers |
int | 2 |
Number of parallel uploads |
-album |
int | 0 |
Album ID to upload to (0 = no album) |
# Upload with API token
./bunkrr-cli -token YOUR_TOKEN file.zip
# Upload with 4 parallel workers
./bunkrr-cli -workers 4 path/to/folder/
# Upload to a specific album
./bunkrr-cli -album 12345 file.zip
# Specify a custom upload node
./bunkrr-cli -node https://n1.bunkr.cr/ file.zip
# Combine multiple options
./bunkrr-cli -token YOUR_TOKEN -workers 4 -album 12345 path/to/folder/The CLI supports multiple ways to provide your API token:
- Command Line — Use the
-tokenflag - Interactive Prompt — Enter when prompted and optionally save
- Stored Token — Automatically loads from
~/.bunkr-token
When you enter a token interactively, you'll be asked if you want to save it for future use. The token is stored securely in your home directory.
When authenticated with a token, you can:
If no -album flag is provided, you'll see an interactive menu:
? Album Selection
▸ No Album
Select Existing Album
Create New Album
- Browse your existing albums with search functionality
- Use arrow keys to navigate, type to filter
You'll be prompted for:
- Album Name — Required
- Description — Optional
- Enable Download — Allow others to download files
- Public Link — Make the album publicly accessible
During upload, you'll see real-time progress:
[W1] [1/5] ▶ video.mp4 (1.2 GB, 12 chunk(s))
[W1] [████████████░░░░░░░░░░░░░░░░░░] 40.5% | 8.2 MB/s | ETA: 2m35s | Chunk 5/12
[W1] [1/5] ✓ Done: https://bunkr.cr/v/abc123
Progress includes:
- Worker ID —
[W1],[W2], etc. - File Counter —
[1/5]current/total files - Visual Progress Bar — Percentage complete
- Upload Speed — Current transfer speed
- ETA — Estimated time remaining
- Chunk Progress — Current chunk / total chunks
The CLI automatically handles upload failures:
- Retry on Same Node — Up to 3 attempts per node
- Switch Nodes — Tries up to 5 different nodes
- Total Attempts — Maximum 15 attempts per file
Failed uploads are reported in the final summary:
══════════════════════════════════════════
✓ Successful: 4 ✗ Failed: 1
══════════════════════════════════════════
bunkrr-cli/
├── main.go # CLI entry point and upload orchestration
├── go.mod # Go module definition
├── go.sum # Dependency checksums
└── bunkr/
├── client.go # HTTP client and API methods
└── types.go # API request/response types
| Endpoint | Method | Description |
|---|---|---|
/api/check |
GET | Check API status and configuration |
/api/node |
GET | Get an available upload node |
/api/albums |
GET | List user's albums |
/api/albums |
POST | Create a new album |
{node}/ |
POST | Upload file chunks |
{node}/finishchunks |
POST | Finalize multi-chunk uploads |