Browse docs

Get started

CLI

Set up your app's backend from the terminal: sign in, deploy Postgres, Auth, Storage and more, and write the .env with one command.

One command

Run this in your app's folder. It opens your browser to sign in, lets you pick or create a project, deploys the services you choose, waits until they are ready and writes the connection settings into your env file. Secret values are never printed.

Shell
npx cloudhike init

It needs Node.js 20.16 or newer. Run it with npx each time, or install it once with npm install -g cloudhike.

Commands

CommandWhat it does
cloudhike initSign in, pick or create a project, deploy services, wait and write the env file.
cloudhike loginSign in in the browser. --token <key> saves an API key instead.
cloudhike logoutSign out and revoke the CLI's token.
cloudhike whoamiThe account and plan you are signed in with.
cloudhike projectsList your projects. cloudhike projects create <name> makes one.
cloudhike link [project]Link this folder to a project, by id or name.
cloudhike statusThe project's services and their status.
cloudhike add <service...>Deploy services, wait for them and update the env file.
cloudhike env pullWrite the project's variables into the env file.
cloudhike env lsList the variable names, without values.
cloudhike openOpen the project in the dashboard.

Services for add and init --services: postgres, auth, storage, redis, jobs, email, ai and computer. Auth needs Postgres, so the CLI adds Postgres when you ask for Auth alone.

OptionMeaning
--project <id or name>Use this project instead of the folder's link.
--environment <name>An environment other than production, such as development.
--services <list>For init: the services to deploy, comma separated.
--name <name>For init: the project's name, created if it does not exist.
--file <path>The env file to write.
--no-wait, --no-pullDo not wait for services, or do not write the env file afterwards.
--accept-email-policyYou have read and agree to the email policy. Email needs it.
--jsonMachine-readable output for scripts.

The env file

  • The CLI writes .env.local when the app uses Next.js and .env otherwise. --file picks another.
  • It merges into the file: variables CloudHike.dev sets are replaced, and your own lines and comments stay as they are.
  • It adds the file to .gitignore if nothing ignores it yet, and prints only the variable names, never the values.

Signing in

cloudhike login opens https://cloudhike.dev/connect in your browser. Click Allow and the CLI gets its own token. It appears in the dashboard under Settings → API key → Connected apps, where you can disconnect it. cloudhike logout revokes it too.

The token is saved in ~/.config/cloudhike/auth.json (%APPDATA%\cloudhike on Windows), readable only by you.

Your CloudHike.dev account is billed for what the CLI deploys, the same as in the dashboard. The CLI cannot delete projects or services. Do that in the dashboard.

CI and scripts

Without a browser, use your workspace API key (dashboard → Connect MCP). CLOUDHIKE_API_KEY takes precedence over a saved sign-in, and CLOUDHIKE_PROJECT_ID picks the project.

GitHub Actions, Vercel builds and so on
Shell
export CLOUDHIKE_API_KEY=icu_your_api_key
npx cloudhike env pull --project <project id> --file .env.production
Exit codeMeaning
0It worked.
1Something failed, such as a deploy or a plan limit.
2The command or its options are wrong.
3Not signed in, or the key was revoked.

Use with AI

Coding agents with a shell can use the CLI, so secret values never pass through the chat.

  1. 1

    Open a terminal in your app's folder and start Claude Code.

    Terminal
    Shell
    claude
  2. 2

    Paste the prompt below and press Enter. Approve the file edits and commands it asks about.

  3. 3

    Optional: save a short note about CloudHike.dev in CLAUDE.md so every session knows about it.

PROMPT
Set up CloudHike.dev as the backend for this app with the CloudHike CLI.

Read the app first and decide which services it needs (postgres, auth, storage, redis, jobs, email, ai). Then run:

npx cloudhike init --services <the services, comma separated>

Do not open or print the env file it writes. Read the docs at https://cloudhike.dev/docs for each service and write the code that connects it. If email is needed, ask me to read https://cloudhike.dev/legal/email-policy first, and only add --accept-email-policy after I agree.

Replace the placeholders in <angle brackets> before sending. Always review what the agent changes.