sh0 push -- Deploy in one command

Push to deploy from your terminal

One command to go from local code to a live URL. Auto-detects your stack, builds a container, streams logs in real time. Plus 30+ commands for everything else.

sh0 push in action

# Deploy a local project
$ sh0 push
  Deploying my-app
  Detected node.js (Next.js) -- 92/100 health
  847 files (2.3 MB) packaged
  Uploading... 1.4s
  Building... done (18s)
  Health check passed
 
  → https://my-app.sh0.app
  Live in 34s
# Edit code, push again -- updates the same app
$ sh0 push
  Pushing my-app (update)
  847 files (2.3 MB) packaged
  Uploading... 0.6s
  Building... done (12s)
  → https://my-app.sh0.app
  Live in 14s
19+
Stacks auto-detected
~35s
Code to live URL
0
Config required

Auto-detects your stack

sh0 push scans your project files and picks the right base image, build command, and runtime. No Dockerfile needed.

Next.js
next.config.js
Node 22
Django
manage.py
Python 3.12
Laravel
artisan
PHP 8.3
SvelteKit
svelte.config.js
Node 22
FastAPI
main.py + uvicorn
Python 3.12
Express
package.json
Node 22
Go
go.mod
Go 1.22
Rust
Cargo.toml
Rust stable
Spring Boot
pom.xml
Java 21
Rails
Gemfile
Ruby 3.3
Nuxt
nuxt.config.ts
Node 22
Remix
remix.config.js
Node 22
Flask
app.py + flask
Python 3.12
Astro
astro.config.mjs
Node 22
Hugo
hugo.toml
Hugo extended
Static HTML
index.html
Nginx
Deno
deno.json
Deno 1.x
Bun
bun.lockb
Bun latest
Elixir
mix.exs
Elixir 1.16

Custom Dockerfiles are always supported. Stack detection is a convenience, not a constraint.

How it works

01

Install

curl -fsSL https://get.sh0.dev | bash

Single binary, no dependencies. Works on Ubuntu, Debian, CentOS, and any Linux with Docker.

02

Authenticate

sh0 login --url https://your-server.com

Interactive login stores a session token. Or set SH0_API_URL + SH0_API_TOKEN for CI/CD.

03

Initialize

sh0 init

Detects your stack, generates .sh0ignore. Optional but recommended for new projects.

04

Push

sh0 push

Packages files, uploads, builds container, returns a live URL. One command, zero config.

05

Watch

sh0 watch

Auto-pushes on every file change with 2-second debounce. Your dev loop, automated.

Smart file handling

Control what gets uploaded and track your deployments automatically.

.sh0ignore

Same syntax as .gitignore. Falls back to .dockerignore, then .gitignore.

# Build artifacts
node_modules/
dist/
.next/
# Environment
.env
.env.*

.sh0/link.json

Created after first push. Links your directory to the remote app.

{
  "app_id": "a1b2c3d4",
  "app_name": "my-app",
  "server_url": "https://panel.sh0.app"
}

Works in CI/CD

Set two environment variables and sh0 push works anywhere -- GitHub Actions, GitLab CI, or any runner.

GitHub Actions

name: Deploy
on:
  push:
    branches: [main]
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install sh0
        run: curl -fsSL https://get.sh0.dev | bash
      - name: Deploy
        run: sh0 push --no-check
        env:
          SH0_API_URL: ${{ secrets.SH0_URL }}
          SH0_API_TOKEN: ${{ secrets.SH0_TOKEN }}

Any CI runner

# Install
curl -fsSL https://get.sh0.dev | bash
# Set credentials
export SH0_API_URL="https://your-server.com"
export SH0_API_TOKEN="sh0_tok_..."
# Deploy (skip health check in CI)
sh0 push --no-check
# Or deploy and wait for completion
sh0 deploy my-app --wait
# Check status (JSON for parsing)
sh0 status my-app --json | jq '.status'

Command reference

One binary, 30+ commands. Everything you need to manage your deployments.

Deploy

sh0 push [path]
Deploy from local directory -- zero config, auto-detects stack
sh0 watch [path]
Auto-push on every file change (2s debounce)
sh0 deploy <app>
Trigger redeployment with optional --wait flag
sh0 init [path]
Initialize project, detect stack, generate .sh0ignore
sh0 link <app>
Link current directory to existing app on server
sh0 check [path]
Run Code Health Check locally (34 rules)

App Lifecycle

sh0 apps
List all deployed applications
sh0 status [app]
Server overview or detailed app status
sh0 restart <app>
Restart app containers (primary + replicas)
sh0 stop <app>
Stop application (requires confirmation)
sh0 start <app>
Start a stopped application
sh0 delete <app>
Delete app and resources (type name to confirm)
sh0 open [app]
Open app URL in default browser

Management

sh0 logs <app> --follow
Stream real-time container logs
sh0 ssh <app> [command]
Shell into container or run a command
sh0 env <app> list|set|delete
Manage environment variables (--reveal to show values)
sh0 domains <app> list|add|remove
Manage custom domains and SSL
sh0 scale <app> <replicas>
Scale from 1 to 10 replicas, with --autoscale

Infrastructure

