Remote Access
These commands give you direct access to running containers and their attached services. All of them use the linked service context or accept an explicit workspace/project/env/service argument.
Open an interactive SSH session to a running container:
ancla sshConnect to a specific process type (defaults to web):
ancla ssh --process workerWith an explicit service path:
ancla ssh my-ws/my-project/production/my-serviceThe CLI requests ephemeral credentials from the Ancla API and launches ssh with them. You need OpenSSH installed locally. No SSH keys to manage; the platform handles authentication.
Similar to ssh, but uses the platform’s exec API directly. No SSH client needed.
ancla shellChoose the process type and shell command:
ancla shell -p workerancla shell -c /bin/bashDefault process type is web. Default command is /bin/sh.
Database shell
Section titled “Database shell”Connect to your service’s primary database:
ancla dbshellThe CLI detects the database engine and launches the right client:
- PostgreSQL →
psql - MySQL →
mysql - Other → prints the connection URL for manual use
Credentials come from the platform. You need psql or mysql installed locally.
ancla dbshell my-ws/my-project/production/my-serviceWith --json, the command prints connection details without opening a shell (passwords omitted):
ancla dbshell --json{ "engine": "postgresql", "host": "db-abc123.ancla.internal", "port": 5432, "name": "myservice_production", "user": "myservice"}Cache management
Section titled “Cache management”View cache service details:
ancla cache infoEngine: redisHost: cache-abc123.ancla.internalPort: 6379Open an interactive Redis CLI session:
ancla cache cliFor Redis, this launches redis-cli with the right host, port, and auth. For other cache engines, it prints the connection URL.
Flush the cache:
ancla cache flushThis prompts for confirmation. Skip it with --yes:
ancla cache flush --yesPrerequisites
Section titled “Prerequisites”These commands launch local client binaries. Make sure you have the right ones installed:
| Command | Requires |
|---|---|
ancla ssh | ssh (OpenSSH) |
ancla dbshell | psql or mysql |
ancla cache cli | redis-cli (for Redis) |
All other commands (shell, cache info, cache flush) work without extra dependencies.