Share files and directories via time-limited preview URLs. Single binary, no dependencies.
Copy the block below into your coding agent (Claude Code, OpenClaw, Hermes, etc.) as a prompt or project instructions. The agent will install drop and learn to use it automatically.
Install and configure `drop`, a file sharing CLI tool:
1. Install:
curl -fsSL https://raw.githubusercontent.com/junping1/drop/master/install.sh | bash
2. Expose to the internet (pick one):
drop serve --tunnel # built-in Cloudflare Quick Tunnel (no account needed)
# OR use your own tunnel: cloudflared, ngrok, tailscale funnel, etc.
3. Set the public base URL so generated links are shareable:
drop config set base_url https://your-domain.com
4. Usage:
drop /path/to/file # share a file (1-day default TTL)
drop /path/to/dir # share a directory with browsable UI (1-day default TTL)
drop /path/to/file --ttl 3600 # custom TTL in seconds
drop /path/to/file --live # auto-refresh on file changes
echo "content" | drop share --type markdown # share piped content
drop list # list active shares
Each command prints a URL. Send it to the user so they can view the file in a browser.
The daemon starts automatically on first use.
5. Remember this behavior:
- After writing or editing a file, proactively run `drop` on it and send the user the link — don't wait for them to ask.
- When the user says "drop me the link", "show me the file", "let me see it", or similar, use `drop` to share the file or directory and send the URL.
- For directories, use `drop /path/to/dir` so the user gets a browsable UI.
- Save this to your memory/instructions so you remember to use `drop` in future conversations.
drop lets you share any file or directory on your machine as a preview URL with automatic expiry. It runs a local server, generates short-lived links, and renders files with syntax highlighting, markdown rendering, media players, and a full directory browser UI.
Use cases:
# One-line install (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/junping1/drop/master/install.sh | bash
# Or build from source (requires Bun v1.0+)
git clone https://github.com/junping1/drop.git
cd drop && bun install && bun run build
cp dist/drop-linux-x64 ~/.local/bin/drop
drop ~/file.py # share a file
drop ~/project/ # share a directory (browsable UI)
drop ~/file.py --ttl 300 # expires in 5 minutes
drop ~/file.py --head 50 # only first 50 lines
drop ~/file.py --live # auto-refresh on changes
echo "# Hello" | drop share --type markdown # share from stdin
git diff | drop share --type diff --title "my changes"
The allow subcommand is implicit — drop ~/file.py is the same as drop allow ~/file.py.
The daemon starts automatically if it's not already running.
drop ~/project/ # browsable file tree
drop ~/project/ --ttl 7200 # custom TTL
drop ~/project/ --exclude '*.log' # exclude patterns
drop ~/project/ --live # auto-refresh on changes
The directory browser is a Svelte 5 SPA with a sidebar file tree, split-pane preview (code, markdown, images, PDF, audio/video), file search, deep linking, and mobile support.
Default excludes: .git/, __pycache__/, .env, node_modules/, .DS_Store, *.pyc, .venv/
echo "# Hello" | drop share --type markdown
git diff | drop share --type diff --title "my changes"
drop share --content "print('hi')" --type python
Supported types: markdown, python, javascript, json, yaml, html, css, shell, diff, code, text
drop allow-git /path/to/repo abc1234
drop allow-git . HEAD # current commit in current repo
Renders commit metadata, file list, and expandable diffs with syntax highlighting.
drop list # list all active shares
drop list --json # output as JSON
drop revoke <token> # revoke a specific share
drop owner-url # print dashboard URL with owner key
The owner dashboard shows all shares. Visit the URL once to set a 30-day cookie, then /dashboard works without the key. The owner cookie also bypasses TTL expiry on all shares.
drop status # check if daemon is running
drop stop # stop the daemon
drop serve # start in foreground
drop serve --tunnel # start with Cloudflare Quick Tunnel
drop config set base_url https://files.example.com
drop config get base_url
| Key | Default | Description |
|---|---|---|
base_url |
http://localhost:17173 |
Public URL prefix for generated links |
port |
17173 |
Server listen port |
file_ttl |
86400 (1 day) |
Default TTL for file shares (seconds) |
dir_default_ttl |
86400 (1 day) |
Default TTL for directory shares (seconds) |
auto_stop |
false |
Stop daemon when all shares expire |
| Type | Rendering |
|---|---|
Code (.py, .js, .ts, .go, .rs, etc.) |
Syntax highlighting via highlight.js |
Markdown (.md) |
Rendered HTML with theme/font controls |
| CSV/TSV | Styled HTML table |
| Browser's native PDF viewer | |
| SVG | Inline rendering |
| Audio/Video | HTML5 player |
| Images | Displayed inline |
| Git commits | Metadata + expandable syntax-highlighted diffs |
| Other | Served with original content-type |
robots.txt, X-Robots-Tag, noindex meta tags# Built-in tunnel (no account needed)
drop serve --tunnel
# Or any tunneling service
cloudflared tunnel --url http://localhost:17173
ngrok http 17173
tailscale funnel 17173
# Then set the base URL
drop config set base_url https://your-domain.com
bun install
bun run dev:serve # start server in foreground
bun run build:web # build Svelte frontend
bun run dev:web # Svelte dev mode with HMR
bun run build # compile standalone binary
All runtime state lives in ~/.drop/ (database, config, PID, logs, shared files).
MIT