Skip to content

afterfiveguy/ut

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UploadThing CLI (ut)

Go Version License

A powerful command-line interface for UploadThing, enabling seamless file uploads and downloads directly from your terminal.

Features

  • Fast file uploads** to UploadThing with progress tracking
  • Download files** with custom paths and progress indication
  • Private file support with API key authentication
  • List uploaded files with detailed metadata
  • Easy configuration management
  • Progress tracking for large file operations
  • Flexible output options for downloads
  • Force overwrite capabilities

Installation

Prerequisites

  • Go 1.24 or higher
  • UploadThing account and API key

From Source

git clone https://github.com/username/ut.git
cd uploadthing-cli
go build -o ut .

Quick Start

1. Configure Your API Key

ut config

2. Upload Files

# Single file
ut push document.pdf

# Multiple files
ut push image1.png image2.png document.pdf

3. List Your Files

ut list

4. Download a File

ut fetch your-file-key.pdf

Usage

Configuration

Configure your UploadThing secret key:

# Set your secret key
ut config set-secret sk_your_secret_key_here

# View current configuration
ut config show

File Upload

Upload single or multiple files to UploadThing:

# Single file upload
ut push image.jpg

# Multiple file upload
ut push image1.png image2.png document.pdf

# Upload multiple files with wildcards
ut push *.jpg *.png

# Mixed file types
ut push photo.jpg data.csv report.pdf

Supported file types: Images (JPG, PNG, GIF), Documents (PDF, TXT, JSON, XML, CSV), and more.

File Download

Download files from UploadThing:

# Download to current directory
ut fetch abc123-example.jpg

# Download with custom filename
ut fetch abc123-example.jpg -o myfile.jpg

# Download to specific directory
ut fetch abc123-example.jpg -o ./downloads/

# Download with progress bar
ut fetch abc123-example.jpg --progress

# Download private file (requires API key)
ut fetch abc123-example.jpg --private

# Force overwrite existing files
ut fetch abc123-example.jpg --force

List Files

View your uploaded files:

# List all files
ut list

# List with file details
ut list --verbose

Configuration

The CLI stores configuration in ~/.ut-cli/config.yml by default. You can customize the location:

📋 Commands Reference

Command Description Example
ut config Set your UploadThing secret key ut config
ut push <file> [file2]... Upload one or more files to UploadThing ut push document.pdf image.png
ut fetch <filekey> Download a file by file key ut fetch abc123-file.jpg
ut list List all uploaded files ut list

Command Options

ut fetch options:

  • -o, --output: Custom output path or directory
  • -f, --force: Overwrite existing files without prompt
  • -p, --progress: Show download progress
  • --private: Download private file (requires API key)

ut list options:

  • -v, --verbose: Show detailed file information

Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Setup

  1. Fork the repository
  2. Clone your fork: git clone https://github.com/yourusername/ut.git
  3. Create a feature branch: git checkout -b feature/amazing-feature
  4. Make your changes
  5. Commit your changes: git commit -m 'Add amazing feature'
  6. Push to the branch: git push origin feature/amazing-feature
  7. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments - UploadThing for their excellent file upload service Cobra for the CLI framework

  • All contributors who help improve this tool

Support

Links


Made with ❤️ for the UploadThing community

About

Uploadthing CLI tool

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages