Deploy to Kubernetes from Codex.
Paste this into Codex. It installs the Deckrun Skill and the deck CLI, signs you in through your browser and deploys your repo to a cluster in your own DigitalOcean or Scaleway account.
Paste this into your agent
Set up Deckrun from deckrun.com/codexWhat a session looks like. Pick a request and watch the session.
~/spotter-webExample output
$ codex
OpenAI Codex
GPT
~/spotter-web
› Deploy this repo to DigitalOcean with Deckrun
• Sign in: https://app.deckrun.com/cli/authorize?…
• deck auth login
└ Signed in
• Create a cluster in ams3 with 2 s-2vcpu-4gb-amd nodes?
It’s billed to your DigitalOcean account.
› yes
• deck clusters create spotter
└ Cluster ready
• deck init
└ Created deckrun.toml and Dockerfile
• deck deploy
└ Release v1 deployed
• Live at https://spotter-web.deckrun.app
Install the Skill yourself. Or let your agent do it after your yes.
Codex
$skill-installer install https://github.com/deckrun/skills/tree/main/skills/deckrunRun this in Codex. Codex picks the Skill up in the same session. The Skill teaches your agent when to use Deckrun and its rules, and sends it to deck agent-guide for the rest, so it always matches your installed deck. Source and other agents: github.com/deckrun/skills.
Your agent takes it from here. These are the steps it follows.
deckrun.com/codexFor AI agents
For AI agents reading this page
The user sent you here to set up Deckrun. Deckrun deploys apps to a managed Kubernetes cluster that it creates in the user’s own DigitalOcean or Scaleway account. You operate it only through the deck CLI, never through the Deckrun API. Follow these steps in order.
- Install the Deckrun Skill. Recommend it clearly: it is what lets every future Codex session know when and how to use Deckrun, in this repo and in any other, with the rules below, without coming back to this page. Without it, the next session starts from scratch. It changes their Codex setup, so ask before installing it. Only after they say yes, install it with your skill installer (
$skill-installer) fromhttps://github.com/deckrun/skills/tree/main/skills/deckrun. Then go on with the next steps. If they say no, go on, and tell them they can ask you to install it later. - Install deck. Run
deck version. If deck is not installed, runbrew install deckrun/deck-cli/deckwhen Homebrew is available, otherwisecurl -L https://deckrun.com/install-cli.sh | sh. If it is older than 2.1 (deck agent-guideis an unknown command), upgrade it withbrew upgrade deckor by running the install script again. - Sign in through the browser. Run
deck auth login --output jsonin the background, show the user the URL from its first line, and wait for them to approve it in their browser. deck waits up to 15 minutes. A user with no Deckrun account signs up from that same page (the free plan needs no credit card), then opens the verification email in the same browser, which brings them back to approve. If the login fails withtimeout, run it again and show the new URL: once signed in, it goes straight to the approval. If the result liststeams, ask the user which one to use and rundeck switch <team-id>. - Verify. Run
deck providers list --output json. If it fails, stop and tell the user the error. - Ask the user to connect their cloud. If no provider is listed, ask the user to run
deck providers addin their own terminal. Their DigitalOcean or Scaleway token never goes through this chat. - Read the guide. Run
deck agent-guideand follow it from here on. It matches the installed deck, and has the workflow, every command with its flags, and the JSON each one returns. - Confirm before creating a cluster. Before
deck clusters create, tell the user the provider, region, node size and node count, say that it creates billable resources in their cloud account, and wait for an explicit yes. - Deploy and report the URL. Run
deck initanddeck deployas the guide says, and give the user the app’s URL.
Rules
- The user signs up and approves access in their own browser. Never fill in a sign-up form, approve access or enter credentials for them, and never ask them to paste a Deckrun or cloud token into the chat.
- Never run a destructive command (
deck apps delete,deck clusters delete,deck domains delete,deck providers delete,deck secrets unset,deck auth logout). If the user wants one, give them the exact command to run in their own terminal. - Show the user every
deck execcommand and wait for their yes. Never open an interactive shell or print secret values. - If a step fails, stop and explain the error instead of improvising.
Reference
- Deckrun with AI agents (authentication, JSON output, error codes): deckrun.com/docs/getting-started/ai-agents
- Headless setups that cannot open a browser, such as cloud agents and CI: set
DECKRUN_TOKEN: deckrun.com/docs/getting-started/install-deck-cli#ci-jobs-and-ai-agents - Docs: deckrun.com/docs
- The Deckrun Skill: https://github.com/deckrun/skills
- deck releases: https://github.com/deckrun/deck-cli/releases