Skip to content

CLI Reference

Terminal window
npm install -g golemdrive-cli

Requires Node.js 18+. Config stored at ~/.golemdrive/config.json, auth at ~/.golemdrive/auth.json (0600 permissions).

Available on all commands:

FlagDescription
--jsonOutput as JSON
--tableOutput as table
--no-colorDisable colored output
-v, --verboseVerbose logging
-q, --quietSuppress non-essential output
--api-url <url>Override API base URL
-h, --helpShow help
-V, --versionShow version
Terminal window
golemdrive login

Opens browser for OIDC authentication. Config auto-discovered from API URL and cached 24 hours.

Terminal window
export GD_USERNAME="you@example.com"
export GD_PASSWORD="your-password"
golemdrive upload ./dist/
Terminal window
golemdrive login --token eyJhbGci...
Terminal window
golemdrive logout # Clear local tokens
golemdrive logout --revoke # Also revoke on server

List files in a folder.

golemdrive ls [folder-uuid]
OptionTypeDefaultDescription
--sort <field>stringnameSort field (name, size, created, modified)
--page <n>number1Page number
--per-page <n>number20Items per page
--type <filter>stringFilter by type: images, videos, audio, documents, compressed
--recentbooleanfalseShow recently modified files
--days <n>number7Number of days for --recent
Terminal window
golemdrive ls
golemdrive ls abc123-def456 --sort size --per-page 50
golemdrive ls --type images --recent --days 14

Upload a file or directory. Files are encrypted locally with AES-256-GCM before upload.

golemdrive upload <file>
OptionTypeDefaultDescription
--folder <uuid>stringrootTarget folder UUID
--favoritebooleanfalseMark as favorite after upload
--shareablebooleanfalseEnable sharing on the uploaded file
--publicbooleanfalseMake publicly accessible
--volume <name>stringTarget storage volume
--chunk-size <bytes>number5242880Chunk size in bytes (default 5 MB)
--concurrency <n>number4Number of parallel upload streams
--passphrase <phrase>stringEncryption passphrase (overrides keypair)
--keep-tempbooleanfalseKeep temporary encrypted chunks after upload

Environment variable: GD_PASSPHRASE — sets the encryption passphrase without exposing it in shell history.

Terminal window
golemdrive upload report.pdf
golemdrive upload ./photos/ --folder abc123 --concurrency 8
golemdrive upload sensitive.docx --passphrase "correct horse battery staple"
GD_PASSPHRASE="secret" golemdrive upload vault.tar.gz

Download and decrypt one or more files.

golemdrive download <file-uuid...>
OptionTypeDefaultDescription
-o, --output <path>stringOutput file path (single file only)
--output-dir <dir>string.Output directory for multiple files
--passphrase <phrase>stringDecryption passphrase
--skip-verifybooleanfalseSkip integrity verification after download
--strictbooleanfalseFail on any integrity mismatch
--keep-tempbooleanfalseKeep encrypted temp files
--concurrency <n>number4Parallel download streams
--bulkbooleanfalseBulk mode, accept UUIDs from stdin
Terminal window
golemdrive download abc123
golemdrive download abc123 def456 --output-dir ./downloads/
golemdrive download abc123 -o report.pdf --strict
echo -e "uuid1\nuuid2" | golemdrive download --bulk --output-dir ./batch/

Move files or folders to a target folder. The last argument is the destination folder UUID.

golemdrive mv <uuids...>
OptionTypeDefaultDescription
--folderbooleanfalseTreat UUIDs as folder UUIDs
--bulkbooleanfalseAccept UUIDs from stdin
Terminal window
golemdrive mv abc123 def456 target-folder-uuid
golemdrive mv folder-uuid target-uuid --folder

Copy a file to a target folder.

golemdrive cp <file-uuid> <target-folder-uuid>
Terminal window
golemdrive cp abc123 folder-uuid

Rename a file or folder.

