Getting Started
Deploy your first application with TOSE CLI in under 5 minutes.
Prerequisites
- TOSE CLI installed
- A TOSE account with an API key
- A project with a Git repository on GitHub
Step 1: Login
bash
$ tose login
? Enter your TOSE API key: tose_sk_xxxxxxxxxxxx
✓ API key verified
Default workspace: my-workspace
Logged in! API key saved to ~/.tose/config.jsonStep 2: Deploy
Navigate to your project and run tose up:
bash
$ cd my-app
$ tose up
No project linked. Setting up...
Using workspace: my-workspace
Fetching projects...
? Select project:
❯ Create new project
? Project name: my-app
Creating project...
✓ Project "my-app" created
Linked to my-workspace/my-app
Detected git repo: username/my-app (main)
✓ Git connected: username/my-app (main)
Using server: TOSE Cloud
✓ Server assigned
Found 1 .env file(s). Push environment variables? Yes
✓ Pushing 3 variables...
✓ 3 variables pushed
✓ Deploying...
✓ Deployment triggered
Deployment ID: dep_abc123
Status: pending
URL: https://my-app.tose.sh
Stream build logs with: tose logs --build -fThat's it. tose up handles everything: project creation, Git connection, environment variables, and deployment.
Step 3: Monitor
Watch the Build
bash
$ tose logs --build -f
Step 1/12 : FROM node:18-alpine AS builder
---> a1b2c3d4e5f6
Step 2/12 : WORKDIR /app
---> Using cache
Step 3/12 : COPY package*.json ./
Step 4/12 : RUN npm ci
---> Running in abc123def456
added 834 packages in 12s
Step 5/12 : COPY . .
Step 6/12 : RUN npm run build
...
Successfully built a1b2c3d4e5f6Check Status
bash
$ tose status
Project: my-app
Status: active
Pods: 2/2 ready
pod-abc-1 Running restarts=0 age=5m
pod-abc-2 Running restarts=0 age=5m
CPU: 1000m
Memory: 2Gi
Latest deployment:
ID: dep_abc123
Version: 1
Status: running
Time: 5m ago
URL: https://my-app.tose.shOpen in Browser
bash
$ tose open
Opening https://my-app.tose.shStep 4: Make Changes
After pushing code changes to GitHub:
bash
$ tose deploy
✓ Deploying my-workspace/my-app...
✓ Deployment triggered
Deployment ID: dep_xyz789
Status: pending
Commit: a1b2c3d
Stream build logs with: tose logs --build -fProject Structure
A typical project that works with TOSE:
my-app/
├── .git/ # Git repository
├── .env # Environment variables
├── .tose.json # TOSE project link (created by tose up)
├── Dockerfile # Docker build instructions
├── package.json # Dependencies
└── src/
└── index.js # Application entry pointNo Dockerfile?
If your project doesn't have a Dockerfile, use tose generate to create one with AI:
bash
$ tose generate
Scanning source code...
✓ Language: Node.js | Framework: Express | Package Manager: npm
Generating Dockerfile with AI...
✓ Dockerfile generated and savedCommon Workflows
Update Environment Variables
bash
# Set variables directly
tose env set NODE_ENV=production PORT=3000
# Or push from .env file
tose env push .env.production
# Redeploy to apply
tose redeployAdd a Custom Domain
bash
tose domain add myapp.com
# Then configure DNS CNAME to point to your-project.tose.shCreate a Database
bash
$ tose db create
? Database name: my-app-db
? Database type: PostgreSQL
✓ Database "my-app-db" created
Connection: postgresql://user:pass@db.tose.sh:5432/my-app-db
# Set connection string as env var
$ tose env set DATABASE_URL=postgresql://user:pass@db.tose.sh:5432/my-app-db
$ tose redeployStop and Restart
bash
# Stop deployment
tose down
# Restart pods (no rebuild)
tose restart
# Redeploy (same image, new pods)
tose redeploy
# Full deploy (rebuild from latest commit)
tose deployWhat's Next?
- Commands Overview - Full command reference
- Configuration - Configuration file reference
- Environment Variables - Manage env vars
- Git Integration - Git workflow details
- Dockerfile Examples - Dockerfile templates