CLI Reference
The Handrive CLI (hand) provides complete command-line access to manage shares, files, contacts, and transfers.
Installation
The CLI is included with Handrive. After downloading, the hand command is available in your terminal.
Quick Start
# Start the server (required for CLI commands)
hand serve
# In another terminal, authenticate
hand auth login otp your@email.com
# Create a share
hand shares create "My Files" ~/Documents
# List your shares
hand shares listEnvironment Variables
| Variable | Description | Default |
|---|---|---|
HANDRIVE_API_URL | API base URL for CLI commands | http://127.0.0.1:4263 |
Commands
hand serveStart the HTTP server for headless operation
hand authAuthentication commands (status, login, logout)
hand sharesCreate and manage file shares
hand filesList, search, and manage files within shares
hand membersManage share access and member permissions
hand contactsManage your contact list
hand usersProfile management and user search
hand transfersP2P file transfers between devices
hand discoveryDiscover shares from other devices
hand mcpRun MCP server for AI assistant integration
hand serviceInstall and manage Handrive as a system daemon
Output Format
List commands display tabular output:
$ hand shares list
ID NAME PATH
--------------------------------------------------------------------------------
abc123-def456-789... My Documents /Users/me/Documents
xyz789-abc123-456... Project /Users/me/projectDetail commands display key-value pairs:
$ hand shares get abc123
ID: abc123-def456-789...
Name: My Documents
Local Path: /Users/me/Documents
Device ID: device-123...
Local: trueError Handling
Errors are printed to stderr with the HTTP status code:
$ hand shares get invalid-id
Error 404: {"error":"Share not found"}See Also
- Headless Mode Guide - Running Handrive as a daemon
- MCP Integration Guide - AI assistant integration