Distribute CLI
Deploy your apps from the command line in seconds
Installation
Quick Install
curl -fsSL https://distribute.app/install.sh | sh
Installs to /usr/local/bin and makes the CLI globally available
Requirements
- Python 3.6+ - Required to run the CLI
- pip3 - Python package installer
- certifi - SSL certificate bundle (installed automatically)
Manual Installation
# Download the CLI
curl -fsSL https://distribute.app/cli/distribute -o distribute
# Make it executable
chmod +x distribute
# Move to PATH
sudo mv distribute /usr/local/bin/
# Install dependencies
pip3 install certifi requests
# Verify installation
distribute --version
Quick Start
Get started in 3 simple steps:
1. Login to Distribute
distribute login
Login to Distribute
API: https://distribute.app
Username: your@email.com
Password: ********
Logged in as your@email.com
2. Navigate to Your Project
cd /path/to/your/project
npm run build # or your build command
3. Deploy
distribute .
Creating zip from: /path/to/project
Added: index.html
Added: assets/main.js
Zip created: 0.45 MB
Deploying as: my-project
Visibility: private
Uploading...
==================================================
Deployment Successful!
==================================================
App Name: my-project
URL: https://my-project.distribute.app
==================================================
Commands
Basic Commands
distribute . # Deploy current directory
distribute <path> # Deploy specific path
distribute login # Login to Distribute
distribute logout # Logout
distribute whoami # Show current user
distribute --version # Show CLI version
distribute --help # Show help
Options
-n, --name <name> # Custom app name
-v, --visibility <type> # public or private (default: private)
-a, --api <url> # Custom API endpoint
Authentication
The CLI stores your authentication token locally in ~/.distribute/config.json
Login
distribute login
You'll be prompted for your username and password. The token is securely stored for future deployments.
Logout
distribute logout
Logged out
Check Current User
distribute whoami
Logged in as: your@email.com
Note: Your authentication token is stored with 600 permissions (user-only access) for security.
Deploying Apps
Deploy Current Directory
distribute .
Deploy with Custom Name
distribute . --name my-awesome-app
Deploy as Public App
distribute . --visibility public
Deploy Specific Directory
distribute ./build
distribute ./dist
distribute ./out
Deploy ZIP File
distribute my-app.zip
What Gets Packaged
The CLI automatically excludes:
- node_modules/
- .git/
- __pycache__/
- .next/, .cache/
- venv/, env/
- Hidden files (.DS_Store, .gitignore, etc.)
Examples
React App
cd my-react-app
npm run build
distribute ./build --name portfolio
Next.js (Static Export)
cd my-next-app
npm run build
npm run export
distribute ./out --name next-blog
Vue App
cd my-vue-app
npm run build
distribute ./dist --name vue-dashboard
Static HTML Site
cd my-website
distribute . --visibility public
Multiple Deployments
# Deploy production
distribute ./build --name production-app
# Deploy staging
distribute ./build --name staging-app
# Deploy preview
distribute ./build --name preview-feature-x
Configuration
Config File
Location: ~/.distribute/config.json
{
"token": "your-auth-token",
"username": "your@email.com",
"api_base": "https://distribute.app"
}
Environment Variables
# Custom API endpoint
export DISTRIBUTE_API=https://custom.distribute.app
# Disable SSL verification (development only)
export DISTRIBUTE_VERIFY_SSL=false
For Local Development
export DISTRIBUTE_API=http://localhost:5000
export DISTRIBUTE_VERIFY_SSL=false
distribute login
Troubleshooting
SSL Certificate Error
SSLError: certificate verify failed
Solution: Install certifi
pip3 install --upgrade certifi
curl -fsSL https://distribute.app/install.sh | sh
Command Not Found
distribute: command not found
Solution: Add to PATH
export PATH="/usr/local/bin:$PATH"
source ~/.bashrc # or ~/.zshrc
Not Logged In
Not logged in. Run: distribute login
Solution: Login first
distribute login
Upload Failed
Common causes:
- File size exceeds 50MB limit
- Network connection issues
- Invalid authentication token
Solution: Check file size and re-login
distribute logout
distribute login