Docs menu

Deploy and run

The Deploy to CLI button

A badge for your README that gives anyone their own copy of your app on CLI, after they see what it makes.

Explain it

The Deploy to CLI button is a badge you put in your project's README on GitHub. Anyone who presses it gets their own copy of your app on CLI, in their own account, paid from their own credit.

Nothing runs just from following the link. The visitor signs in, sees which repository it is and what CLI found in it (for example "Looks like Next.js, with Postgres added for it"), can name the project, and only then presses Deploy.

How to make one: go to Account settings, find Deploy to CLI button, paste your GitHub repository's link and press Make the button. Copy the Markdown it shows into your README.

It works for public GitHub repositories.

API
GET /v1/deploy-button?repo=https://github.com/acme/shop&branch=main
JSON
{
  "repo": "acme/shop",
  "branch": "main",
  "link": "https://app.clicloud.app/deploy?repo=https%3A%2F%2Fgithub.com%2Facme%2Fshop&branch=main",
  "image": "https://api.clicloud.app/v1/deploy-button.svg",
  "markdown": "[![Deploy to CLI](https://api.clicloud.app/v1/deploy-button.svg)](https://app.clicloud.app/deploy?repo=…)",
  "html": "<a href=\"…\"><img src=\"https://api.clicloud.app/v1/deploy-button.svg\" alt=\"Deploy to CLI\" height=\"32\"></a>"
}
  • repo must be a GitHub link or owner/name; anything else is a 400. A branch with characters other than letters, digits, ., _, / and - is dropped.
  • GET /v1/deploy-button.svg is the badge itself (168×32, readable on light and dark backgrounds, cached for a day). No sign-in needed for either.

Or write the link by hand:

[![Deploy to CLI](https://api.clicloud.app/v1/deploy-button.svg)](https://app.clicloud.app/deploy?repo=https://github.com/you/your-app)

What the visitor sees

The dashboard's /deploy?repo=…&branch=… page asks them to sign in first (and comes back after), then calls POST /v1/detect to show what it found. Pressing Deploy calls POST /v1/launch {"repo": "https://github.com/…", "branch"?, "name"?}, the same one-box launch as Put something online: a new project, the databases the repo needs, variables from .env.example, and the first deploy. Values only the person knows are left for them to fill in. Links that aren't GitHub repositories show an explanation and no Deploy button.