Developers

Deploy with a push. Automate the rest.

Hostingsurge has a REST API, a CLI and an MCP server. Push to deploy from any Git host, trigger builds with deploy hooks, and get JSON out of every CLI command for scripts, CI and AI agents.

REST API + OpenAPICLI with --jsonPush-to-deployDeploy hooksMCP server

A CLI for terminals, CI and agents.

Deploy a folder, follow logs and manage environment variables, domains, databases, WordPress and imports without opening the dashboard.

  • Add --json to any command for machine-readable output
  • Set HOSTINGSURGE_TOKEN in CI and skip the login step
  • Import from Vercel, Netlify, Git, WordPress, database dumps, cPanel and more
  • Install it from hostingsurge.com, or run single commands with npx
# Install once (or run single commands with npx)
npm i -g https://hostingsurge.com/cli/hostingsurge.tgz

# Sign in with a token from Settings → Tokens
hostingsurge login

# Link this folder, deploy it and follow the logs
hostingsurge link
hostingsurge deploy --prod
hostingsurge logs --follow

# In CI: token from the environment, JSON output
export HOSTINGSURGE_TOKEN=<token>
hostingsurge deploy --prod --project my-app --json

Command reference

Every command, with an example. hostingsurge help <command> lists all options.

CommandWhat it doesExample
login · logout · whoamiSave an API token, remove it, or show who you are signed in ashostingsurge login
projects · link · openList projects, link this folder to one, open the live sitehostingsurge link
deploy [dir] --prodUpload a folder, build it and wait for the URLhostingsurge deploy --prod
logs --followStream runtime logs, or build logs with --buildhostingsurge logs --follow
env ls · add · rm · pullManage environment variables, or pull them into a local filehostingsurge env pull
domains ls · add · verify · rmAdd custom domains and get the DNS records to sethostingsurge domains add www.example.com
import <source>Move a site, app or database from git, vercel, netlify, wordpress, db, snapshot, cpanel or sftphostingsurge import vercel my-app
databasesCreate, attach, back up and restore managed databases, and toggle public accesshostingsurge databases ls
wordpressStatus, updates, hardening, auto-updates, admin password reset, health checks and backupshostingsurge wordpress status
emailEmail domains, mailboxes and transactional sendinghostingsurge email domains ls
cron · hooks · webhookScheduled commands, deploy hooks and push-to-deployhostingsurge hooks add nightly

A REST API for your own code.

JSON over HTTPS, authenticated with a bearer token. The OpenAPI spec describes every endpoint, so you can generate a client in the language you use.

  • Base URL https://hostingsurge.com/api/v1
  • Team-wide API tokens from Settings → Tokens
  • Projects, deployments, logs, environment variables, domains, databases, WordPress, cron jobs, imports and email
  • Roll back or promote a deployment with one call

Open the OpenAPI spec

API=https://hostingsurge.com/api/v1

# List your projects
curl $API/projects \
  -H "Authorization: Bearer $HOSTINGSURGE_TOKEN"

# Deploy one of them again
curl -X POST $API/projects/$PROJECT_ID/deployments \
  -H "Authorization: Bearer $HOSTINGSURGE_TOKEN"

# Download the OpenAPI spec
curl $API/openapi.json

Git workflows that fit how you work.

Deploy on every push, redeploy from anywhere and roll back when you need to.

Push to deploy

Install the Hostingsurge GitHub App, or add a push webhook in GitLab, Bitbucket, Gitea or Forgejo. Every push to your production branch builds and deploys.

Deploy hooks

A secret URL that redeploys your project when something sends a POST to it: a CMS, a CI job or a scheduled task.

Rollback and promote

Roll production back to an earlier deployment, or promote a ready one, from the dashboard or the API.

From the terminal

# Create a deploy hook (the URL is shown once)
hostingsurge hooks add nightly

# Redeploy from anywhere
curl -X POST "$DEPLOY_HOOK_URL"

# Push-to-deploy from any Git host: create the webhook secret
hostingsurge webhook rotate

Or let your AI assistant do it.

The Hostingsurge MCP server gives Claude, ChatGPT, Cursor and VS Code 72 tools. They connect by signing in, so there is no key to paste.

  • 72 tools for projects, deployments, domains, databases, WordPress, email and migrations
  • OAuth 2.1 sign-in, or a bearer token for other clients
  • /llms.txt describes the platform for AI agents

Set up MCP in your client

# Claude Code: add the server, then run /mcp to sign in
claude mcp add --transport http hostingsurge \
  https://hostingsurge.com/mcp

# A guide to the platform, written for AI agents
curl https://hostingsurge.com/llms.txt

Developer questions

How do I authenticate?

Create an API token in the dashboard under Settings → Tokens. Tokens work across the whole team: send one as a bearer token to the API, save it with hostingsurge login, or set HOSTINGSURGE_TOKEN in CI.

Where is the API reference?

The OpenAPI spec at /api/v1/openapi.json describes every endpoint. Load it into your API client or generate a typed client from it.

Can AI agents use the CLI?

Yes. Add --json to any command for machine-readable output and set HOSTINGSURGE_TOKEN so there is no login prompt. For assistants like Claude or ChatGPT, the MCP server is usually the better fit.

Which Git hosts can I deploy from?

GitHub through the Hostingsurge GitHub App, and GitLab, Bitbucket, Gitea and Forgejo through push webhooks. You can also import a repository from any Git URL, including private ones through a read-only deploy key.

Can I deploy without Git?

Yes. hostingsurge deploy uploads a folder and deploys it, and in the dashboard you can drag and drop a folder or a .zip file.

Deploy from your terminal.

Create a free account, make a token under Settings → Tokens and ship your first project from the command line.