sh0 templates list|info|deploy
170 one-click templates (databases, CMS, tools)
sh0 compose deploy|validate
Deploy from docker-compose.yml
sh0 yaml apply|validate|export
Infrastructure as Code with sh0.yaml
sh0 cron ls|create|trigger|runs|delete
Managed cron jobs with history
sh0 hooks ls|create|delete
Pre/post build and deploy hooks
sh0 preview ls|enable|disable|delete
Preview environments per branch
sh0 export <format> --app <name>
Export to Vercel, AWS, GCP, K8s, Railway, Render

Authentication & Admin

sh0 login [url]
Authenticate with your server
sh0 whoami
Show current user, server, and version
sh0 config show|set|get
Manage CLI configuration
sh0 users list|invite|update|remove
User management with roles
sh0 projects list|create|members
Project management and RBAC

A typical session

# Authenticate
$ sh0 login --url https://panel.sh0.app
Logged in as [email protected]
# Deploy a local project
$ cd ~/my-api && sh0 push
  Detected node.js (Express) -- 92/100 health
  → https://my-api.sh0.app -- Live in 34s
# Deploy a database from a template
$ sh0 templates deploy postgres --name my-db
  PostgreSQL ready on port 5432
# Set env vars, scale, and stream logs
$ sh0 env my-api set DATABASE_URL=postgresql://...
Set DATABASE_URL
$ sh0 scale my-api 3
Scaled my-api from 1 to 3 replicas
$ sh0 logs my-api --follow --tail 5
[14:32:01] GET /api/users 200 12ms
[14:32:03] POST /api/auth 201 45ms
# Export to another platform (zero lock-in)
$ sh0 export kubernetes --app my-api
  Wrote deployment.yaml (Deployment + Service + Ingress)

All commands support --json for machine-readable output

Configuration

Config file for local work, environment variables for CI/CD.

~/.sh0/config.toml

api_url = "https://your-server.com"
token = "sh0_tok_..."
default_app = "myapi"
output = "table" # or "json"

Environment variables

export SH0_API_URL="https://your-server.com"
export SH0_API_TOKEN="sh0_tok_..."
# Ideal for CI/CD pipelines
# Env vars override config.toml

Everything you need

Push deploy

Deploy from any local directory. Auto-detects 19+ stacks, uploads files, builds, and returns a live URL. No Git required.

Watch mode

Run sh0 watch to auto-push on every file change. Configurable debounce, respects .sh0ignore. Your dev loop, automated.

30+ commands

Deploy, scale, restart, stop, start, delete, manage env vars, domains, stream logs, SSH into containers -- all from one binary.

JSON output

Every command supports --json for machine-readable output. Pipe to jq, feed into scripts, integrate with any CI/CD pipeline.

Export anywhere

Export app configuration to Docker Compose, Vercel, AWS, GCP, Kubernetes, Railway, or Render. No vendor lock-in.

Local health checks

Run sh0 check on any project to get a Code Health report (34 rules) before deploying. Catch issues early.

Config file or env vars

Store settings in ~/.sh0/config.toml or use SH0_API_URL and SH0_API_TOKEN environment variables for CI/CD.

The old way

  • x Set up a Git repo and webhook
  • x Write a Dockerfile from scratch
  • x SSH into server, run docker commands
  • x Configure reverse proxy manually
  • x Different tools for each task
  • x No unified view of your infrastructure

The sh0 way

  • sh0 push -- one command, zero config
  • Auto-detects stack, no Dockerfile needed
  • SSL and domains handled automatically
  • Deploy, scale, and monitor in one flow
  • JSON output for CI/CD integration
  • Export to 7 platforms -- zero lock-in

Questions & answers

What is sh0 push? +
sh0 push deploys directly from a local directory. It detects your stack (Node.js, Python, Go, etc.), packages the files, uploads them, builds a container, and returns a live URL. No Git repo or webhook setup needed. Subsequent pushes update the same app via .sh0/link.json.
What authentication methods does the CLI support? +
Three methods: interactive login (sh0 login) which stores a session token, API tokens (set SH0_API_TOKEN), or config file credentials in ~/.sh0/config.toml. API tokens are recommended for CI/CD.
Can I use the CLI in CI/CD pipelines? +
Yes. Set SH0_API_URL and SH0_API_TOKEN as environment variables, and use the --json flag for machine-readable output. Both sh0 push and sh0 deploy work in CI. See the GitHub Actions example on this page.
What files does sh0 push exclude? +
It respects .sh0ignore, .dockerignore, and .gitignore (in that priority). Additionally, .git/, node_modules/, __pycache__/, .env*, target/, .next/, .nuxt/, .svelte-kit/, dist/, venv/, and .DS_Store are always excluded.
What is sh0 export? +
sh0 export generates platform-specific configuration from your sh0 app. Supported formats: docker-compose, vercel, aws (ECS task definition), gcp (Cloud Run), kubernetes (deployment + service), railway, and render. Zero vendor lock-in.
Can I manage a remote sh0 instance from my local machine? +
Yes. Set SH0_API_URL to your server's address and authenticate with sh0 login or an API token. All commands work remotely over the REST API.

Your code, your server, one command.

Install in one command. Push to deploy. Monitor from the terminal. No middleman.