Installation
Install the Lubes CLI using your preferred method:
npm install -g @lubes/clibrew install lubes/tap/lubescargo install lubes-cli# Linux/macOS
curl -fsSL https://lubes.dev/install.sh | sh
# Windows (PowerShell)
irm https://lubes.dev/install.ps1 | iexVerify the installation:
lubes --version
# lubes 0.1.4Configuration
Global Configuration
Global config is stored in ~/.lubes/config.toml:
# ~/.lubes/config.toml
[auth]
access_token = "your-access-token"
refresh_token = "your-refresh-token"
[defaults]
organization = "my-org"
project = "my-project"
[output]
format = "table" # table, json, yamlProject Configuration
Project-specific config in lubes.json:
{
"projectId": "abc123",
"organization": "my-org",
"functions": {
"directory": "./functions",
"runtime": "deno"
},
"database": {
"migrations": "./migrations"
}
}Environment Variables
| Variable | Description |
|---|---|
| LUBES_ACCESS_TOKEN | Override access token |
| LUBES_PROJECT_ID | Override project ID |
| LUBES_API_URL | Custom API endpoint |
| LUBES_DEBUG | Enable debug output |
Commands
Global Options
| Option | Description |
|---|---|
| --help, -h | Show help for command |
| --version, -V | Show CLI version |
| --project, -p | Specify project ID |
| --output, -o | Output format (table, json, yaml) |
| --debug | Enable debug output |
lubes auth
Authentication commands
auth loginLog in to Lubes
auth logoutLog out of Lubes
auth statusShow authentication status
auth tokenPrint current access token
lubes projects
Project management
projects listList all projects
projects createCreate a new project
projects deleteDelete a project
projects infoShow project details
lubes db
Database operations
db queryExecute a SQL query
db shellOpen interactive psql shell
db migrations newCreate a new migration
db migrations upApply pending migrations
db migrations downRoll back last migration
db branches listList database branches
db branches createCreate a database branch
lubes functions
Edge functions
functions listList deployed functions
functions deployDeploy a function
functions deleteDelete a function
functions logsView function logs
functions serveRun functions locally
lubes storage
Object storage
storage buckets listList storage buckets
storage buckets createCreate a bucket
storage uploadUpload a file
storage downloadDownload a file
storage lsList files in bucket
lubes env
Environment variables
env listList environment variables
env setSet a variable
env getGet a variable value
env removeRemove a variable
lubes deploy
Deployment management
deploy listList deployments
deploy createCreate a deployment
deploy rollbackRollback to previous
deploy logsView deployment logs
lubes ssh-keys
SSH key management for Git access
ssh-keys listList your SSH keys
ssh-keys addAdd an SSH key (auto-detects ~/.ssh/id_*.pub)
ssh-keys add --keyAdd SSH key from file or string
ssh-keys deleteDelete an SSH key
lubes git
Git repository operations
git infoShow repository info and clone URLs
git branchesList Git branches
git commitsList recent commits
lubes update
CLI updates
update Check and install CLI updates
lubes version
Version information
version Show CLI version details
Interactive Mode (TUI)
The CLI includes an interactive terminal UI for managing your projects:
# Launch interactive mode
lubes tui
# Or simply
lubesTUI Features
- • Browse and switch between projects
- • View real-time function logs
- • Monitor database queries
- • Manage deployments visually
- • Execute SQL queries interactively