Make config (CLI)
The apitogo config command changes a project made by apitogo create or apitogo init
(config version 2). It edits apitogo.config.json, writes docs pages under
apitogo/portal/pages/, and keeps plans in apitogo/plans.json.
Every change to apitogo.config.json is checked against the version 2 schema before it is written.
An invalid change is refused and the file stays as it was.
The command does not create a project. In a folder without apitogo.config.json, or with an old
version 1 config, it stops and points to apitogo create.
What goes where
| You change | Where it is written |
|---|---|
| Portal display name | portal.name in apitogo.config.json |
| API code (backend) | gateway.origin (mode: managed, source, runtime, version) |
| OpenAPI file | gateway.specs in apitogo.config.json |
| Docs page | apitogo/portal/pages/<slug>.tsx, a React page (config unchanged) |
| Plan | apitogo/plans.json (or the file in plans.file) |
The portal builds its sidebar from the pages folder, so adding a page needs no navigation entry. A
page in guides/quickstart.tsx shows under a Guides section at /guides/quickstart. New pages
are React components by default; pass --page-format mdx for a Markdown page. See
Custom pages.
A page that belongs in the header's top menu instead of the sidebar (Partners, About, Contact) takes
--page-header: the React page goes to apitogo/portal/header-pages/<slug>.tsx (.mdx with
--page-format mdx) and a link is added to portal.header.links. See
Header links.
Code
Changing a gateway or plan needs that service in the project. Add it first with
apitogo add gateway or apitogo add plans.
Interactive wizard
On a TTY, bare apitogo config opens the wizard. Each answer is applied at once. Type done (the
default) to finish.
backend: folder of your API code, runtime (nodejs/python/dotnet) and versionopenapi: an OpenAPI file to add togateway.specspage: page title and URL path; writes the React pageapitogo/portal/pages/<slug>.tsxplan: title, fixed or custom price, rate limit per minute, quota per 30 days; added toplans.json
Payments go through Stripe. When you add a paid plan, apitogo deploy asks for your Stripe
secret key the first time (if the project has none yet). Free and contact-us plans need no key. Paid
plans also need Starter or Professional platform hosting.
Options
| Option | Description |
|---|---|
--interactive / -i | Force the wizard (default on TTY). Use --no-interactive to skip it. |
--title <name> | Set portal.name |
--source <dir> | Folder of your API code (gateway.origin.source, mode managed) |
--runtime <name> | Runtime of --source: nodejs (default), python or dotnet |
--runtime-version <v> | Runtime version, for example NODE_22_LTS |
--openapi <file> | Add an OpenAPI file to gateway.specs |
--page-slug <path> | Add a page at apitogo/portal/pages/<path>.tsx |
--page-format <tsx|mdx> | Format of a new page: tsx (React, the default) or mdx |
--page-title <title> | Title of the page (required when adding) |
--page-content <markdown> | Markdown body of the page |
--page-update | Change an existing page instead of adding one |
--page-header | Link the page from the header's top menu instead of the sidebar |
--plan <json> | Add a plan to plans.json, or replace the plan with the same sku |
--patch <json> | Deep-merge a JSON object into apitogo.config.json |
--json | Print a JSON summary on stdout |
A plan uses the plans.json shape:
Code
Examples:
Code