@temps-sdk/cli
v0.1.14
Published
CLI for Temps deployment platform
Downloads
706
Readme
# npm
npm install -g @temps-sdk/cli
# bun
bun add -g @temps-sdk/cli
# pnpm
pnpm add -g @temps-sdk/cli
# Or run without installing
npx @temps-sdk/cli
bunx @temps-sdk/cliQuick Start
# Authenticate with your Temps instance
bunx @temps-sdk/cli login
# Initialize a project in the current directory
bunx @temps-sdk/cli init
# Deploy
bunx @temps-sdk/cli up
# Check status
bunx @temps-sdk/cli statusThat's it. The CLI detects your framework, connects your git repo, and deploys -- all in one command.
Configuration
Interactive Setup
bunx @temps-sdk/cli configureWalks you through setting your Temps API URL and authentication token, stored in ~/.temps/config.json.
Environment Variables
TEMPS_API_URL=https://your-instance.temps.dev # Your Temps API URL
TEMPS_API_TOKEN=your-token # API key or deployment token
TEMPS_PROJECT=my-app # Project slug (optional)Environment variables take precedence over config files, making CI/CD integration straightforward.
Project-Level Config
Running bunx @temps-sdk/cli init or bunx @temps-sdk/cli link creates a .temps/config.json in your project directory:
{
"projectSlug": "my-app"
}The CLI walks upward from your working directory to find .temps/config.json (like .git discovery). When found, the projectSlug is used to auto-fetch the project ID and all configuration (git connection, preset, environments) from the API -- no need to pass --project on every command.
Resolution order: --project flag > .temps/config.json > TEMPS_PROJECT env var > global default.
Developer Workflow
init
Initialize a new Temps project in the current directory. Detects your framework, creates a project on the platform, and links it.
bunx @temps-sdk/cli initlink <project>
Link the current directory to an existing Temps project.
bunx @temps-sdk/cli link my-appup
One-command deploy. If the project is not yet linked, an interactive setup wizard walks you through framework detection, git connection, and service provisioning. If the project is already linked (via link or init), it fetches the project configuration -- including the git connection and preset -- shows a deployment preview, and triggers the pipeline with a live progress TUI.
# Deploy the current directory
bunx @temps-sdk/cli up
# Deploy a specific branch
bunx @temps-sdk/cli up --branch main
# Deploy with a specific preset (skip auto-detection)
bunx @temps-sdk/cli up --preset nextjs
# Manual deployment mode (no git, uploads a local Docker image)
bunx @temps-sdk/cli up --manualWhat up shows for a linked project:
i Using project acme-api (from local-config)
✔ Found project: acme-api
i Repository: acme-org/acme-api
i Preset: fastapi
╭─ Deployment Preview ──────────────╮
│ Project: acme-api │
│ Environment: production │
│ Branch: main │
│ Preset: fastapi │
│ Repository: acme-org/acme-api │
╰────────────────────────────────────╯
✔ Deployment started
🚀 Deployment Progress
...If the project has no git provider connected, up warns you and suggests how to connect one or fall back to manual deployment.
status
View the current project's deployment status, container health, and domain configuration.
bunx @temps-sdk/cli statusopen
Open the project's live URL in your default browser.
bunx @temps-sdk/cli openrollback
Rollback to the previous deployment.
bunx @temps-sdk/cli rollbackenv:pull / env:push
Sync environment variables between your local .env file and the Temps project.
# Download env vars to .env
bunx @temps-sdk/cli env:pull
# Upload .env to the project
bunx @temps-sdk/cli env:pushDeployment Methods
Git-Based Deploy
# Deploy from a branch (default: current branch)
bunx @temps-sdk/cli deploy
# Deploy a specific branch
bunx @temps-sdk/cli deploy --branch feature/new-ui
# Deploy to a specific environment
bunx @temps-sdk/cli deploy --branch main --environment productionLocal Docker Image
Build a Docker image locally, export it, and upload it directly -- useful when your CI builds images or for air-gapped environments.
bunx @temps-sdk/cli deploy:local-image --tag my-app:latestList Deployments
bunx @temps-sdk/cli deploymentsMulti-Instance Management
Manage multiple Temps server instances (self-hosted and cloud) from a single CLI.
# List configured instances
bunx @temps-sdk/cli instances list
# Add a new instance
bunx @temps-sdk/cli instances add
# Switch active instance
bunx @temps-sdk/cli instances switchTemps Cloud
Connect to Temps Cloud for managed hosting with automatic provisioning.
# Login via browser (device code flow)
bunx @temps-sdk/cli cloud login
# Check current user
bunx @temps-sdk/cli cloud whoami
# Manage VPS instances
bunx @temps-sdk/cli cloud vps list
bunx @temps-sdk/cli cloud vps create
bunx @temps-sdk/cli cloud vps destroy
# View billing and usage
bunx @temps-sdk/cli cloud billingPlatform Migration
Migrate projects from other platforms with an interactive wizard that discovers your projects, snapshots configuration, and generates a step-by-step migration plan.
bunx @temps-sdk/cli migrateSupported platforms:
| Platform | What's migrated | |----------|-----------------| | Vercel | Projects, env vars, domains | | Coolify | Projects, services, env vars, domains | | Dokploy | Projects, services, env vars, domains |
Resource Management
The CLI provides full CRUD access to every Temps resource:
# Projects
bunx @temps-sdk/cli projects list
bunx @temps-sdk/cli projects create
bunx @temps-sdk/cli projects show <slug>
# Domains & SSL
bunx @temps-sdk/cli domains list
bunx @temps-sdk/cli domains provision <id>
# Services (PostgreSQL, Redis, S3)
bunx @temps-sdk/cli services list --project <slug>
bunx @temps-sdk/cli services create --project <slug>
# Monitoring
bunx @temps-sdk/cli monitors list
bunx @temps-sdk/cli monitors create
# Environment variables
bunx @temps-sdk/cli environments list --project <slug>
# Git providers
bunx @temps-sdk/cli providers list
bunx @temps-sdk/cli providers sync <id>
# Backups
bunx @temps-sdk/cli backups list --project <slug>
bunx @temps-sdk/cli backups run <id>
# Container management
bunx @temps-sdk/cli containers list --project <slug>
# Runtime logs (live streaming)
bunx @temps-sdk/cli runtime-logs --project <slug>Full resource list: projects, deployments, environments, domains, custom-domains, DNS, DNS providers, git providers, services, backups, containers, monitors, incidents, webhooks, API keys, tokens, users, settings, audit logs, proxy logs, errors, DSN, KV, blob, scans, IP access, email domains, email providers, emails, load balancer, templates, presets, funnels, notifications, notification preferences, platform.
CI/CD Integration
Use environment variables for non-interactive deployments:
# GitHub Actions example
env:
TEMPS_API_URL: ${{ secrets.TEMPS_API_URL }}
TEMPS_API_TOKEN: ${{ secrets.TEMPS_API_TOKEN }}
steps:
- run: bunx @temps-sdk/cli deploy --branch ${{ github.ref_name }} --project my-appGlobal Options
| Option | Description |
|--------|-------------|
| -v, --version | Display version number |
| --no-color | Disable colored output |
| --debug | Enable debug output |
| -h, --help | Display help |
Requirements
- Node.js 18+ or Bun
- A running Temps instance (self-hosted or Temps Cloud)
Related
@temps-sdk/kv-- Key-value store@temps-sdk/blob-- File storage@temps-sdk/react-analytics-- React analytics, session replay, error tracking@temps-sdk/node-sdk-- Full platform API client and server-side error tracking
License
MIT
