CLI
Install, log in, and configure the clouzark command.
npm i -g clouzarkNode.js 20 or later. Without installing, prefix commands with npx: npx clouzark deploy.
Log in
clouzark loginThe CLI shows a one-time code and opens clouzark.com/cli/authorize. Approve it and pick a team; the CLI receives a token for that team that lasts 90 days. The token appears in the team's Access Tokens settings, where it can be revoked. Run clouzark login again to switch teams.
clouzark whoami # user, team, and role
clouzark logout # revoke this machine's tokenThe CLI has exactly your role in the team: a viewer can read but not deploy.
Link a directory
Commands act on the project linked to the current directory, saved in .clouzark/project.json (git-ignored). Link once per repo:
clouzark init # link hosting and database, and write AGENTS.md
clouzark link # link only the hosting project
clouzark db link # link only the database
clouzark unlinkTo act on another project, pass -p, --project <ref> (hosting) or --db <ref> (database). A ref is a project's slug or id.
Configuration
~/.config/clouzark/config.json | API URL and token (file mode 600; honors XDG_CONFIG_HOME) |
CLOUZARK_TOKEN | Token to use instead of the stored one |
CLOUZARK_API_URL | API to use (default https://api.clouzark.com) |
CLOUZARK_PROJECT | Hosting project to use instead of the linked one |
CLOUZARK_DB | Database to use instead of the linked one |
CI
Create a token under the team's Settings → Access Tokens and save it as a secret in your CI. For example, to apply migrations on every push to main:
- run: npx clouzark db push --yes --db my-app-db
env:
CLOUZARK_TOKEN: ${{ secrets.CLOUZARK_TOKEN }}