CLI Usage
Every command that talks to the network needs a resolvable API key —
via .appilotsrc, APPILOTS_API_KEY, or --api-key. See
Configuration for how the CLI resolves config and the
precedence between flags, environment variables, and the config file.
appilots init
Interactive setup. Validates your API key, confirms it against the
server, and writes a .appilotsrc file.
| Flag | Description |
|---|---|
--api-key <key> | Your Appilots API key (ak_... format) |
--server <url> | Server URL. Falls back to the environment, then http://localhost:4000 if neither is set — pass --server https://api.appilots.com explicitly for production use |
What it does:
- Validates the key format (must start with
ak_). - Calls the server's health check and status endpoint to confirm the key works and to fetch your project name/id.
- Writes
.appilotsrcto the current directory. - Appends
.appilotsrcto.gitignoreif one exists and doesn't already ignore it — and warns loudly if there's no.gitignoreat all, since the file holds your API key in plaintext.
appilots init --api-key ak_xxxxxxxxxxxx... --server https://api.appilots.com