golemdrive rename <uuid> <new-name>
OptionTypeDefaultDescription
--folderbooleanfalseTreat UUID as a folder UUID
Terminal window
golemdrive rename abc123 "Q4 Report.pdf"
golemdrive rename folder-uuid "Archives" --folder

Delete files or folders (moves to trash by default).

golemdrive rm <uuid...>
OptionTypeDefaultDescription
--permanentbooleanfalsePermanently delete, bypassing trash
--forcebooleanfalseSkip confirmation prompt
--folderbooleanfalseTreat UUIDs as folder UUIDs
--bulkbooleanfalseAccept UUIDs from stdin
Terminal window
golemdrive rm abc123
golemdrive rm abc123 def456 --permanent --force
golemdrive rm folder-uuid --folder

Restore files or folders from trash.

golemdrive restore <uuid...>
OptionTypeDefaultDescription
--folderbooleanfalseTreat UUIDs as folder UUIDs
--bulkbooleanfalseAccept UUIDs from stdin
Terminal window
golemdrive restore abc123
golemdrive restore abc123 def456 --folder

Display detailed metadata for a file or folder.

golemdrive info <uuid>
Terminal window
golemdrive info abc123
golemdrive info abc123 --json

Toggle favorite status on a file.

golemdrive favorite <uuid>
Terminal window
golemdrive favorite abc123

List or manage trash contents.

golemdrive trash
OptionTypeDefaultDescription
--emptybooleanfalsePermanently empty all trash
--forcebooleanfalseSkip confirmation when emptying
--show-locationbooleanfalseShow original folder location
Terminal window
golemdrive trash
golemdrive trash --show-location
golemdrive trash --empty --force

List all favorited files.

golemdrive favorites
OptionTypeDefaultDescription
--page <n>number1Page number
--page-size <n>number20Items per page
Terminal window
golemdrive favorites --page 2 --page-size 50

List recently modified files.

golemdrive recent
OptionTypeDefaultDescription
--days <n>number7Lookback period in days
--page <n>number1Page number
--page-size <n>number20Items per page
Terminal window
golemdrive recent --days 30

Update file or folder metadata.

golemdrive update <uuid>
OptionTypeDefaultDescription
--name <name>stringNew name
--description <text>stringNew description
--public <value>stringVisibility: yes, no, or inherit
--shareablebooleanEnable sharing
--no-shareablebooleanDisable sharing
--folderbooleanfalseTreat UUID as a folder UUID
Terminal window
golemdrive update abc123 --name "Final Report.pdf" --description "Q4 financials"
golemdrive update abc123 --public no --no-shareable

Shortcut commands that filter by file type. All accept the same options.

golemdrive images
golemdrive videos
golemdrive audio
golemdrive documents
golemdrive compressed
OptionTypeDefaultDescription
--page <n>number1Page number
--page-size <n>number20Items per page
Terminal window
golemdrive images --page-size 100
golemdrive documents --page 3

Create a new folder.

golemdrive mkdir <name>
OptionTypeDefaultDescription
--parent <uuid>stringrootParent folder UUID
-p, --nestedbooleanfalseCreate nested path (e.g., a/b/c)
Terminal window
golemdrive mkdir "Project Alpha"
golemdrive mkdir "2024/Q4/Reports" -p --parent abc123

Display folder hierarchy as a tree.

golemdrive tree [folder-uuid]
OptionTypeDefaultDescription
--depth <n>numberunlimitedMaximum depth to display
--jsonbooleanfalseOutput as JSON
Terminal window
golemdrive tree
golemdrive tree abc123 --depth 3
golemdrive tree --json

Create a share link for a file.

golemdrive share create <file-uuid>
OptionTypeDefaultDescription
--passwordbooleanfalsePrompt for password interactively
--password-text <text>stringSet password directly (use GD_SHARE_PASSWORD env var instead for security)
--expiry <value>stringnoneExpiry as ISO date (2024-12-31) or relative duration (7d, 24h, 30m)
--shortbooleanfalseGenerate a short URL
--download-limit <n>numberunlimitedMaximum number of downloads
--notes <text>stringInternal notes for the share

