@lukoweb/apitogo 0.1.77 → 0.1.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,80 @@
1
+ ---
2
+ title: CLI commands
3
+ description: APItoGo CLI command catalog by category.
4
+ sidebar_icon: wrench
5
+ ---
6
+
7
+ Commands are exposed by the **`apitogo`** binary (`@lukoweb/apitogo`). Platform commands delegate to
8
+ `@lukoweb/apitogo-mcp` (`apitogo-apply`, `apitogo-status`, `apitogo-teardown`).
9
+
10
+ ## Lifecycle (prefer these)
11
+
12
+ | Command | Role |
13
+ | ------- | ---- |
14
+ | `init` | Scaffold portal locally (no platform calls) |
15
+ | `config` / `make-config` | Write or update `apitogo.config.json` (interactive: OpenAPI, pages, plans) |
16
+ | `dev` | Local preview server |
17
+ | `build` | Production build (`--preview` to serve locally) |
18
+ | `apply` | Publish config to platform (apihub + portal) |
19
+ | `status` | Account, project, and live readiness |
20
+ | `teardown --yes` | Delete the linked platform project |
21
+
22
+ ## Scaffold and config
23
+
24
+ | Command | Role |
25
+ | ------- | ---- |
26
+ | `init [dir]` | Create `package.json`, stubs, and initial `apitogo.config.json` |
27
+ | `config` | Merge pages nav, wire OpenAPI, patch site/theme/auth; `-i` wizard for OpenAPI, custom pages, plans |
28
+
29
+ `npm create @lukoweb/apitogo@latest` is an interactive alternative to `init` for new folders.
30
+
31
+ See [Make config (CLI)](../configuration/make-config.mdx) for all `config` flags.
32
+
33
+ ## Local development
34
+
35
+ | Command | Role |
36
+ | ------- | ---- |
37
+ | `dev` | Run Vite dev server (`--port`, `--open`, `--ssr`) |
38
+ | `build` | Production static build |
39
+ | `build --preview` | Build then serve locally |
40
+
41
+ ## Platform (requires API credentials)
42
+
43
+ | Command | Role |
44
+ | ------- | ---- |
45
+ | `apply` | Full publish — project, plans, apihub, portal backend/frontend |
46
+ | `apply --only <resource>` | Limit to `apihub`, `portal-backend`, or `portal-frontend` |
47
+ | `apply --force` | Redeploy selected resources even when healthy |
48
+ | `apply --platform-plan` | Select Free / Starter / Professional hosting |
49
+ | `apply --resume-from` | Resume interrupted publish |
50
+ | `status` | Whoami + project + live verification |
51
+ | `teardown --yes` | Delete platform project (confirmation required) |
52
+
53
+ Env: `APITOGO_API_KEY_ID`, `APITOGO_API_SECRET`. Optional: `APITOGO_API_URL`, `APITOGO_MCP_PATH`.
54
+
55
+ ## Hand-edit exceptions
56
+
57
+ | Change | Where |
58
+ | ----------------- | -------------------------------------------------- |
59
+ | Home page content | `landing/LandingPage.tsx` |
60
+ | Site footer | `apitogo.config.json` → `modules.landing.content.footer` |
61
+
62
+ There is no CLI command for arbitrary home page content.
63
+
64
+ ## Removed commands
65
+
66
+ These print a redirect message — use the replacement:
67
+
68
+ | Removed | Use instead |
69
+ | ------- | ----------- |
70
+ | `deploy` | `apitogo apply` (optionally `--only portal-frontend`) |
71
+ | `preview` | `apitogo build --preview` or `apitogo dev` |
72
+ | `remove` | `apitogo teardown --yes` |
73
+ | `configure-github-workflow` | `apitogo apply` |
74
+
75
+ ## Related
76
+
77
+ - [Overview](./overview.md)
78
+ - [Shape](./shape.md)
79
+ - [Go live](./go-live.md)
80
+ - [MCP tools](../mcp/tools.md) — agent tool catalog
@@ -0,0 +1,122 @@
1
+ ---
2
+ title: Go live with CLI
3
+ description:
4
+ Publish an APIToGo developer portal with apitogo apply — platform plans, secrets, and status.
5
+ sidebar_icon: rocket
6
+ ---
7
+
8
+ **Go live** publishes your shaped portal to APItoGo hosting, optionally deploys the backend, upserts
9
+ gateway plans, and verifies the live site. `apitogo apply` uses the same engine as MCP
10
+ `publish_dev_portal`.
11
+
12
+ ## Before you publish
13
+
14
+ 1. Confirm **gateway / API plans** in `apitogo.config.json`. Do not invent Free + Pro unless you
15
+ chose them.
16
+ 2. Save secrets in the site **`.env`** (never commit or paste into tickets):
17
+
18
+ ```sh
19
+ APITOGO_CONFIG_AUTHENTICATION__OIDC__AUTHORITY=https://login.example.com
20
+ APITOGO_CONFIG_AUTHENTICATION__OIDC__CLIENT_ID=your-client-id
21
+ APITOGO_CONFIG_AUTHENTICATION__OIDC__CLIENT_SECRET=your-client-secret
22
+ # Only when you have paid project plans:
23
+ APITOGO_CONFIG_AUTHENTICATION__STRIPE__SECRET_KEY=sk_test_...
24
+ APITOGO_CONFIG_AUTHENTICATION__STRIPE__WEBHOOK_SECRET=whsec_...
25
+ ```
26
+
27
+ 3. Export platform credentials and choose a **platform hosting** plan: **Free**, **Starter**, or
28
+ **Professional**. Starter and Professional use Stripe checkout on the platform.
29
+
30
+ **Free** cannot publish **paid gateway plans** (`priceAmount > 0`) or attach a **custom domain**.
31
+ If your manifest has paid API tiers, use Starter or Professional — see
32
+ [Gateway plans](../configuration/plans.md).
33
+
34
+ ```bash
35
+ export APITOGO_API_KEY_ID=apk_...
36
+ export APITOGO_API_SECRET=...
37
+ ```
38
+
39
+ ## Happy path
40
+
41
+ ```bash
42
+ cd ./my-portal
43
+ apitogo apply --platform-plan free
44
+ apitogo status
45
+ ```
46
+
47
+ `apitogo apply`:
48
+
49
+ - Creates or links the platform project
50
+ - Provisions modules and syncs gateway plans
51
+ - Deploys the API hub (when configured)
52
+ - Updates the portal backend (including auth API URL in `.env`) and builds + deploys the portal frontend
53
+
54
+ If apply is blocked, fix the reported checklist (missing secrets, plan, OpenAPI). Do not invent
55
+ credentials.
56
+
57
+ After success, register **`manualSteps.oidcRedirectUri`** in your IdP. When Stripe is required for
58
+ paid gateway plans, create a webhook at `manualSteps.stripeWebhookUrl` for the listed events.
59
+
60
+ Do not treat warm-pool URLs as live until apply and status succeed.
61
+
62
+ ## Target specific resources
63
+
64
+ ```bash
65
+ apitogo apply --only apihub
66
+ apitogo apply --only portal-backend
67
+ apitogo apply --only portal-frontend
68
+ apitogo apply --only apihub,portal-frontend
69
+ apitogo apply --only portal-frontend --force
70
+ ```
71
+
72
+ | Resource | What it updates |
73
+ | ---------------- | ---------------------------------------------------- |
74
+ | `apihub` | Gateway plans/baseline, API hub package + deploy |
75
+ | `portal-backend` | Dev-portal module settings and plan catalog |
76
+ | `portal-frontend` | Site build + Static Web App deploy |
77
+
78
+ Omit `--only` to apply all three. Use `--force` to redeploy even when hashes match.
79
+
80
+ ## Other apply flags
81
+
82
+ | Flag | Purpose |
83
+ | ---- | ------- |
84
+ | `--project-id` | Override project GUID |
85
+ | `--project-name` | Display name when creating a project |
86
+ | `--platform-plan` | `free` \| `starter` \| `professional` |
87
+ | `--resume-from` | Resume publish ledger from step id |
88
+ | `--no-wait` | Do not wait for long-running jobs |
89
+ | `--json` | Print raw JSON result only |
90
+
91
+ Resume state is stored in `.apitogo/publish-state.json`.
92
+
93
+ ## After publish
94
+
95
+ ```bash
96
+ apitogo status # account + project + live checks
97
+ apitogo status --skip-live # skip live health probes
98
+ apitogo teardown --yes # delete the platform project
99
+ ```
100
+
101
+ ## Platform plan vs API plans
102
+
103
+ | Kind | Meaning | How |
104
+ | ---------------- | ------------------------------------------- | ---------------------- |
105
+ | Platform hosting | Free / Starter / Professional on APItoGo | `--platform-plan` |
106
+ | Gateway / API | End-user SKUs and rate limits on `/pricing` | `apitogo.config.json` — [Gateway plans](../configuration/plans.md) |
107
+
108
+ ## CLI apply vs MCP publish
109
+
110
+ | Path | Use when |
111
+ | ----------------------- | -------------------------------------------------- |
112
+ | `apitogo apply` | Terminal, CI, scripts — full product go-live |
113
+ | MCP `publish_dev_portal` | Agent-driven go-live with the same engine |
114
+
115
+ ## Related
116
+
117
+ - [Shape](./shape.md)
118
+ - [Commands](./commands.md)
119
+ - [Authentication](../configuration/authentication.md)
120
+ - [Manifest](../configuration/manifest.md)
121
+ - [Gateway plans](../configuration/plans.md)
122
+ - [MCP go live](../mcp/go-live.md)
@@ -0,0 +1,89 @@
1
+ ---
2
+ title: CLI overview
3
+ description:
4
+ Use the APItoGo CLI to scaffold, shape, preview, and publish API products without an AI agent.
5
+ sidebar_icon: terminal
6
+ ---
7
+
8
+ The **`apitogo`** CLI lets you manage developer portals from the terminal. You scaffold and shape
9
+ local files, preview with `apitogo dev`, and publish to APItoGo hosting with `apitogo apply`.
10
+
11
+ **First time?** Install and wire credentials → **[Install the CLI](./setup.md)**. Then follow
12
+ [Shape](./shape.md) and [Go live](./go-live.md).
13
+
14
+ ## What you get
15
+
16
+ - Scaffold a local portal site (`npm create @lukoweb/apitogo@latest` or `apitogo init`)
17
+ - Shape OpenAPI, plans, docs pages, and site title via `apitogo config -i` and file edits
18
+ - Preview locally (`apitogo dev`)
19
+ - Publish to APItoGo hosting (`apitogo apply`) with platform plans **Free**, **Starter**, or
20
+ **Professional**
21
+ - Check live status (`apitogo status`) and tear down (`apitogo teardown --yes`)
22
+
23
+ ## Prerequisites
24
+
25
+ ### Shell environment (for apply / status / teardown)
26
+
27
+ | Variable | Required | Purpose |
28
+ | ----------------------- | -------- | ----------------- |
29
+ | `APITOGO_API_KEY_ID` | Yes | Platform API auth |
30
+ | `APITOGO_API_SECRET` | Yes | Platform API auth |
31
+
32
+ ### Local machine
33
+
34
+ - Node.js 20+ (scaffold, build, preview)
35
+ - Network access to the npm registry during install/build
36
+ - OIDC credentials at publish time (site `.env` only — never in shell history for sharing)
37
+ - Stripe secrets at publish only when you have **paid** project plans
38
+
39
+ ## Changing your site
40
+
41
+ | Approach | When it helps |
42
+ | -------- | ------------- |
43
+ | **`apitogo config`** | Wire OpenAPI, custom pages, gateway plans, and site title from the terminal. See [Make config](../configuration/make-config.mdx). |
44
+ | **Edit files directly** | Full control — `apitogo.config.json`, `pages/**`, `landing/LandingPage.tsx`, etc. |
45
+
46
+ Common CLI shape tasks:
47
+
48
+ | Change | How |
49
+ | ----------------------------------- | ------------------------------------------------ |
50
+ | OpenAPI + API Reference nav | `apitogo config` or `apitogo config -i` (openapi) |
51
+ | Custom docs pages | `apitogo config -i` (page) or add under `pages/` |
52
+ | Gateway / API plans | `apitogo config -i` (plan) or edit manifest |
53
+ | Site title | `apitogo config -i` or `--title` |
54
+ | Theme, fonts, branding, projectId | Edit `apitogo.config.json` |
55
+
56
+ Home page content often lives in `landing/LandingPage.tsx`. Site footer can live under
57
+ `modules.landing.content.footer` in `apitogo.config.json`.
58
+
59
+ ## Config model (local site)
60
+
61
+ | File | Role |
62
+ | --------------------- | ------------------------------------- |
63
+ | `apitogo.config.json` | Site, modules, plans, auth type, apis |
64
+ | `.env` | `VITE_*` + `APITOGO_CONFIG_*` secrets |
65
+
66
+ Details: [Manifest](../configuration/manifest.md).
67
+
68
+ ## CLI vs MCP
69
+
70
+ Both paths use the same config-first model. `apitogo apply` runs the same engine as MCP
71
+ `publish_dev_portal`.
72
+
73
+ | Task | CLI | MCP (agent) |
74
+ | ----------------- | -------------------------------- | ------------------------------ |
75
+ | Scaffold | `npm create` / `apitogo init` | `create_dev_portal` |
76
+ | Shape config | `apitogo config` + file edits | `apply_product_intent` (shape) |
77
+ | Preview | `apitogo dev` | `npm run dev` / preview tool |
78
+ | Publish | `apitogo apply` | `publish_dev_portal` |
79
+ | Status / teardown | `apitogo status` / `teardown` | `verify_dev_portal_live` / `teardown_project` |
80
+
81
+ Prefer MCP when an agent should drive changes. Prefer CLI for CI, scripts, or terminal-only
82
+ workflows.
83
+
84
+ ## Next
85
+
86
+ - [Install the CLI](./setup.md)
87
+ - [Shape](./shape.md) · [Go live](./go-live.md) · [Commands](./commands.md)
88
+ - [MCP overview](../mcp/overview.md) — agent-driven workflow
89
+ - [Manifest](../configuration/manifest.md)
@@ -0,0 +1,112 @@
1
+ ---
2
+ title: Install the CLI
3
+ description:
4
+ Install and invoke the APItoGo CLI to scaffold, configure, preview, and publish developer portals.
5
+ sidebar_icon: terminal
6
+ ---
7
+
8
+ Use the **`apitogo`** CLI (`@lukoweb/apitogo`) to scaffold a local portal, shape `apitogo.config.json`,
9
+ preview with `apitogo dev`, and publish with `apitogo apply`. Platform commands (`apply`, `status`,
10
+ `teardown`) use the same engine as MCP `publish_dev_portal`.
11
+
12
+ ## Prerequisites
13
+
14
+ - **Node.js 20+**
15
+ - Platform API credentials from [apitogo.com](https://apitogo.com) when you run `apitogo apply`
16
+ (API key id + secret)
17
+
18
+ ## Install
19
+
20
+ The CLI is the npm package **`@lukoweb/apitogo`**. It exposes the **`apitogo`** binary. You do not
21
+ need a global install — scaffold commands add it to your project and `npm install` puts it on
22
+ `node_modules/.bin`.
23
+
24
+ ### New project (recommended)
25
+
26
+ `npm create` scaffolds the site **and** installs `@lukoweb/apitogo` locally:
27
+
28
+ ```bash
29
+ npm create @lukoweb/apitogo@latest
30
+ cd your-project-name
31
+ npx apitogo config -i # interactive: title, OpenAPI, pages, plans
32
+ npm run dev
33
+ ```
34
+
35
+ Also works with `pnpm create @lukoweb/apitogo`, `yarn create @lukoweb/apitogo`, or
36
+ `bunx @lukoweb/create-apitogo`.
37
+
38
+ Non-interactive example:
39
+
40
+ ```bash
41
+ npm create @lukoweb/apitogo@latest my-portal -- --yes --typescript
42
+ cd my-portal
43
+ npx apitogo config -i
44
+ ```
45
+
46
+ ### Scaffold into an existing folder
47
+
48
+ `apitogo init` writes `package.json` with `@lukoweb/apitogo` as a dependency. Run **`npm install`**
49
+ before other `apitogo` commands:
50
+
51
+ ```bash
52
+ npx @lukoweb/apitogo init ./dev-portal
53
+ cd ./dev-portal
54
+ npm install
55
+ npx apitogo config -i
56
+ npm run dev
57
+ ```
58
+
59
+ `apitogo init` is local only — it does not call the platform. After `config -i`, run `npm run dev`
60
+ to preview, then `apitogo apply` when ready to go live.
61
+
62
+ ### How to run `apitogo`
63
+
64
+ | Situation | Command |
65
+ | --------- | ------- |
66
+ | After `npm create` or `npm install` in the project | `npx apitogo <command>` (e.g. `npx apitogo config -i`) |
67
+ | Same, if `node_modules/.bin` is on your PATH | `apitogo <command>` |
68
+ | One-off, no project yet | `npx @lukoweb/apitogo <command>` |
69
+ | Optional global install | `npm install -g @lukoweb/apitogo` then `apitogo <command>` anywhere |
70
+
71
+ `npm run dev` / `npm run build` use the project-local CLI via `package.json` scripts — no global
72
+ install required.
73
+
74
+ ## Platform credentials
75
+
76
+ Export these before `apitogo apply`, `apitogo status`, or `apitogo teardown`:
77
+
78
+ | Variable | Required | Purpose |
79
+ | -------------------- | -------- | ----------------- |
80
+ | `APITOGO_API_KEY_ID` | Yes | Platform API auth |
81
+ | `APITOGO_API_SECRET` | Yes | Platform API auth |
82
+
83
+ Optional:
84
+
85
+ | Variable | Purpose |
86
+ | ------------------ | ---------------------------------------------------- |
87
+ | `APITOGO_API_URL` | Override platform API base URL |
88
+ | `APITOGO_MCP_PATH` | Local `@lukoweb/apitogo-mcp` checkout for apply/status/teardown |
89
+
90
+ Never commit secrets. Site auth secrets (OIDC, Stripe) belong in the portal **`.env`** as
91
+ `APITOGO_CONFIG_AUTHENTICATION__*` — see [Go live](./go-live.md).
92
+
93
+ ## Verify
94
+
95
+ ```bash
96
+ npx apitogo --help
97
+ ```
98
+
99
+ You should see `init`, `config`, `dev`, `build`, `apply`, `status`, and `teardown`.
100
+
101
+ With credentials set:
102
+
103
+ ```bash
104
+ apitogo status
105
+ ```
106
+
107
+ ## Next
108
+
109
+ - [CLI overview](./overview.md)
110
+ - [Shape](./shape.md) — scaffold and local preview
111
+ - [Go live](./go-live.md) — `apitogo apply`
112
+ - [Commands](./commands.md) — full catalog
@@ -0,0 +1,121 @@
1
+ ---
2
+ title: Shape with CLI
3
+ description:
4
+ Scaffold and customize a developer portal locally with apitogo init, apitogo config, and apitogo dev.
5
+ sidebar_icon: pencil-ruler
6
+ ---
7
+
8
+ **Shape** means: create or update a local portal site (OpenAPI, plans, docs pages, auth)
9
+ without publishing. You preview with `apitogo dev` or `npm run dev`.
10
+
11
+ Requires the **`apitogo`** CLI (`@lukoweb/apitogo`). If you have not installed it yet, see
12
+ [Install the CLI](./setup.md).
13
+
14
+ ## Happy path
15
+
16
+ `npm create` installs `@lukoweb/apitogo` into the new project. Then run config via `npx`:
17
+
18
+ ```bash
19
+ npm create @lukoweb/apitogo@latest my-portal -- --yes
20
+ cd my-portal
21
+ npx apitogo config -i # title, OpenAPI, pages, plans
22
+ npm run dev # http://localhost:3000
23
+ ```
24
+
25
+ Or scaffold into an existing folder (`npm install` is required after `init`):
26
+
27
+ ```bash
28
+ npx @lukoweb/apitogo init ./dev-portal --name "Books API"
29
+ cd ./dev-portal
30
+ npm install
31
+ npx apitogo config -i
32
+ npm run dev
33
+ ```
34
+
35
+ `apitogo init` does **not** call the platform. Run `apitogo apply` when you are ready to go live.
36
+
37
+ ## Interactive config (`apitogo config -i`)
38
+
39
+ After **site title**, the wizard loops until you type `done`:
40
+
41
+ | Choice | What it does |
42
+ | ------ | ------------ |
43
+ | `openapi` | Link an OpenAPI file by **relative path** in `apitogo.config.json` |
44
+ | `page` | Create `pages/<slug>.tsx` and wire it in navigation |
45
+ | `plan` | Add a gateway plan (title, price, rate limit, monthly quota) |
46
+
47
+ Authentication is **on by default** — the wizard does not ask for an auth API URL. `apitogo apply`
48
+ fills `VITE_APITOGO_AUTHENTICATION_API_BASE_URL` after the portal backend exists.
49
+
50
+ Fonts and colors are **not** prompted — edit `apitogo.config.json` or see
51
+ [Colors & theme](../customization/colors-theme.mdx).
52
+
53
+ **Paid plans:** if any plan has `priceAmount > 0`, you need **Starter** or **Professional** platform
54
+ hosting on apply. **Free** cannot publish paid gateway plans or custom domains.
55
+
56
+ Full reference: [Make config (CLI)](../configuration/make-config.mdx) · [Gateway plans](../configuration/plans.md)
57
+
58
+ ## Configure with flags
59
+
60
+ Writes or updates **`apitogo.config.json`**. Can create `package.json`, `tsconfig.json`, and portal
61
+ stubs when missing. Scans `pages/` for navigation and wires OpenAPI when a spec is found.
62
+
63
+ ```bash
64
+ npx apitogo config
65
+ npx apitogo config --title "Books API"
66
+ npx apitogo config --theme '{"light":{"primary":"#111111"}}'
67
+ npx apitogo config -i
68
+ ```
69
+
70
+ Common flags:
71
+
72
+ | Flag | Purpose |
73
+ | ---- | ------- |
74
+ | `--interactive` / `-i` | Wizard: title, OpenAPI, custom pages, plans |
75
+ | `--title` | Set `site.title` |
76
+ | `--theme`, `--site`, `--authentication` | Deep-merge JSON into config |
77
+ | `--pages-dir` | Folder to scan (default: `pages`) |
78
+ | `--force` | Rebuild Documentation nav from disk |
79
+
80
+ ## Shape by editing files
81
+
82
+ After `apitogo config`, edit the manifest and site files directly:
83
+
84
+ - **Plans, branding, backend, projectId** — `apitogo.config.json`
85
+ - **Docs pages** — `pages/**/*.mdx` or `.tsx`
86
+ - **Home page** — `landing/LandingPage.tsx`
87
+ - **Footer** — `modules.landing.content.footer` in `apitogo.config.json`
88
+
89
+ Never put OIDC or Stripe secrets in `apitogo.config.json`. Use `.env` with
90
+ `APITOGO_CONFIG_AUTHENTICATION__*` before publish.
91
+
92
+ ## Preview locally
93
+
94
+ ```bash
95
+ apitogo dev
96
+ apitogo dev --port 4000 --open
97
+ ```
98
+
99
+ Production build check:
100
+
101
+ ```bash
102
+ apitogo build
103
+ apitogo build --preview
104
+ ```
105
+
106
+ Shape-phase edits hot-reload when the dev server is running.
107
+
108
+ ## Existing docs + OpenAPI folder
109
+
110
+ If you already have `pages/` and an OpenAPI spec:
111
+
112
+ ```bash
113
+ npx @lukoweb/apitogo init .
114
+ npm install
115
+ npx apitogo config -i
116
+ npm run dev
117
+ ```
118
+
119
+ ## Next
120
+
121
+ When the site looks right, [go live](./go-live.md) with `apitogo apply`.
@@ -11,7 +11,7 @@ For docs-only sites that embed a SPA identity provider directly in the browser,
11
11
 
12
12
  ## Dev portal (recommended)
13
13
 
14
- Set authentication in `apitogo.config.json`:
14
+ Set authentication in `apitogo.config.json` (enabled by default on new scaffolds):
15
15
 
16
16
  ```json
17
17
  {
@@ -24,13 +24,14 @@ Set authentication in `apitogo.config.json`:
24
24
  }
25
25
  ```
26
26
 
27
- Backend API URL (MCP writes this at scaffold/publish):
27
+ Backend API URL (`apitogo apply` writes this to `.env` after the portal backend is provisioned):
28
28
 
29
29
  ```bash
30
30
  VITE_APITOGO_AUTHENTICATION_API_BASE_URL=https://your-dev-portal-api.example.com
31
31
  ```
32
32
 
33
- Or `authentication.apiBaseUrl` in JSON / `APITOGO_CONFIG_AUTHENTICATION__API_BASE_URL` in `.env`.
33
+ You do not need to enter this URL in `apitogo config -i`. Or set `authentication.apiBaseUrl` in JSON /
34
+ `APITOGO_CONFIG_AUTHENTICATION__API_BASE_URL` in `.env` manually.
34
35
 
35
36
  ### Local demo mode
36
37
 
@@ -3,24 +3,34 @@ title: Make config (CLI)
3
3
  navigation_label: Make config
4
4
  sidebar_icon: file-cog
5
5
  description:
6
- Create or update apitogo.config.json from your pages folder, OpenAPI, and optional site, theme, and
7
- authentication settings.
6
+ Create or update apitogo.config.json from your pages folder, OpenAPI, gateway plans, and optional
7
+ site settings.
8
8
  ---
9
9
 
10
- The **`apitogo make-config`** command writes **`apitogo.config.json`**. It can scaffold a portal
10
+ The **`apitogo config`** (alias: `make-config`) command writes **`apitogo.config.json`**. It can scaffold a portal
11
11
  project (package.json, tsconfig, landing and user-panel stubs, thin `apitogo.config.tsx`) when those
12
- files are missing, merge **site / theme / authentication** from flags or an interactive wizard, scan
13
- `pages/` for navigation, and wire OpenAPI plus an **API Reference** link.
12
+ files are missing, merge **site / theme / authentication** from flags, run an **interactive wizard**
13
+ with `-i`, scan `pages/` for navigation, and wire OpenAPI plus an **API Reference** link.
14
14
 
15
- Landing and user panel are **always enabled** on new configs. The command does **not** change
16
- `modules` from the CLI and **never edits `redirects`**.
15
+ Landing and user panel are **always enabled** on new configs. **Authentication is enabled by default**
16
+ on new scaffolds. The command does **not** change `redirects`.
17
+
18
+ ## Prerequisites
19
+
20
+ Install the CLI first — see [Install the CLI](../cli/setup.md). In short:
21
+
22
+ - **New site:** `npm create @lukoweb/apitogo@latest` (installs `@lukoweb/apitogo` into the project)
23
+ - **Existing folder:** `npx @lukoweb/apitogo init .` then `npm install`
24
+
25
+ Run config from the project root with `npx apitogo config` (or `apitogo config` if
26
+ `node_modules/.bin` is on your PATH).
17
27
 
18
28
  ## What it does
19
29
 
20
30
  1. **Ensures npm scripts** — Creates **`package.json`** (dev / build / preview) and **`tsconfig.json`**
21
31
  when missing, including `@lukoweb/apitogo`, landing, user-panel, and billing packages.
22
32
  2. **Creates `apitogo.config.json`** when missing, using the current portal template (`site`,
23
- `theme`, `authentication`, `modules.docs`, **landing on**, **user panel on**). Creates a thin
33
+ `theme`, `authentication` **enabled**, `modules.docs`, **landing on**, **user panel on**). Creates a thin
24
34
  **`apitogo.config.tsx`** wrapper only if that file does not already exist (existing TSX is left
25
35
  alone).
