sh0 push in action
自动检测技术栈
sh0 push 扫描项目文件并选择正确的基础镜像、构建命令和运行时。无需 Dockerfile。
始终支持自定义 Dockerfile。技术栈自动检测是便捷功能,而非限制。
工作原理
Install
curl -fsSL https://get.sh0.dev | bash Single binary, no dependencies. Works on Ubuntu, Debian, CentOS, and any Linux with Docker.
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.
Initialize
sh0 init Detects your stack, generates .sh0ignore. Optional but recommended for new projects.
Push
sh0 push Packages files, uploads, builds container, returns a live URL. One command, zero config.
Watch
sh0 watch Auto-pushes on every file change with 2-second debounce. Your dev loop, automated.
智能文件处理
控制上传内容并自动跟踪部署。
.sh0ignore
Same syntax as .gitignore. Falls back to .dockerignore, then .gitignore.
.sh0/link.json
Created after first push. Links your directory to the remote app.
支持 CI/CD
设置两个环境变量,sh0 push 即可在任何地方运行 -- GitHub Actions、GitLab CI 或任何运行器。
GitHub Actions
Any CI runner
命令参考
一个二进制文件,30+ 命令。管理部署所需的一切。
Deploy
App Lifecycle
Management
Infrastructure
Authentication & Admin
A typical session
All commands support --json for machine-readable output
配置
本地工作使用配置文件,CI/CD 使用环境变量。
~/.sh0/config.toml
Environment variables
一应俱全
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.
传统方式
- 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
sh0 的方式
- 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