Environment variable: GD_SHARE_PASSWORD — sets the share password without shell history exposure.

Terminal window
golemdrive share create abc123
golemdrive share create abc123 --expiry 7d --download-limit 10
golemdrive share create abc123 --password --short
GD_SHARE_PASSWORD="secret" golemdrive share create abc123 --password-text "$GD_SHARE_PASSWORD"

List all share links.

golemdrive share list
OptionTypeDefaultDescription
--filter-activebooleanfalseShow only active shares
--filter-expiredbooleanfalseShow only expired shares
--page <n>number1Page number
--per-page <n>number20Items per page
Terminal window
golemdrive share list --filter-active
golemdrive share list --filter-expired --json

Delete a share link.

golemdrive share delete <id>
Terminal window
golemdrive share delete share-uuid

Display details of a share link.

golemdrive share info <id>
Terminal window
golemdrive share info share-uuid
golemdrive share info share-uuid --json

Display the file metadata associated with a share link.

golemdrive share file-info <id>
Terminal window
golemdrive share file-info share-uuid

Create share links for multiple files or folders at once.

golemdrive share bulk <uuids...>
OptionTypeDefaultDescription
--type <value>stringVR_FILEResource type: VR_FILE or VR_FOLDER
--view-onlybooleanfalseRestrict to view-only access
--expires-in-days <n>numberExpiry in days from now
--max-downloads <n>numberunlimitedMaximum downloads per link
Terminal window
golemdrive share bulk abc123 def456 ghi789 --expires-in-days 30
golemdrive share bulk folder1 folder2 --type VR_FOLDER --view-only

Update an existing share link.

golemdrive share update <uuid>
OptionTypeDefaultDescription
--name <name>stringDisplay name
--download-limit <n>numberUpdate download limit
--expiry <value>stringNew expiry (ISO date or relative)
--active <bool>stringEnable or disable: true or false
--passwordbooleanfalsePrompt for new password
--password-text <text>stringSet password directly
Terminal window
golemdrive share update share-uuid --download-limit 50 --expiry 14d
golemdrive share update share-uuid --active false

Generate a formatted share link for a file.

golemdrive link <file-uuid>
OptionTypeDefaultDescription
--format <type>stringshortOutput format: short, long, markdown, html
Terminal window
golemdrive link abc123
golemdrive link abc123 --format markdown

Display account details including UUID, type, level, keypair fingerprint, and quotas.

golemdrive account
Terminal window
golemdrive account
golemdrive account --json

Display storage and bandwidth usage.

golemdrive usage
OptionTypeDefaultDescription
--breakdownbooleanfalseShow usage breakdown by file type
Terminal window
golemdrive usage
golemdrive usage --breakdown --json

Change account password.

golemdrive password
OptionTypeDefaultDescription
--current <password>stringCurrent password (prompts if omitted)
--new <password>stringNew password (prompts if omitted)
--confirm <password>stringConfirm new password (prompts if omitted)
Terminal window
golemdrive password
golemdrive password --current "old" --new "new" --confirm "new"

Schedule account deletion. There is a 60-day restore window before permanent deletion.

golemdrive delete
OptionTypeDefaultDescription
--confirmbooleanfalseSkip confirmation prompt
Terminal window
golemdrive delete
golemdrive delete --confirm

Cancel a scheduled account deletion.

golemdrive restore
Terminal window
golemdrive restore

Display account and local statistics.

golemdrive stats
OptionTypeDefaultDescription
--accountbooleanfalseShow account-level stats
--localbooleanfalseShow local CLI stats (cache size, temp files)
Terminal window
golemdrive stats --account --json
golemdrive stats --local

Search files by name and metadata.

golemdrive search <query>
OptionTypeDefaultDescription
--page <n>number1Page number
--page-size <n>number20Results per page
--type <filter>stringFilter by type: images, videos, audio, documents, compressed
Terminal window
golemdrive search "tax documents"
golemdrive search "*.pdf" --type documents --page-size 50

List available encryption keypairs.