26
36
  3. **Patches site, theme, and auth** from `--site`, `--theme`, `--authentication`, `--title`, or
@@ -30,16 +40,41 @@ Landing and user panel are **always enabled** on new configs. The command does *
30
40
  portal-only sites) — existing navigation is left alone. Other nav items are kept. Use
31
41
  **`--force`** to rebuild Documentation items from disk when pages are present (API Reference is
32
42
  still kept when OpenAPI is wired).
33
- 5. **Wires OpenAPI** when a spec is found (or confirmed in interactive mode):
43
+ 5. **Wires OpenAPI** when a spec is found (non-interactive) or when you enter a path in `-i`:
34
44
  `apis: [{ type: "file", input, path: "api" }]` and a top-level **API Reference** link to `/api` if
35
- that link is missing.
45
+ that link is missing. Interactive mode stores a **relative file path** in `apis[0].input` (for
46
+ example `./openapi.yaml` or `../api/openapi.yaml`).
47
+ 6. **Interactive only** — can scaffold **custom pages** under `pages/` and append **gateway plans**
48
+ to `modules.userPanel.plans.items`.
49
+
50
+ ## Interactive wizard (`-i`)
51
+
52
+ ```bash
53
+ npx apitogo config -i
54
+ ```
55
+
56
+ 1. **Site title**
57
+ 2. **Loop** until you type `done`:
58
+ - **`openapi`** — path to your OpenAPI file (relative link in config; empty skips)
59
+ - **`page`** — page title + URL path (writes `pages/<slug>.tsx` and wires navigation)
60
+ - **`plan`** — plan title, price (USD/month), rate limit (calls/min), monthly quota
61
+ 3. **Wrap-up** — links to [docs.apitogo.com](https://docs.apitogo.com) for further configuration
62
+
63
+ The wizard does **not** ask for fonts, colors, logo alt text, or the auth API base URL. Authentication
64
+ stays **enabled**; `apitogo apply` writes `VITE_APITOGO_AUTHENTICATION_API_BASE_URL` to `.env` after
65
+ the portal backend is provisioned.
66
+
67
+ If you add a **paid** plan (`priceAmount > 0`), the CLI warns that **Free platform hosting cannot
68
+ publish paid gateway plans or custom domains** — use Starter or Professional on apply.
69
+
70
+ See [Gateway plans](./plans.md) and [Shape with CLI](../cli/shape.md).
36
71
 
37
72
  ## Usage
38
73
 
39
74
  Run from your project root (where `apitogo.config.json` and `package.json` live):
40
75
 
41
76
  ```bash
42
- apitogo make-config
77
+ npx apitogo config
43
78
  ```
44
79
 
45
80
  ### Options
@@ -48,7 +83,7 @@ apitogo make-config
48
83
  | ------------------------- | --------------------------------------------------------------------------- |
49
84
  | `--pages-dir <dir>` | Folder to scan for `.md` / `.mdx` / `.tsx` (default: `pages`) |
50
85
  | `--dir <path>` | Project root (default: current directory) |
51
- | `--interactive` / `-i` | Prompt for title, logo alt, auth, fonts, primary colors, and OpenAPI |
86
+ | `--interactive` / `-i` | Wizard: site title, OpenAPI path, custom pages, gateway plans |
52
87
  | `--title <string>` | Set `site.title` |
53
88
  | `--site <json>` | Deep-merge a JSON object into `site` |
54
89
  | `--theme <json>` | Deep-merge a JSON object into `theme` |
@@ -58,20 +93,25 @@ apitogo make-config
58
93
  Examples:
59
94
 
60
95
  ```bash
61
- apitogo make-config --title "Books API"
62
- apitogo make-config --theme '{"light":{"primary":"#111111"}}'
63
- apitogo make-config --interactive
96
+ npx apitogo config --title "Books API"
97
+ npx apitogo config --theme '{"light":{"primary":"#111111"}}'
98
+ npx apitogo config -i
64
99
  ```
65
100
 
66
- There is **no `--modules` flag**. Edit `modules` in `apitogo.config.json` if you need to change
67
- landing or user panel later.
101
+ Theme and fonts are edited in `apitogo.config.json` or via MCP — not in the interactive wizard. See
102
+ [Colors & theme](../customization/colors-theme.mdx) and [Fonts](../customization/fonts.md).
103
+
104
+ There is **no `--modules` flag** for landing or user-panel toggles. Interactive mode **does** update
105
+ `modules.userPanel.plans` when you add plans.
68
106
 
69
107
  ## When not to use it
70
108
 
71
109
  - You need a fully custom navigation order — skip `--force` or maintain navigation by hand.
72
- - You want to change landing or user-panel module options — edit JSON (or use MCP), not this command.
110
+ - You want to change landing module home content — edit `landing/LandingPage.tsx`.
73
111
 
74
112
  ## See also
75
113
 
76
114
  - [Manifest (`apitogo.config.json`)](./manifest.md)
115
+ - [Gateway plans](./plans.md)
77
116
  - [Navigation](./navigation.md)
117
+ - [Shape with CLI](../cli/shape.md)