Receiver CLI Reference
Receiver CLI Reference
cloud-share-receiver is the NuGet global tool that connects to a running sender via Dev Tunnel, displays the queue in a local web UI, and lets you download and verify items.
Synopsis
cloud-share-receiver [options]
Flags
| Flag | Short | Default | Description |
|---|---|---|---|
--port | -p | 5001 | The local port for the receiver’s web server |
--log | -l | warnings | Log level: verbose, warnings, or errors |
--url | -u | (prompted) | The full sender Dev Tunnel URL |
--code | -c | (prompted) | Tunnel shorthand: {id}.{region}:{port} (e.g. mtszwr0l.uks1:5000) |
--secret | -s | (prompted) | The session secret token from the sender |
--no-prompt | Skip the interactive prompt; requires --url (or --code) and --secret | ||
--no-auto-open | Do not open the web UI in the browser on startup | ||
--help | -h | Show help text | |
--version | Show the tool version |
Flag details
--port / -p
Sets the local TCP port for the receiver’s HTTP server.
# Use port 9001 instead of the default 5001
cloud-share-receiver --port 9001
cloud-share-receiver -p 9001
ℹ️ Info: If you are running both sender and receiver on the same machine (e.g. for testing), use different ports for each. The sender defaults to 5000, the receiver to 5001.
--log / -l
Controls console log verbosity.
| Level | What is shown |
|---|---|
verbose | All messages including request traces and event stream details |
warnings | Warning and error messages only (default) |
errors | Error messages only |
cloud-share-receiver --log verbose
cloud-share-receiver -l errors
--url / -u
Specifies the full sender Dev Tunnel URL directly, skipping the interactive prompts.
cloud-share-receiver --url https://mtszwr0l.uks1.devtunnels.ms:5000
cloud-share-receiver -u https://mtszwr0l.uks1.devtunnels.ms:5000
--code / -c
A shorthand alternative to --url. Accepts {tunnel-id}.{region}:{port} format — the same components you enter in the interactive structured prompt, concatenated.
# Equivalent to --url https://mtszwr0l.uks1.devtunnels.ms:5000
cloud-share-receiver --code mtszwr0l.uks1:5000
cloud-share-receiver -c mtszwr0l.uks1:5000
# Port is optional — defaults to 5000
cloud-share-receiver --code mtszwr0l.uks1
The tunnel ID and region come from what the sender displays:
Tunnel URL: https://mtszwr0l.uks1.devtunnels.ms:5000
^^^^^^^^ ^^^^ ^^^^
id region port
ℹ️ Info:
--codeand--urlare mutually exclusive. If both are provided,--urltakes precedence.
--secret / -s
Specifies the session secret directly, skipping the interactive prompt for that field.
cloud-share-receiver --secret aB3kP9mQ2rTs
cloud-share-receiver -s aB3kP9mQ2rTs
⚠️ Warning: Passing the secret as a command-line flag will expose it in your shell history and process list. In sensitive environments, prefer the interactive prompt or use a secure environment variable piped to
--secret.
--no-prompt
Skips the interactive startup prompt entirely. When this flag is set, --url (or --code) and --secret must both be provided (either as flags or from the saved session).
# Fully non-interactive start
cloud-share-receiver --no-prompt --url https://abc123.devtunnels.ms --secret aB3kP9mQ2rTs
This is useful for:
- Scripts and automation
- CI/CD pipelines
- Environments where interactive input is not possible
--no-auto-open
Suppresses automatic browser launch on startup.
cloud-share-receiver --no-auto-open
Environment variables
| Variable | Description |
|---|---|
CLOUDSHARE_SECRET | If set, the interactive startup prompt is skipped entirely. The receiver connects immediately using this value as the session secret. |
# Skip the prompt — receiver connects immediately
export CLOUDSHARE_SECRET="aB3kP9mQ2rTs"
cloud-share-receiver --url https://abc123.devtunnels.ms
When CLOUDSHARE_SECRET is set, the URL can still be provided via --url, from the saved session file, or from the prompt (the secret field is the only one that is skipped automatically).
⚠️ Warning: Run
unset CLOUDSHARE_SECRET(or close the terminal) after the session to prevent the value persisting in the environment. The value is not saved toreceiver-session.jsonwhen set via this variable.
Rate limiting
The receiver applies a fixed-window rate limiter of 30 requests per 10-second window to all proxied endpoints. If you are automating requests (e.g. in a script) and exceed this threshold, you will receive HTTP 429 Too Many Requests. In normal interactive use this limit is never reached.
Session memory
The receiver saves your last 5 tunnel connections to a session history file:
| Platform | Path |
|---|---|
| Windows | %APPDATA%\CloudShare\receiver-session.json |
| macOS / Linux | ~/.config/CloudShare/receiver-session.json |
Each entry stores the tunnel ID, region, port, secret, and timestamp. Entries older than 7 days are automatically pruned.
History SelectionPrompt
On the next run, the startup prompt shows a selectable list of recent connections:
Recent connections
Which tunnel would you like to connect to?
❯ mtszwr0l · uks1 · :5000 (today 14:01)
c84xl717 · usw2 · :5000 (yesterday 09:31)
✎ Connect to a new tunnel...
Use arrow keys to select a previous connection and press Enter. The saved secret is offered as a pre-filled default:
Use saved secret for mtszwr0l.uks1:5000 (****rTs)? [Y/n]:
Clearing the session history
To clear all saved sessions, delete the file:
# Windows
del "%APPDATA%\CloudShare\receiver-session.json"
# macOS / Linux
rm ~/.config/CloudShare/receiver-session.json
ℹ️ Info: Entries expire automatically after 7 days. You do not need to clear the file manually unless you want to remove sensitive URLs immediately.
Startup prompts
When you start the receiver without --no-prompt and no saved history exists, you will see the structured connection prompt:
Enter just the short tunnel ID (e.g. mtszwr0l) — or paste the full URL to skip
Tunnel ID: mtszwr0l
Select the DevTunnel region:
❯ uks1 UK South
usw2 West US 2
use1 East US
euw1 West Europe
eas1 East Asia
aue1 Australia East
brs1 Brazil South
can1 Canada Central
✎ Enter a custom region code...
Port (default: 5000): [Enter]
→ https://mtszwr0l.uks1.devtunnels.ms:5000
Enter the secret token: ************
Paste shortcut: If you paste a full URL (e.g. https://mtszwr0l.uks1.devtunnels.ms:5000) into the Tunnel ID field, the region and port sub-prompts are skipped automatically.
Enter the secret token provided by the sender.
After successful connection:
[12:35:10] Connected to sender.
[12:35:10] Subscribed to event stream.
[12:35:10] Opening browser...
[12:35:10] Listening on http://localhost:5001
Receiver proxy behavior
The receiver proxies all API requests through to the sender. This means:
- The receiver’s local server (
localhost:5001) forwards requests to the tunnel URL - There are no CORS issues because the receiver handles the cross-origin requests server-side
- The browser only ever talks to
localhost:5001— it never directly accesses the tunnel URL
Examples
Interactive start (default)
cloud-share-receiver
Provide URL and secret as flags (still shows prompt with pre-filled values)
cloud-share-receiver --url https://abc123.devtunnels.ms --secret aB3kP9mQ2rTs
Fully non-interactive (for scripts)
cloud-share-receiver \
--no-prompt \
--url https://abc123.devtunnels.ms \
--secret aB3kP9mQ2rTs \
--no-auto-open
Start on a custom port with verbose logging
cloud-share-receiver --port 9001 --log verbose
Start on a custom port without browser
cloud-share-receiver --port 9001 --no-auto-open