Command Reference¶
Complete reference for all Orb commands and options.
Global Flags¶
These flags are available for all commands:
--help,-h- Display help information--version- Display version information
orb share¶
Share a directory securely through the relay server.
Synopsis¶
Arguments¶
directory- Path to directory to share (default: current directory)
Flags¶
--relay string- Relay server WebSocket URL (default: "ws://localhost:8080")--session-server string- Session creation server URL (default: "http://localhost:8080")
Description¶
The share command creates a secure sharing session for a directory:
- Creates a session with unique ID and passcode
- Connects to the relay server
- Waits for incoming connections
- Serves files from the specified directory over an encrypted tunnel
Examples¶
Share current directory:
Share specific directory:
Use custom relay:
Output¶
Session ID: abc123def456
Passcode: secure-random-passcode
Relay: ws://localhost:8080
Share these credentials securely with the recipient.
Waiting for connection...
Security Notes¶
- Session credentials are printed to stdout
- Keep the terminal open while sharing
- Press
Ctrl+Cto stop sharing - Sessions expire after 24 hours
- Only files within the shared directory are accessible
orb connect¶
Connect to a shared directory and browse files.
Synopsis¶
Flags¶
--session string- Session ID (required)--passcode string- Session passcode (required)--relay string- Relay server WebSocket URL (default: "ws://localhost:8080")
Description¶
The connect command establishes a connection to a shared directory:
- Connects to the relay server
- Performs encrypted handshake with sharer
- Launches interactive TUI file browser
- Allows browsing and downloading files
Examples¶
Basic connection:
Custom relay:
TUI Controls¶
Once connected, use these keys in the file browser:
↑/k- Move cursor up↓/j- Move cursor downEnter- Enter directory or download fileBackspace- Go to parent directoryq/Ctrl+C- Quit browser
Output¶
Connecting to relay ws://localhost:8080...
Connected to relay
Starting handshake...
Handshake complete
Launching file browser...
[TUI Browser Interface]
Error Messages¶
Invalid session credentials- Wrong session ID or passcodeConnection refused- Relay server not reachableSession expired- Session older than 24 hoursHandshake failed- Encryption handshake failed
orb relay¶
Start a relay server to facilitate connections.
Synopsis¶
Flags¶
--host string- Host to bind to (default: "localhost")--port int- Port to listen on (default: 8080)
Description¶
The relay command starts a WebSocket server that acts as a blind intermediary:
- Accepts WebSocket connections from both sharers and connectors
- Pairs connections based on session ID
- Forwards encrypted messages between peers
- Cannot decrypt or inspect traffic
Examples¶
Start relay on default port:
Start on custom port:
Bind to all interfaces (for public relay):
Output¶
Starting Orb relay server...
Listening on localhost:8080
WebSocket endpoint: ws://localhost:8080/ws
[INFO] Accepting connections...
Session Management¶
The relay server provides HTTP endpoints:
POST /sessions- Create new session- Returns: Session ID and passcode
- Body: None required
GET /sessions/{id}- Verify session exists- Returns: Session status
- Requires: Session ID in URL
WebSocket Protocol¶
GET /ws?session={id}- Establish WebSocket connection- Requires: Session ID in query parameter
- Pairs connections with matching session ID
- Forwards all frames between paired connections
Deployment Notes¶
- Production relay should use TLS (
wss://) - Implement rate limiting for production use
- Monitor connection counts and bandwidth
- Set up logging for security audits
orb help¶
Display help information for any command.
Synopsis¶
Examples¶
General help:
Help for specific command:
orb version¶
Display version information.
Synopsis¶
Output¶
Environment Variables¶
Orb respects the following environment variables:
ORB_RELAY¶
Default relay server URL:
ORB_SESSION_SERVER¶
Default session server URL:
export ORB_SESSION_SERVER="http://relay.example.com:8080"
orb share ~/files # Uses ORB_SESSION_SERVER
ORB_DEBUG¶
Enable debug logging:
Exit Codes¶
Orb uses the following exit codes:
0- Success1- General error2- Connection error3- Authentication error4- File system error130- Interrupted by user (Ctrl+C)
Configuration Files¶
Orb currently does not use configuration files. All options must be specified via command-line flags or environment variables.
Future versions may support:
~/.config/orb/config.yaml- User configuration~/.orb/known_relays- List of trusted relays
Shell Completion¶
Generate shell completion scripts:
Bash¶
Zsh¶
Fish¶
PowerShell¶
Advanced Usage¶
Chaining Commands¶
# Share and log session info
orb share ~/files 2>&1 | tee session.log
# Connect with timeout
timeout 5m orb connect --session abc123 --passcode xyz789
Background Sharing¶
# Share in background (use with caution)
orb share ~/files > session.log 2>&1 &
# Check status
jobs
# Bring to foreground
fg
Multiple Sessions¶
# Share multiple directories simultaneously
orb share ~/docs --relay ws://localhost:8080 &
orb share ~/photos --relay ws://localhost:8080 &
# Each gets unique session ID
Next Steps¶
- Learn about Sharing in detail
- Explore TUI Browser features
- Check Troubleshooting guide