Operate
alien logs
Search deployment and manager logs.
alien logs [OPTIONS]| Flag | Description |
|---|---|
--deployment <DEPLOYMENT> | Deployment ID, or <deployment-group-name>/<deployment-name>. |
--manager <MANAGER_ID> | Manager ID to search when --deployment is not provided. |
--cloud <CLOUD> | Cloud default to use when the project has multiple default managers. Values: aws, gcp, azure, kubernetes, local. |
-q, --query <QUERY> | Log query text. Default: *. |
--level <LEVEL> | Severity band to include. Repeat to include several bands. Values: trace, debug, info, warn, error, fatal. |
--source <SOURCE> | Restrict results to a gateway request-diagnostics source. Values: application, ai-gateway, encryption-gateway, remote-sandbox. |
--status <STATUS> | Gateway outcome, such as success, provider-error, not-routed, gateway-error, cancelled, or failed. |
--model <MODEL> | Requested AI model. Only valid with --source ai-gateway. |
--provider <PROVIDER> | Selected AI provider. Only valid with --source ai-gateway. |
--operation <OPERATION> | Encryption operation, such as encrypt or decrypt. Only valid with --source encryption-gateway. |
--deployment-group <DG_ID> | Deployment-group ID associated with a gateway request. |
--since <SINCE> | Relative time window, such as 30m, 2h, or 7d. Default: 1h. |
--from <FROM> | Start timestamp in RFC3339 format, or YYYY-MM-DD (midnight UTC). Overrides --since. |
--to <TO> | End timestamp in RFC3339 format, or YYYY-MM-DD (midnight UTC). Defaults to now. |
--limit <LIMIT> | Maximum logs to return per query. Default: 200. |
--system | Include logs from Alien system components (hidden by default). |
--follow | Keep polling for new logs. |
--interval <INTERVAL> | Poll interval used with --follow, such as 1s or 5s. Default: 2s. |
--json | Output a stable machine-readable format. With --follow, emits JSON lines. |
Examples:
alien logs --deployment acme/production --follow
alien logs --source ai-gateway --status provider-error --provider anthropic
alien logs --source ai-gateway --model byo/claude-opus-5 --since 24h --json
alien logs --source encryption-gateway --status failed --operation decrypt
alien logs --source remote-sandbox --since 1halien commands
Invoke remote commands on deployments.
Commands let you run code inside a deployment's environment (query databases, trigger syncs, execute tool calls) without any inbound networking.
Commands are application RPC handled by your Worker, Container, or Daemon. See also: alien operations --help for Remote Operator operations, which carry a risk tier, approval policy, and access requests.
Docs: /docs/guide/commands.
alien commands [OPTIONS] <COMMAND>| Subcommand | Description |
|---|---|
invoke | Invoke a command on a deployment and wait for the result. |
Examples:
# Invoke a command in dev mode
alien dev commands invoke --deployment default --command list-tables
# Invoke with parameters
alien dev commands invoke --deployment default --command query \
--params '{"sql": "SELECT * FROM users"}'
# Invoke against a manager you run
alien commands invoke --deployment acme-corp --command generate-report \
--params '{"startDate": "2025-01-01"}'
# Pick the resource when more than one handles commands
alien commands invoke --deployment acme-corp --command status --target alertsalien commands invoke
Invoke a command on a deployment and wait for the result.
alien commands invoke [OPTIONS] --deployment <DEPLOYMENT> --command <COMMAND>| Flag | Description |
|---|---|
--deployment <DEPLOYMENT> | Deployment ID, or <deployment-group-name>/<deployment-name>. |
--command <COMMAND> | Command name to invoke. |
--target <TARGET> | Resource ID to invoke when several resources handle commands. |
--params <PARAMS> | Command parameters as JSON (default: {}). Default: {}. |
--timeout <TIMEOUT> | Timeout in seconds (default: 60). Default: 60. |
alien operations
Build, test, and manage operations plugins.
Operations plugins package named operations (plugin/operation) that Remote Operator runs in a deployment. Each operation declares its risk, and invoking one goes through the project's approval policy and access requests. init, check, test, permissions, and package need no platform account (cargo may download the plugin's dependencies); publish, list, and invoke need a linked platform workspace.
See also: alien commands --help for application RPC handled by your Worker, Container, or Daemon. Commands have no approval policy or access requests.
alien operations [OPTIONS] <COMMAND>| Subcommand | Description |
|---|---|
init | Scaffold a new operations plugin from the public SDK. Fully offline. |
check | Validate a plugin's manifest, then build and run its required generate-metadata binary and fail if metadata.json differs from the metadata its typed operations generate. Needs no platform account; cargo may download the plugin's dependencies. |
test | Run a plugin's own test suite (cargo test in its directory). Fully offline. |
permissions | Compile a plugin's declared permission requirements into a cloud-specific policy document. Fully offline. |
docs | Generate tool schemas and a Markdown reference page from a plugin's manifest. Fully offline. |
package | Build a plugin's release binary and zip it with its manifest into a bundle ready for publish. Builds only for this host's architecture: publishing both amd64 and arm64 needs a build on each. Fully offline (aside from cargo build's own dependency resolution). |
publish | Publish a custom operations plugin bundle (ZIP) to your workspace. |
list | List operations plugins: every built-in and published custom plugin a stack can declare, or only the ones a deployment declares. |
invoke | Invoke an operation the deployment declares and wait for its result. |
| Flag | Description |
|---|---|
--json | Emit machine-readable JSON. |
Examples:
# Scaffold a new plugin
alien operations init my-plugin
# Validate its manifest and check its generated metadata
alien operations check
# Run its own test suite
alien operations test
# See what AWS IAM permissions it needs
alien operations permissions --cloud aws
# Build a release binary and zip it into a bundle
alien operations package
# Publish a custom plugin bundle
alien operations publish ./postgres-operations-1.0.0.zip
# List plugins a stack can declare in operations()
alien operations list
# List the plugins a deployment declares
alien operations list --deployment mycustomer/prod
# Invoke a declared operation without an AI agent
alien operations invoke --deployment mycustomer/prod \
--operation kubernetes/get-pods \
--params '{"namespace": "default", "maxResults": 10}'alien operations init
Scaffold a new operations plugin from the public SDK. Fully offline.
alien operations init [OPTIONS] <NAME> [DIRECTORY]| Argument | Description |
|---|---|
<NAME> | Plugin name (kebab-case), also used as the crate name. |
[DIRECTORY] | Destination directory. Defaults to ./<name>. |
| Flag | Description |
|---|---|
--json | Emit machine-readable JSON. |
alien operations check
Validate a plugin's manifest, then build and run its required generate-metadata binary and fail if metadata.json differs from the metadata its typed operations generate. Needs no platform account; cargo may download the plugin's dependencies.
alien operations check [OPTIONS] [DIRECTORY]| Argument | Description |
|---|---|
[DIRECTORY] | Plugin directory containing metadata.json. Defaults to the current directory. |
| Flag | Description |
|---|---|
--manifest-only | Only validate metadata.json. Does not build or run any plugin code, so it is safe for a plugin you do not trust. |
--json | Emit machine-readable JSON. |
alien operations test
Run a plugin's own test suite (cargo test in its directory). Fully offline.
alien operations test [OPTIONS] [DIRECTORY]| Argument | Description |
|---|---|
[DIRECTORY] | Plugin directory. Defaults to the current directory. |
| Flag | Description |
|---|---|
--json | Emit machine-readable JSON. |
alien operations permissions
Compile a plugin's declared permission requirements into a cloud-specific policy document. Fully offline.
alien operations permissions [OPTIONS] --cloud <CLOUD> [DIRECTORY]| Argument | Description |
|---|---|
[DIRECTORY] | Plugin directory containing metadata.json. Defaults to the current directory. |
| Flag | Description |
|---|---|
--cloud <CLOUD> | Cloud to generate a policy for. Values: aws, gcp, kubernetes, azure. |
--permission <PERMISSION> | Kubernetes installation permission mode. Values: diagnostics, remediation. Default: diagnostics. |
--s3-bucket-arn <S3_BUCKET_ARN> | Exact S3 bucket ARN allowed by the installation. May be repeated. |
--sqs-queue-arn <SQS_QUEUE_ARN> | Exact SQS queue ARN allowed by the installation. May be repeated. |
--gcs-bucket <GCS_BUCKET> | Exact Cloud Storage bucket name allowed by the installation. May be repeated. |
--builtin | Compile reviewed built-in source definitions. Custom plugins must use named AWS capabilities. |
--json | Emit machine-readable JSON. |
alien operations docs
Generate tool schemas and a Markdown reference page from a plugin's manifest. Fully offline.
alien operations docs [OPTIONS] [DIRECTORY]| Argument | Description |
|---|---|
[DIRECTORY] | Plugin directory containing metadata.json. Defaults to the current directory. |
| Flag | Description |
|---|---|
--json | Emit machine-readable JSON. |
alien operations package
Build a plugin's release binary and zip it with its manifest into a bundle ready for publish. Builds only for this host's architecture: publishing both amd64 and arm64 needs a build on each. Fully offline (aside from cargo build's own dependency resolution).
alien operations package [OPTIONS] [DIRECTORY]| Argument | Description |
|---|---|
[DIRECTORY] | Plugin directory. Defaults to the current directory. |
| Flag | Description |
|---|---|
--json | Emit machine-readable JSON. |
alien operations publish
Publish a custom operations plugin bundle (ZIP) to your workspace.
alien operations publish [OPTIONS] <BUNDLE>| Argument | Description |
|---|---|
<BUNDLE> | Path to the plugin bundle ZIP (contains metadata.json + binaries). |
| Flag | Description |
|---|---|
--json | Emit machine-readable JSON. |
alien operations list
List operations plugins: every built-in and published custom plugin a stack can declare, or only the ones a deployment declares.
alien operations list [OPTIONS]| Flag | Description |
|---|---|
--deployment <DEPLOYMENT> | Only the plugins this deployment declares. Deployment ID, or <deployment-group-name>/<deployment-name>. |
--json | Emit machine-readable JSON. |
alien operations invoke
Invoke an operation the deployment declares and wait for its result.
alien operations invoke [OPTIONS] --deployment <DEPLOYMENT> --operation <OPERATION>| Flag | Description |
|---|---|
--deployment <DEPLOYMENT> | Deployment ID, or <deployment-group-name>/<deployment-name>. |
--operation <OPERATION> | Operation name in <plugin>/<operation> form. |
--params <PARAMS> | Operation parameters as JSON. Default: {}. |
--timeout <TIMEOUT> | Timeout in seconds. Default: 60. |
--request-access | If the operation requires approval, automatically create an access request instead of printing instructions. |
--access-duration <ACCESS_DURATION> | Approval duration to request with --request-access, e.g. 1h, 30m. Default: 1h. |
--json | Emit machine-readable JSON. |
alien access-requests
Request, approve, and deny time-boxed operation access.
alien access-requests [OPTIONS] <COMMAND>| Subcommand | Description |
|---|---|
create | Create an access request: an operations grant (exact <plugin>/<operation> or wildcard <plugin>/*), a remote-debugging grant (--debug-tool), or both. |
get | Get an access request by id. |
wait | Wait for an access request to be approved by the customer. |
approve | Approve someone else's queued access request. |
deny | Deny someone else's queued access request. |
revoke | Revoke an access request: pending operations fail and open debug sessions stop. |
| Flag | Description |
|---|---|
--json | Emit machine-readable JSON. |
alien access-requests create
Create an access request: an operations grant (exact <plugin>/<operation> or wildcard <plugin>/*), a remote-debugging grant (--debug-tool), or both.
alien access-requests create [OPTIONS] --deployment <DEPLOYMENT>| Flag | Description |
|---|---|
--deployment <DEPLOYMENT> | Deployment ID, or <deployment-group-name>/<deployment-name>. |
--operation <OPERATION> | Operation to request: an exact <plugin>/<operation>, or a wildcard <plugin>/* covering every operation the plugin exposes right now. |
--params <PARAMS> | Operation parameters as JSON. Only valid for an exact operation. |
--max-risk <MAX_RISK> | Highest risk tier a wildcard grant may cover: read-only | mutating | destructive. Required for a wildcard operation. |
--debug-tool <DEBUG_TOOL> | Remote-debugging tool to request access for: kubectl | aws | gcloud | az. May be combined with --operation to request both in one row. |
--debug-namespace <DEBUG_NAMESPACE> | Kubernetes namespace to scope a kubectl debug grant to. Requires --debug-tool kubectl. |
--debug-cloud-scope <DEBUG_CLOUD_SCOPE> | Cloud account/project/subscription to scope an aws/gcloud/az debug grant to (e.g. an AWS account id, a GCP project id). Requires --debug-tool set to that provider. |
--duration <DURATION> | Requested approval duration, e.g. 1h, 30m. Approvals cannot extend past this deadline. |
--json | Emit machine-readable JSON. |
--title <TITLE> | Human-readable title. Defaults to the operation or pattern. |
--reason <REASON> | Why access is needed. |
alien access-requests get
Get an access request by id.
alien access-requests get [OPTIONS] <ID>| Argument | Description |
|---|---|
<ID> |
| Flag | Description |
|---|---|
--json | Emit machine-readable JSON. |
alien access-requests wait
Wait for an access request to be approved by the customer.
alien access-requests wait [OPTIONS] <ID>| Argument | Description |
|---|---|
<ID> |
| Flag | Description |
|---|---|
--timeout <TIMEOUT> | Timeout in seconds. Default: 3600. |
--json | Emit machine-readable JSON. |
alien access-requests approve
Approve someone else's queued access request.
alien access-requests approve [OPTIONS] <ID>| Argument | Description |
|---|---|
<ID> |
| Flag | Description |
|---|---|
--duration <DURATION> | How long the approval lasts, e.g. 30m, 2h. It never runs past the deadline the requester asked for. Defaults to the longest allowed. |
--json | Emit machine-readable JSON. |
alien access-requests deny
Deny someone else's queued access request.
alien access-requests deny [OPTIONS] <ID>| Argument | Description |
|---|---|
<ID> |
| Flag | Description |
|---|---|
--yes | Skip the confirmation prompt. |
--json | Emit machine-readable JSON. |
alien access-requests revoke
Revoke an access request: pending operations fail and open debug sessions stop.
alien access-requests revoke [OPTIONS] <ID>| Argument | Description |
|---|---|
<ID> |
| Flag | Description |
|---|---|
--reason <REASON> | Why the grant is withdrawn (kept in the audit trail). |
--json | Emit machine-readable JSON. |
alien debug
Run a local command against a deployment using manager-side credentials.
alien debug [OPTIONS] [DEPLOYMENT] [-- <CMD>...] [COMMAND]| Subcommand | Description |
|---|---|
shell | Open an interactive shell in the deployment runtime. |
exec | Run a non-interactive command in the deployment runtime. |
| Argument | Description |
|---|---|
[DEPLOYMENT] | Deployment ID (dep_...) or <group>/<name>. |
[CMD]... | Command and arguments to execute. Everything after -- is forwarded verbatim. If omitted, an interactive shell ($SHELL, or /bin/sh) is spawned instead. |
| Flag | Description |
|---|---|
--access-request <ACCESS_REQUEST> | Access request id (ar_...) authorizing this debug session. Required for Remote Operator (pull-mode Kubernetes) deployments and for push-mode AWS, GCP and Azure deployments, where debugging shares the same approval flow as alien operations invoke. Create one with alien access-requests create --debug-tool <kubectl|aws|gcloud|az> .... |
--request-access | Shortcut: create a debug-tool access request for this deployment, wait for it to be approved, then start the session against it. Creates the same access-request resource as alien access-requests create --debug-tool .... |
--access-duration <ACCESS_DURATION> | Requested approval duration for --request-access, e.g. 30m, 1h. Informational until approved; the approver sets the actual grant window. Default: 30m. |
--access-cloud-scope <ACCESS_CLOUD_SCOPE> | Scope the --request-access grant to a specific cloud account/project/ subscription, e.g. 123456789012/prod-readonly. Only meaningful for aws/gcloud/az (kubectl scopes by namespace, derived automatically from the debugged command). Omit for an unscoped grant covering the whole deployment's cloud identity. |
--json | Emit errors as JSON. The spawned command's stdout/stderr are always passed through unchanged. |
Examples:
alien debug dep_abc123 -- aws sts get-caller-identity
alien debug acme/prod -- gcloud projects list
alien debug acme/prod -- kubectl get pods
# Remote Operator (pull-mode Kubernetes) and push-mode AWS, GCP and Azure
# deployments require an approved access request covering the tool and
# the namespace or scope you're debugging:
alien access-requests create --deployment acme/prod \
--debug-tool kubectl --debug-namespace acme --duration 30m
alien debug acme/prod --access-request ar_123 -- kubectl get pods -n acme
# Or request access, wait for approval and run in one step:
alien debug acme/prod --request-access -- aws sts get-caller-identity
# No `--` arg drops you into a local interactive shell with the env set:
alien debug acme/prod
# Open an interactive shell in a Local deployment runtime:
alien debug shell acme/prod
# Run a non-interactive command in a Local deployment runtime:
alien debug exec acme/prod -- uname -a
alien debug exec acme/prod -- powershell.exe -NoLogo -Command Get-ProcessSee also: /docs/production/remote-operator/debug.
alien debug shell
Open an interactive shell in the deployment runtime.
alien debug shell [OPTIONS] <DEPLOYMENT>| Argument | Description |
|---|---|
<DEPLOYMENT> | Deployment ID (dep_...) or <group>/<name>. |
| Flag | Description |
|---|---|
--resource <RESOURCE> | Container or daemon resource ID to attach to. |
--machine <MACHINE> | Machine ID to attach to directly. |
--reason <REASON> | Why you open the session; recorded in the machine's transcript. |
--json | Emit errors as JSON. |
Examples:
alien debug shell acme/prodalien debug exec
Run a non-interactive command in the deployment runtime.
alien debug exec [OPTIONS] <DEPLOYMENT> -- <CMD>...| Argument | Description |
|---|---|
<DEPLOYMENT> | Deployment ID (dep_...) or <group>/<name>. |
<CMD>... | Command and arguments to execute remotely. |
| Flag | Description |
|---|---|
--resource <RESOURCE> | Container or daemon resource ID to attach to. |
--machine <MACHINE> | Machine ID to attach to directly. |
--timeout-seconds <TIMEOUT_SECONDS> | Timeout in seconds for the remote command. Default: 120. |
--reason <REASON> | Why you open the session; recorded in the machine's transcript. |
--json | Emit structured JSON with captured output. |
Examples:
alien debug exec acme/prod -- uname -a
alien debug exec acme/prod -- powershell.exe -NoLogo -Command Get-ProcessCustomers and deployments
Every flag of alien onboard, alien deployment-groups, alien deploy, alien deployments, alien status, alien destroy and alien vault.
Keys, tokens and instances
Every flag of alien api-keys, alien tokens, alien approve, alien devices, alien instances, alien domains and alien serve.