CLI

dosya.dev from your terminal.

Upload, download, share, and manage files without leaving the command line. Perfect for scripts, CI/CD pipelines, and power users.

1

Install

curl dosya.dev/api/cli/install | sh
2

Authenticate

dosya auth login
3

Upload

dosya upload ./file.mp4
Install

One command to install

Single native binary with zero dependencies. Available for macOS (Apple Silicon & Intel), Linux x64, and Windows x64.

# Install (auto-detects macOS or Linux)
$ curl -fsSL https://dosya.dev/api/cli/install | sh
Downloading dosya CLI (mac-arm64)...
dosya CLI installed successfully!

# Verify
$ dosya --version
dosya 0.1.0
Authentication

Login once, use everywhere

Your API key is stored securely in ~/.dosya/config.json with 0600 permissions. For CI/CD, use the DOSYA_API_KEY environment variable instead.

Authenticate
# Authenticate with your API key
$ dosya auth login
Enter API key: ••••••••••••••••
Authenticated as john@dosya.dev

# Or pass the key directly (useful for CI/CD)
$ dosya auth login --key dos_abc123

# Or use an environment variable
$ export DOSYA_API_KEY=dos_abc123
Commands

Everything you need

Every command supports --json for machine-readable output and --help for detailed usage.

dosya upload
# Upload a file to a workspace
$ dosya upload ./render-final.mp4 -w ws_abc123
render-final.mp4 [████████████████████████████████] 100% | 12.4 GB/12.4 GB | 245.0 MB/s
Uploaded: fil_8xk2m9p4

# Upload an entire folder recursively
$ dosya upload ./project-assets/ -w ws_abc123 --recursive --parallel 5
Uploading 147 files...
Done. 147 uploaded, 0 failed.
dosya download
# Download a file (8 parallel connections by default)
$ dosya download fil_8xk2m9p4 -o ./downloads/
File: render-final.mp4 (12.4 GB)
render-final.mp4 [████████████████████████████████] 100% | 12.4 GB/12.4 GB | 389.0 MB/s | 32s
Saved to ./downloads/render-final.mp4
Done. 12.4 GB written (8 connections).

# Use 16 connections for maximum speed
$ dosya download fil_8xk2m9p4 -c 16

# Resume an interrupted download automatically
$ dosya download fil_8xk2m9p4
Resuming download: 4.2 GB/12.4 GB already downloaded
dosya share
# Generate a share link
$ dosya share fil_8xk2m9p4 --password "secret" --expires 7d
https://dosya.dev/s/xK9m2pQ4
Expires: 4/24/2026

# Get JSON output for scripting
$ dosya share fil_8xk2m9p4 --json
{
  "ok": true,
  "link": { "url": "https://dosya.dev/s/rT5n8wL2", ... }
}
dosya workspace / ls
# List workspaces
$ dosya workspace list
ID              NAME                    STORAGE
ws_abc123       Brand Campaign 2026     234.0 GB
ws_def456       Client Deliverables     12.0 GB
ws_ghi789       Research Data           1.20 TB

# List files in a workspace
$ dosya ls ws_abc123
NAME                    SIZE        MODIFIED    ID
render-final.mp4        12.4 GB     2h ago      fil_8xk2m9p4
brand-guide.pdf         45.0 MB     1d ago      fil_3mn7k2q9
assets/                 -           3d ago      fld_9xp4r2w1
dosya mv / rm / member
# Create a new workspace
$ dosya workspace create --name "Q3 Campaign"
Created workspace: Q3 Campaign (ws_new789)

# Invite a team member
$ dosya member invite --email alice@company.com --role Admin -w ws_abc123
Invited alice@company.com as Admin

# Move and rename files
$ dosya mv fil_8xk2m9p4 fld_9xp4r2w1
Moved fil_8xk2m9p4 to fld_9xp4r2w1

# Delete a file
$ dosya rm fil_old123
Deleted fil_old123 (recoverable)
CI/CD

Automate with pipelines

Use the DOSYA_API_KEY env var for non-interactive auth. Combine --json and --quiet for clean scripting.

GitHub Actions
# .github/workflows/deploy.yml
- name: Upload build artifacts
  env:
    DOSYA_API_KEY: ${{ secrets.DOSYA_API_KEY }}
  run: |
    dosya upload ./dist/ -w ${{ vars.WORKSPACE_ID }} \
      --recursive --parallel 5 --json --quiet
Shell Completion

Tab completion for every shell

Complete commands, subcommands, flags, and file paths with the Tab key.

Shell completion
# Bash
$ dosya completion bash >> ~/.bashrc

# Zsh
$ dosya completion zsh >> ~/.zshrc

# Fish
$ dosya completion fish > ~/.config/fish/completions/dosya.fish
Reference

Full reference

All commands
dosya auth login Authenticate with API key
dosya auth logout Clear stored credentials
dosya upload <file> Upload a file or folder
dosya download <id> Download a file (parallel, resumable)
dosya share <id> Generate a share link
dosya ls [workspace] List files in workspace
dosya rm <id> Delete a file
dosya mv <id> <target> Move or rename a file
dosya workspace list List all workspaces
dosya workspace create Create a new workspace
dosya workspace delete <id> Delete a workspace
dosya member list List workspace members
dosya member invite Invite a member
dosya whoami Show current user info
dosya config get [key] Show config value
dosya config set <key> <value> Set a config value
dosya config path Show config file location
dosya completion <shell> Generate shell completion script
dosya upgrade Upgrade CLI to latest version
dosya uninstall Remove CLI binary and config
dosya --version Show CLI version
Global flags
--json -j Machine-readable JSON output
--quiet -q Suppress non-essential output
--key <key> -k API key (overrides stored key and env var)
--workspace <id> -w Workspace ID
--debug Verbose diagnostic output and stack traces
--no-color Disable colors and unicode characters
--connections <num> -c Parallel download connections (default: 8)
--timeout <sec> Request timeout in seconds
--version -v Show CLI version
--help -h Show help (works per command too)
Environment variables
DOSYA_API_KEY API key for authentication (same as --key flag)
XDG_CONFIG_HOME Override config directory (default: ~/.dosya/)
Exit codes
0 Success
1 General error (server error, operation failed)
2 Invalid usage (missing arguments, unknown flags)
3 Authentication error (invalid or expired API key)
4 Network error (timeout, no connection)
130 Interrupted (Ctrl+C)

Install and start uploading

One command to install, one command to authenticate, one command to upload. That simple.

Free tier includes 5 GB storage and full CLI access.