Skip to content

teploy cloud: log in to Teploy Cloud, list and create managed servers - #75

Open
im-tyler wants to merge 1 commit into
mainfrom
cloud-commands
Open

im-tyler wants to merge 1 commit into
mainfrom
cloud-commands

Conversation

@im-tyler

Copy link
Copy Markdown
Contributor

Adds a teploy cloud command group that talks to Teploy Cloud's public API.

  • cloud login | logout | status: the API key is read without echo or from stdin (never a flag value) and stored in cloud.yml next to servers.yml, mode 0600.
  • cloud servers, cloud sizes, cloud regions: tables, or JSON with --json.
  • cloud server create <name>: registers the local public key if needed, shows the monthly price and asks before spending, creates the server with one idempotency key, waits for it, adds it to servers.yml and runs setup (skip with --no-setup).
  • cloud server delete <name-or-id>: confirms by name and removes the matching servers.yml entry only when its host matches.

Tested against a fake server only (httptest); not yet run against cloud.teploy.com. Do not release until one real create and delete has been run.

🤖 Generated with Claude Code

Adds internal/cloud (HTTP client for cloud.teploy.com /api/v1: bearer key +
X-Organization-Id, 30s per request, both list shapes, error envelope with
hints, https-only base URL except localhost) and the `teploy cloud` group:
login/logout/status, servers, regions, sizes, server create, server delete.

server create registers the local public key once, confirms the monthly
price, posts with one Idempotency-Key across retries, polls to active,
adds the server via config.AddServer (refusing an existing name) and runs
the runSetup path after waiting for SSH, unless --no-setup.

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant