manic deploy
Provider-aware deploy helpers after manic build.
manic deploy
manic deploy prepares or prints commands to publish your app using providers from manic.config.ts. It does not replace each vendor’s CLI—you still use Vercel, Wrangler, Netlify, etc.; Manic stitches manic build output to those workflows.
Flow
Prerequisites
- At least one
providersentry from@manicjs/providers(for examplevercel(),cloudflare(),netlify()). - Without providers the CLI exits with an error and a short
importhint.
Behavior
Source: packages/manic/src/cli/commands/deploy.ts
-
loadConfig()and readproviders(must be non-empty). -
dist=config.build.outdir ?? '.manic'. If that directory does not exist,deployrunsbuild()once (full production pipeline). -
projectNamedefaults fromconfig.app.name(slugified, elsemanic-app). -
For each provider whose
nameisvercel,cloudflare, ornetlify:- Optionally generate a starter
vercel.jsonornetlify.tomlat the repo root if missing. - Print the suggested shell command.
- Optionally generate a starter
-
If
--runor-ris present onargv,Bun.spawnruns that command with stdio inherited. Commands are split on spaces—avoid paths with spaces or edit locally.
Built-in command map
Provider name | Config file touched | Printed / run command |
|---|---|---|
vercel | vercel.json (install/build hints if missing) | bunx vercel deploy |
cloudflare | (none — Wrangler config expected from provider build) | bunx wrangler pages deploy dist --project-name <slug> |
netlify | netlify.toml if missing | bunx netlify deploy --prod |
Unknown provider.name values log a warning and skip execution—adjust manually.
Flags
| Flag | Effect |
|---|---|
--run, -r | Executes suggested commands via Bun.spawn (stdio inherited). Arguments are split on spaces—avoid paths with spaces or wrap edits manually. |
--port, --network | Parsed by the root manic binary only; deploy() ignores them. |
Examples
# Print suggested deploy commands only
manic deploy
# Build (if needed) and run provider CLIs
manic deploy --run