golemdrive keypair list
OptionTypeDefaultDescription
--userbooleanfalseShow user keypairs only
Terminal window
golemdrive keypair list
golemdrive keypair list --user --json

Show details of the active keypair.

golemdrive keypair show
OptionTypeDefaultDescription
--fingerprintbooleanfalseShow fingerprint only
Terminal window
golemdrive keypair show
golemdrive keypair show --fingerprint

Export the current keypair.

golemdrive keypair export
OptionTypeDefaultDescription
-o, --output <path>stringstdoutOutput file path
--format <type>stringpemExport format: pem, json, golemdrive
Terminal window
golemdrive keypair export -o backup.pem
golemdrive keypair export --format json -o keypair.json
golemdrive keypair export --format golemdrive -o keypair.gd

Import a keypair from file.

golemdrive keypair import <file>
OptionTypeDefaultDescription
--forcebooleanfalseOverwrite existing keypair without confirmation
Terminal window
golemdrive keypair import backup.pem
golemdrive keypair import keypair.json --force

Set up a passphrase for keypair encryption.

golemdrive passphrase setup
OptionTypeDefaultDescription
--strength <level>stringhighPassphrase strength: standard, high, maximum
Terminal window
golemdrive passphrase setup
golemdrive passphrase setup --strength maximum

Recover access using a recovery phrase.

golemdrive passphrase recover
OptionTypeDefaultDescription
--resetbooleanfalseReset passphrase after recovery
Terminal window
golemdrive passphrase recover
golemdrive passphrase recover --reset

Generate and display a recovery phrase backup.

golemdrive passphrase backup
OptionTypeDefaultDescription
--output <path>stringstdoutWrite recovery phrase to file
Terminal window
golemdrive passphrase backup
golemdrive passphrase backup --output recovery.txt

View or update your public profile.

golemdrive profile
OptionTypeDefaultDescription
--display-name <name>stringSet display name
--bio <text>stringSet bio
--avatar-url <url>stringSet avatar URL
Terminal window
golemdrive profile
golemdrive profile --display-name "Jane Doe" --bio "Security researcher"

Set your public username.

golemdrive profile username <name>
Terminal window
golemdrive profile username janedoe

Block a user.

golemdrive block <user-id>
Terminal window
golemdrive block user-uuid

Unblock a user.

golemdrive unblock <user-id>
Terminal window
golemdrive unblock user-uuid

Mute a user.

golemdrive mute <user-id>
Terminal window
golemdrive mute user-uuid

View your activity feed.

golemdrive feed
OptionTypeDefaultDescription
--page <n>number1Page number
Terminal window
golemdrive feed --page 2

Start an interactive AI chat session or resume an existing one.

golemdrive chat [session-id]
OptionTypeDefaultDescription
--model <name>stringdefaultAI model to use
--no-streambooleanfalseDisable streaming (wait for complete response)

Opens an interactive REPL. Type exit or press Ctrl+D to quit.

Terminal window
golemdrive chat
golemdrive chat --model glm-5
golemdrive chat session-uuid

List available AI models.

golemdrive chat models
Terminal window
golemdrive chat models --json

List past chat sessions.

golemdrive chat sessions
Terminal window
golemdrive chat sessions --json

List comments on a file.

golemdrive comments list <file-uuid>
OptionTypeDefaultDescription
--limit <n>number20Maximum comments to return
--cursor <token>stringPagination cursor from previous response
Terminal window
golemdrive comments list abc123
golemdrive comments list abc123 --limit 50 --json

Add a comment to a file.

golemdrive comments add <file-uuid> <body>
OptionTypeDefaultDescription
--reply-to <comment-id>stringReply to an existing comment
Terminal window
golemdrive comments add abc123 "Looks good, approved."
golemdrive comments add abc123 "Thanks!" --reply-to comment-uuid

Delete a comment.

golemdrive comments delete <comment-id>
OptionTypeDefaultDescription
--yesbooleanfalseSkip confirmation prompt
Terminal window
golemdrive comments delete comment-uuid
golemdrive comments delete comment-uuid --yes

