deploteka-deploy-agent
v0.3.0
Published
DeploTeka local deploy agent — releases each dedicated Shopify app from your own repository, using your own Shopify CLI login.
Readme
deploteka-deploy-agent
Releases each of your dedicated Shopify apps from your own repository, using your own Shopify CLI login. Your app's source code and your Shopify session never leave your machine.
Most people never run this directly — npx deploteka starts it for you with a
token it just minted. Use it on its own when you want the release step in CI, or
on a build box.
npx deploteka-deploy-agent # interactive: asks for your DeploTeka URL and token
npx deploteka-deploy-agent --drain # release everything pending, then exit (the CI shape)What it does
It polls DeploTeka for store setups waiting at the release step, takes one at a
time under a lease, writes a shopify.app.<store>.toml next to your app, runs
shopify app deploy, reports the receipt, and removes the config file again. It
only ever receives public app configuration — never a client secret, a
Shopify session, or another tenant's anything.
A failed release hands the job straight back, so retrying is just running it again. An agent that dies mid-job loses its lease after 30 minutes.
Building once instead of once per store
Every store in a fleet runs the same app, so its extensions only need building
once. When DeploTeka asks for it, the agent hands back the bundle your Shopify
CLI just produced (.shopify/deploy-bundle.br — the exact artifact Shopify
accepted). Every store after that one is released server-side from those same
bytes: no agent, no rebuild, and no chance of two builds of one commit differing.
That upload is best-effort. If it cannot happen, the release you just ran still succeeded — the fleet simply keeps going through the agent.
Finding your Shopify CLI
In order: SHOPIFY_CLI if you set it, then the app's own
node_modules/.bin/shopify (the version your app was built against), then
shopify on PATH, then npx --yes @shopify/cli. If none of those work it says
so, and which ones it tried.
Options
Run it from inside the app repository — that working directory is the app it releases.
| | meaning |
| --- | --- |
| --drain | Release everything pending, then exit. Never prompts, and exits non-zero if a release failed. The CI shape. |
| DEPLOTEKA_TOKEN | The deploy bearer. Required with --drain; otherwise it asks. |
| DEPLOTEKA_URL | Your DeploTeka origin. Defaults to https://deploteka.com. |
| SHOPIFY_CLI | An explicit Shopify CLI command, if the four it looks for aren't right. |
Requires Node 18+.
Part of DeploTeka.
