https://github.com/deathbyknowledge/ystp
Quick n' easy file transfers with Cloudflare Workers.
https://github.com/deathbyknowledge/ystp
cloudflare cloudflare-workers durable-objects file-sharing
Last synced: 18 days ago
JSON representation
Quick n' easy file transfers with Cloudflare Workers.
- Host: GitHub
- URL: https://github.com/deathbyknowledge/ystp
- Owner: deathbyknowledge
- Created: 2025-01-19T21:56:35.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2026-01-28T15:04:35.000Z (24 days ago)
- Last Synced: 2026-01-29T06:42:21.058Z (24 days ago)
- Topics: cloudflare, cloudflare-workers, durable-objects, file-sharing
- Language: TypeScript
- Homepage: https://ystp.defo.works
- Size: 65.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# YSTP
YSTP (short for Your Super Transfer Program) is a file transfer tool that allows sending a file privately to a party directly without relying on port-forwarding to be set up.
It's quick and easy to use and it all lives on Cloudflare's edge, built with Workers and Durable Objects. No storage anywhere, just a transfer.
It's just an educational project, although it does work ofc! You can read the blog posts [here](https://deathbyknowledge.com/posts/ystp-pt1/).

## CLI Client
YSTP includes a command-line client for easy file transfers directly from your terminal.
### Installation
The CLI client is included in this repository. Make sure you have Node.js installed, then navigate to the project directory.
### Usage
#### Send a file
```bash
node cli/ystp.js send [--host hostname] [--port port]
```
#### Receive a file
```bash
node cli/ystp.js receive [--output filename] [--host hostname] [--port port]
```
### Examples
**Send a file:**
```bash
node cli/ystp.js send myfile.txt
# Output: Your shareable code: apple-banana-cherry-date-elderberry
```
**Send to a custom server:**
```bash
node cli/ystp.js send document.pdf --host example.com --port 3000
```
**Receive a file:**
```bash
node cli/ystp.js receive apple-banana-cherry-date-elderberry
```
**Receive with custom filename:**
```bash
node cli/ystp.js receive apple-banana-cherry-date-elderberry --output downloaded.txt
```
### Options
- `--host ` - Server hostname (default: localhost)
- `--port ` - Server port (default: 8787)
- `-o, --output ` - Output filename for receive (default: use sender's filename)
### Features
- **Real-time progress** - See transfer progress with file size and percentage
- **Chunked transfers** - Uses 64KB chunks for efficient memory usage
- **Error handling** - Proper connection and file error management
- **Shareable codes** - Easy-to-remember codes for file sharing
- **Cross-platform** - Works on Windows, macOS, and Linux