CLI Getting Started
The Temps CLI (@temps-sdk/cli) lets you manage projects, deployments, environments, and more directly from your terminal.
Installation
You can run the CLI directly using bunx or npx without installing it globally, or install it as a global package.
Run Without Installing
Run CLI commands
bunx @temps-sdk/cli --version
Global Installation
Install globally
bun add -g @temps-sdk/cli
After global installation, the temps command is available directly:
temps --version
Configuration
Before using the CLI, you need to configure it to connect to your Temps instance.
Login with API Key
Login to Temps
bunx @temps-sdk/cli login
This will prompt you to enter your Temps server URL and API key. You can generate an API key from the Temps dashboard under Settings → API Keys.
Configure with Wizard
For a guided setup experience:
Run configuration wizard
bunx @temps-sdk/cli configure
Quick Start
Here's a quick workflow to deploy your first project using the CLI.
1. List Your Projects
List projects
bunx @temps-sdk/cli projects list
2. Create a New Project
Create a project
bunx @temps-sdk/cli projects create \
--name my-app \
--description "My awesome application" \
--repo https://github.com/myuser/my-app
3. Deploy Your Project
Deploy to production
bunx @temps-sdk/cli deploy --project my-app --environment production
4. View Deployment Logs
Stream logs
bunx @temps-sdk/cli logs --project my-app --follow
Common Commands
Managing Projects
Project commands
# List all projects
bunx @temps-sdk/cli projects list
# Show project details
bunx @temps-sdk/cli projects show --project my-app
# Delete a project
bunx @temps-sdk/cli projects delete --project my-app
Managing Environment Variables
Environment variable commands
# List environment variables
bunx @temps-sdk/cli environments vars list --project my-app
# Set an environment variable
bunx @temps-sdk/cli environments vars set DATABASE_URL=postgres://... --environments production
# Import from .env file
bunx @temps-sdk/cli environments vars import .env --environments production
Managing Domains
Domain commands
# List domains
bunx @temps-sdk/cli domains list
# Add a custom domain
bunx @temps-sdk/cli domains add --domain app.example.com
# Verify domain and get SSL certificate
bunx @temps-sdk/cli domains verify --domain app.example.com
Environment Variables
The CLI respects the following environment variables for configuration:
| Variable | Description |
|---|---|
TEMPS_API_URL | Temps API endpoint URL |
TEMPS_API_TOKEN | Authentication token |
TEMPS_API_KEY | API key (alternative to token) |
NO_COLOR | Disable colored output |
Example:
export TEMPS_API_URL=https://temps.example.com
export TEMPS_API_KEY=your-api-key
temps projects list
Global Options
All commands support these global options:
| Flag | Description |
|---|---|
-v, --version | Display CLI version |
--no-color | Disable colored output |
--debug | Enable debug logging |
-h, --help | Show help for a command |
--json | Output results in JSON format |
JSON Output
Most commands support --json flag for scripting and automation:
JSON output
bunx @temps-sdk/cli projects list --json | jq '.[] | .name'
Configuration Files
The CLI stores configuration in:
- Config file:
~/.temps/config.json - Credentials:
~/.temps/.secrets
View your current configuration:
Show configuration
bunx @temps-sdk/cli configure show
Next Steps
- CLI Reference - Complete command reference with all options
- API Reference - Use the REST API directly
- Environment Variables Reference - All configuration options