Initialise clawops Config
clawops_initInitialize a clawops stack by writing local config for provider, region, state backend, and SSH key. Use it before deploying or when no config exists; it only creates local settings and provisions nothing.
Instructions
Register a stack and write ~/.clawops/config.json: the provider, the state backend, the region, and an SSH key pair generated if one is not already there. Nothing is provisioned and nothing is charged; this only creates local configuration.
Use when: any other clawops tool reports that there is no config, or the user wants to add a second stack alongside the ones they have. This is the first call on a machine that has never run clawops — a fresh container, a new laptop, a sandbox.
Adding a stack is additive and safe: existing stacks are kept. Overwriting one needs force: true, because changing a state backend orphans the Pulumi state it points at — the infrastructure stays up and clawops can no longer see or destroy it.
For aws, gcp and azure, stateUrl can be omitted and clawops names a bucket from the account it can see; that needs cloud credentials in the environment, so in a sandbox pass stateUrl explicitly. The local provider needs host instead, and no cloud account at all.
Do NOT use when: the user wants to deploy — that is clawops_up, after this. Credentials are never passed here: clawops reads them from the environment (R6).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | [local only] Hostname or IP of the machine to manage. Required when provider is local | |
| force | No | Overwrite a stack that already exists. Refused without it, because replacing a state backend orphans the state it points at | |
| region | No | Cloud region in the provider's own spelling. Omitted = us-east-1 (aws), us-central1 (gcp), eastus (azure) | |
| sshPort | No | [local only] SSH port. Omitted = 22 | |
| sshUser | No | [local only] SSH login user. Omitted = root | |
| provider | Yes | Which cloud this stack deploys to, or 'local' for a machine you already have | |
| stateUrl | No | Where Pulumi state lives, e.g. s3://bucket/clawops, gs://bucket/clawops, azblob://container. Omitted = clawops names one from the cloud account it can see, which needs credentials | |
| stackName | No | Name for the stack, used by every later call. Omitted = "default" |