CLI commands
Commands are exposed by the apitogo binary (@lukoweb/apitogo). The CLI is the source of
truth for init, config, deploy, status, teardown, project create, and check. MCP tools spawn these
same commands so agents and humans get identical behavior.
Lifecycle (prefer these)
| Command | Role |
|---|---|
create | Guided setup in a new folder (--template full for every service) |
init | Create a project in the current folder |
config | Write or update apitogo.config.json (interactive or flags) |
run | Local preview server |
build | Production build (--preview to serve locally) |
check | Publish readiness (secrets, manifest, site validation) |
project create | Create the platform project (Free plan in version 2) and link the folder |
project use | Move the folder to another existing project |
deploy | Deploy the portal, gateway, sign-in and plans |
status | Account, project, and live readiness |
teardown --yes | Delete the linked platform project |
Scaffold and config
| Command | Role |
|---|---|
init [dir] | Folder (default: the current one); --name, --yes, --dry-run, --force, --json |
config | Interactive on TTY; flags: --openapi, --page-*, --plan, --backend, --theme, --patch, --json |
init uses an existing docs/ folder in place. See Install the CLI.
See Make config (CLI) for all config flags.
Local development
| Command | Role |
|---|---|
run | Run the local portal server (--port, --open, --ssr) |
build | Production static build |
build --preview | Build then serve locally |
Platform (requires API credentials)
| Command | Role |
|---|---|
project create | Create the platform project only: chooses the hosting plan, waits for hosting and writes project.id |
project use <id> | Move the folder to another existing project |
check | Dry-run publish readiness |
deploy | Deploy every service in the config (and create the project on the first run) |
deploy --only <service> | Limit to portal, gateway, identity or plans |
deploy --force | Redeploy selected resources even when healthy |
deploy --resume-from | Resume interrupted publish |
status | Whoami + project + live verification |
teardown --yes | Delete platform project (confirmation required) |
Env: APITOGO_API_KEY_ID, APITOGO_API_SECRET. Optional: APITOGO_API_URL.
Config version 2: add a service
Code
add puts one service (portal, gateway, identity or plans) into apitogo.config.json. In a
terminal it asks for what you did not pass as a flag: for the gateway how it reaches your API
(an address you host, or code the platform runs, with the folder, runtime and version) and which
OpenAPI file to use. For an OIDC identity it asks for the issuer, and for external docs the address
of the docs site. It shows the change and asks before it writes.
Some services need another one. plans needs the gateway and an identity source, and a portal that
requires login needs an identity source. add then offers to add the missing service first, asks
for its values, and goes on with the one you named.
With --yes, --json or without a terminal it never asks: a missing value is an error that names
the flag to pass, and --dry-run shows the change without writing it.
Config version 2: create the project, then deploy
Code
project create makes the platform project, selects the Free plan (or the plan from --plan),
waits for the hosting that the enabled services need, and writes project.id into
apitogo.config.json. deploy then publishes each service. It needs the project id from
project.id, from --project-id, or from APITOGO_DEFAULT_PROJECT_ID, and says so when it has
none.
project create option | In version 2 |
|---|---|
--name | Optional. Defaults to project.name |
--description | Optional |
--plan | free (default), starter or professional. See below |
--no-open | Print the checkout link of a paid plan and do not open the browser |
--modules | Ignored. The modules come from the config (the portal needs one) |
--no-wait | Return before the hosting is ready |
--json | Print raw JSON only |
deploy option | In version 2 |
|---|---|
--only | portal, gateway, identity, plans (comma-separated) |
--env | Static Web App environment (default: production) |
--force | Redeploy even when nothing changed |
--resume-from | Resume the publish ledger from a step id |
--no-wait | Do not wait for long-running jobs |
Selling paid plans needs Starter or Professional
A project on the Free platform plan can only publish free plans, and its limits are capped. To charge your customers, create the project on a paid platform plan:
Code
The command makes the project, then prints a link to the platform's own checkout (and opens it in
your browser). You pay there, and the command waits until the payment is confirmed (up to 15
minutes) before it waits for the hosting. If it stops early, run the same command again: it
continues the same project and does not start a second checkout. With --json the command prints
the link and exits, and a later run continues.
Only a new project can be created on a paid plan. A project that is already on the Free plan, or on the other paid plan, is not moved: create a new project in a new folder, or change the plan in the web app.
This is what you pay APItoGo for hosting. What your customers pay you for your plans is separate
(see plans.billing in the config).
See Walkthrough: from an empty folder to a customer's first call.
Move a folder to another project
Code
project use <id> points the folder at another project you own, for good. It checks that the
project exists, writes its id into project.id and clears the folder's deploy record, so the next
deploy sets up every service in the new project. The old project is left as it is (teardown
deletes it).
- A folder that already deploys to a project asks first. Pass
--yesto skip the question, which scripts and--jsonneed. - Secrets, such as the Stripe keys, belong to each project: set them again with
apitogo secrets set. - The people who signed up to the old portal, and their API keys, stay with the old project.
Hand-edit exceptions
| Change | Where |
|---|---|
| Home page content | apitogo/portal/landing/LandingPage.tsx |
| Site footer | apitogo/portal/footer/Footer.tsx |
| Colors and fonts | apitogo/portal/theme.json |
There is no CLI command for arbitrary home page content.