Back

A CLI tool to share files over your local network. No internet required - just connect to the same WiFi router!

Discord Support Server

Features

✨ Zero Configuration - Automatically discovers devices on your network
šŸ“ File & Folder Sharing - Send individual files or entire directories
🌐 Web UI - Access through any browser at http://IP:PORT/share
šŸ”’ Local Only - Files never leave your local network
šŸ“± Cross-Platform - Works on macOS, Linux, and Windows

Usage

npx nyashare

Or run locally after cloning snxhasish/nyashare:

npm install
npm run build
node dist/cli.js

Usage

Interactive Mode (Recommended)

Simply run:

npx nyashare

This starts the server and opens an interactive CLI where you can:

Send Files via CLI

# Send a file
npx nyashare send /path/to/file.pdf

# Send a folder
npx nyashare send /path/to/folder

Web Interface

Access the web UI from any device on your network:

http://<YOUR_IP>:3000/share

The CLI will display the exact URL when it starts.

How It Works

  1. Discovery: Uses UDP broadcast to find other devices running NyaShare on the same network
  2. Server: Each device runs an Express server to handle file uploads/downloads
  3. Transfer: Files are sent directly from device to device over HTTP
  4. Storage: Received files are saved to ~/Downloads/nyashare/uploads/

Commands

CommandDescription
nyashareStart interactive mode
nyashare startStart the server and CLI (same as above)
nyashare receiveReceive mode: start in receiver mode, accept or decline incoming req
nyashare --helpShow help information
nyashare --versionShow version number

Network Requirements

Project Structure

nyashare/
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ cli.ts          # CLI interface & commands
│   ā”œā”€ā”€ server.ts       # Express server & file handling
│   ā”œā”€ā”€ discovery.ts    # UDP device discovery
│   ā”œā”€ā”€ transfer.ts     # File transfer logic
│   └── types.ts        # TypeScript interfaces
ā”œā”€ā”€ public/
│   ā”œā”€ā”€ index.html      # Landing page
│   └── share.html      # File sharing web UI
ā”œā”€ā”€ dist/               # Compiled JavaScript
└── package.json

Development

# Run in development mode
npm run dev

# Build TypeScript
npm run build

# Run type checking
npm run typecheck

# Run linting
npm run lint

Troubleshooting

No devices found?

Can't access web UI?

File transfers failing?

License

MIT