Sealtun
First Decision
Classify the request before answering or editing:
- User operation: install, shell completion, login,
up, expose HTTPS/SSH/TCP, secure public HTTP traffic, show/set policy, audit access, create/list/revoke/rotate temporary share links, rotate server secret, plan/add/verify a custom domain, inspect state, watch withlist --watchorinspect --watch, stop/start, or clean up. Readreferences/cli.md. - Declarative configuration:
sealtun.yaml,apply -fwith--dry-run, multi-tunnel management, stable names,ttl, Pod resources, HTTPS access policies, SSH declarations, or generic TCP declarations. Readreferences/declarative.md. - Troubleshooting: login/profile mismatch, daemon/session issues, local port failures, SSH/TCP direct NodePort problems, remote Kubernetes problems, DNS, Ingress, certificate, logs, metrics, or events. Read
references/troubleshooting.md. - Skill maintenance or quality review: trigger precision, workflow scoring, or regression prompts. Read
references/evals.md.
Inside this repository, prefer current source, README, and QuickStart docs over these references when they conflict. Use rg to inspect Cobra commands and flags before changing CLI guidance.
Intent Routing
| User intent | Primary path | Verify with |
|---|---|---|
| Make a local web app, callback, preview, or webhook public | status -> up for interactive use; expose <port> for scripts |
output URL, list --check, inspect <id> |
| Make an HTTP upstream public | status -> up --target http://host:port; expose --target for scripts |
output URL, inspect <id> |
| Add HTTPS access controls | expose, policy, share, or YAML access policy |
inspect, policy show/audit, protected request |
| Expose SSH directly | expose 22 --protocol ssh |
printed host/port, inspect <id> --remote |
| Expose database, queue, MQTT, or arbitrary TCP | expose <port> --protocol tcp |
printed <host>:<node-port>, protocol client, list --check |
| Manage many tunnels or stable config | apply --dry-run --format diff, then real apply when requested |
list, inspect |
| Custom domain | domain plan first; domain add --wait only when mutation is requested |
domain verify/status |
| Debug connectivity or unclear state | status, list --check, inspect, doctor, logs |
layer-specific finding and next action |
Required Execution Flow
- Scope gate: verify the request concerns Sealtun tunnels, local-to-public exposure, Sealtun troubleshooting, or declarative Sealtun config. Do not force Sealtun into generic production, DNS-only, Kubernetes, or ordinary SSH requests.
- Select a mode: guidance gives commands without running cloud operations; live operation runs preflight, requested mutation, and verification; troubleshooting starts with non-mutating diagnostics.
- Gather minimum context. Prefer
sealtun --version,status,profile current,region current,list,inspect, anddoctor. - If not logged in, guide
sealtun loginorsealtun login <region> --profile <name>, then verify withstatus. - Do not run
up,expose, realapply,share create/revoke,domain add/clear,stop,cleanup, orlogoutunless explicitly requested. Preferapply --dry-runandapply --dry-run --format diffbefore real apply. - After live operations, report the exact command sequence, endpoint, tunnel ID, and final state without printing secrets.
Verification Contracts
up/expose: capture tunnel ID, endpoint, and protocol output; verify withlist --checkandinspect.apply: preview withapply --dry-runandapply --dry-run --format diff; after real apply verify every tunnel withlistandinspect.domain add/clear: verify withdomain statusordomain verify.share create/revoke/rotate: verify withpolicy show(temporary link metadata); never repeat a one-time token.stop/start/cleanup: verify withlistorinspect;stoppreserves entry resources whilecleanupremoves eligible resources.
Operating Rules
- Do not expose user secrets in answers, logs, commits, or generated docs. Prefer
*Envfields and environment variables. - Public access controls are enforced in the Sealtun server proxy layer. They protect HTTPS business traffic, not the internal control channel or SSH/TCP direct NodePort traffic.
- For SSH use
sealtun expose 22 --protocol sshand report the generated host and port. For generic TCP usesealtun expose <port> --protocol tcp. - For declarative work, use
apply --dry-runandapply --dry-run --format diffbefore realapplywhen feasible. - Supported tunnel protocols are
https, dedicatedssh, and generictcp; UDP/gRPC are unsupported unless the repository changes.
Response Shape
For usage questions, give a short working command sequence and only the relevant caveats. For troubleshooting, start with the lowest-cost local checks, then escalate to remote Kubernetes diagnostics.