List notifications.

golemdrive notifications list
OptionTypeDefaultDescription
--limit <n>number20Maximum notifications to return
--unreadbooleanfalseShow unread only
Terminal window
golemdrive notifications list --unread
golemdrive notifications list --limit 50 --json

Mark notifications as read. Marks all if no ID is specified.

golemdrive notifications mark-read [id]
Terminal window
golemdrive notifications mark-read
golemdrive notifications mark-read notification-uuid

Delete a notification.

golemdrive notifications delete <id>
OptionTypeDefaultDescription
--yesbooleanfalseSkip confirmation prompt
Terminal window
golemdrive notifications delete notification-uuid --yes

Donate tokens to a creator. Minimum $0.10.

golemdrive donate tokens <amount>
OptionTypeDefaultDescription
--message <text>stringAttach a message to the donation
Terminal window
golemdrive donate tokens 5.00 --message "Great content!"

Donate money to a creator via Stripe. Minimum $5.00. Returns a Stripe checkout URL.

golemdrive donate money <amount>
Terminal window
golemdrive donate money 10.00

View your donation history.

golemdrive donate history
Terminal window
golemdrive donate history --json

Set a configuration value.

golemdrive config set <key> <value>

Available keys: api_url, output_format, verbose, color, encrypt_chunk_size, default_concurrency, default_page_size.

Terminal window
golemdrive config set api_url https://api.golemdrive.com
golemdrive config set output_format json
golemdrive config set encrypt_chunk_size 10485760

Get a configuration value.

golemdrive config get <key>
Terminal window
golemdrive config get api_url

List all configuration values.

golemdrive config list
OptionTypeDefaultDescription
--sourcesbooleanfalseShow where each value originates (file, env, default)
Terminal window
golemdrive config list --sources

Reset configuration to defaults.

golemdrive config reset
OptionTypeDefaultDescription
--forcebooleanfalseSkip confirmation prompt
Terminal window
golemdrive config reset --force

Interactive configuration setup wizard.

golemdrive config init
Terminal window
golemdrive config init

Clean up temporary and cached files.

golemdrive cleanup
OptionTypeDefaultDescription
--tempbooleanfalseRemove temporary upload/download files
--cachebooleanfalseClear cached metadata
--stalebooleanfalseRemove stale lock files
--oldbooleanfalseRemove files older than 30 days
--forcebooleanfalseSkip confirmation prompt
--dry-runbooleanfalseShow what would be removed without deleting
Terminal window
golemdrive cleanup --temp --cache --dry-run
golemdrive cleanup --stale --old --force

Display the MD5 signature of a file for integrity verification.

golemdrive signature <file-uuid>
OptionTypeDefaultDescription
--copybooleanfalseCopy signature to clipboard
Terminal window
golemdrive signature abc123
golemdrive signature abc123 --copy

Display CLI version.

golemdrive version

Show usage examples for common workflows.

golemdrive examples

Show help for a specific topic or command.

golemdrive help [topic]
Terminal window
golemdrive help
golemdrive help upload
golemdrive help share

All environment variables are optional and override their corresponding config file values and flags.

VariableDescription
GD_API_URLAPI base URL (e.g., https://api.golemdrive.com)
GD_USERNAMEUsername for non-interactive authentication
GD_PASSWORDPassword for non-interactive authentication
GD_TOKENPre-authenticated JWT token
GD_PASSPHRASEDefault encryption passphrase
GD_SHARE_PASSWORDDefault share link password
GD_VERBOSEEnable verbose output (true or 1)
GD_OUTPUT_FORMATDefault output format (json or table)
OIDC_PROVIDER_URLOIDC provider base URL
OIDC_REALMOIDC realm name
OIDC_CLIENT_IDOIDC client ID for authentication

Configuration values are resolved in this order (highest to lowest priority):

  1. Command-line flags (--api-url, --json, etc.)
  2. Environment variables (GD_API_URL, etc.)
  3. Config file (~/.golemdrive/config.json)
  4. Built-in defaults