Automation CLI (skyportalai)
Use skyportalai for stable automation in scripts and CI/CD.
Tip
Put global options before the subcommand.
Syntax
| Option | Behavior |
|---|---|
--json |
Emit a stable JSON envelope |
--base-url URL |
Override API target for this invocation |
--version |
Print installed version and exit |
--help |
Show command help |
Configuration commands
Show effective settings
Reports API target, timeout, auth state, credential source, and config path. It never prints credential values.
Save connection settings
skyportalai config set --base-url https://app.skyportal.ai
skyportalai config set --timeout 30
skyportalai config set --base-url https://app.skyportal.ai --timeout 30
- At least one option is required.
--timeoutmust be greater than zero.- This command does not write secret credentials.
Chat commands
Start a chat
skyportalai chat send \
"Report disk usage and identify the largest directory" \
--server 42 \
--wait
skyportalai chat send MESSAGE
[--server ID]
[--chat-id ID]
[--wait]
[--timeout SECONDS]
[--poll-interval SECONDS]
--server IDtargets a server for new chat creation.--chat-id IDsends to an existing chat.--serverand--chat-idcannot be used together.--waitpolls until settled or awaiting approval.--timeoutdefault:300, must be greater than zero.--poll-intervaldefault:1, must be zero or greater.
Continue a chat
Status, messages, and waiting
skyportalai chat status 123
skyportalai chat messages 123
skyportalai chat messages 123 --after-sequence 40 --limit 100
skyportalai chat wait 123 --timeout 300 --poll-interval 1
messages pagination:
--after-sequencedefault:0, must be zero or greater.--limitdefault:100, valid range:1to500.
Approve an action
Always review status first, then approve the exact reviewed action:
skyportalai --json chat status 123
skyportalai chat approve \
123 APPROVAL_ID \
--type bash_command \
--command "EXACT REVIEWED COMMAND"
Approval type defaults to bash_command; plan is supported when requested by the server.
Reject an action
skyportalai chat reject \
123 APPROVAL_ID \
--type bash_command \
--reason "Outside the approved scope"
Cancel an active workflow
The server may return a conflict if the workflow is already idle.
JSON mode
Place --json before the subcommand:
Success envelope:
Expected failure envelope (stderr):
Exit codes
| Code | Meaning |
|---|---|
0 |
Success |
1 |
Configuration, authentication, connection, API, or workflow error |
2 |
Awaiting approval, missing args, conflicting options, or validation/usage error |
Info
Exit code 2 with status: "awaiting_approval" is an expected human-decision stop, not an API failure.
Security
- Use placeholders in scripts and docs.
- Never auto-approve destructive actions.
- Never log real credentials or private infrastructure identifiers.
- Prefer
--jsonin automation for deterministic parsing.