@lukoweb/apitogo 0.2.46 → 0.2.47
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.
- package/dist/cli/cli.js +949 -2977
- package/docs/cli/overview.md +91 -91
- package/docs/cli/shape.md +126 -127
- package/docs/configuration/make-config.mdx +96 -124
- package/docs/configuration/manifest.md +129 -128
- package/docs/configuration/navigation.mdx +415 -421
- package/docs/configuration/plans.md +154 -153
- package/docs/guides/custom-pages.md +111 -110
- package/package.json +1 -1
- package/src/config/v2/services.ts +1 -1
package/docs/cli/overview.md
CHANGED
|
@@ -1,91 +1,91 @@
|
|
|
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 `npx apitogo run`, and publish to APItoGo hosting with
|
|
10
|
-
`npx apitogo deploy`.
|
|
11
|
-
|
|
12
|
-
**First time?** Install and wire credentials → **[Install the CLI](./setup.md)**. Then follow
|
|
13
|
-
[Shape](./shape.md) and [Go live](./go-live.md).
|
|
14
|
-
|
|
15
|
-
## What you get
|
|
16
|
-
|
|
17
|
-
- Scaffold a local portal site (`npx @lukoweb/apitogo@latest init`)
|
|
18
|
-
- Shape backend, OpenAPI, plans, and docs pages via `npx apitogo config` and file edits
|
|
19
|
-
- Preview locally (`npx apitogo run`)
|
|
20
|
-
- Publish to APItoGo hosting (`npx apitogo deploy`) with platform plans **Free**, **Starter**, or
|
|
21
|
-
**Professional**
|
|
22
|
-
- Check live status (`npx apitogo status`) and tear down (`npx apitogo teardown --yes`)
|
|
23
|
-
|
|
24
|
-
## Prerequisites
|
|
25
|
-
|
|
26
|
-
### Shell environment (for deploy / status / teardown)
|
|
27
|
-
|
|
28
|
-
| Variable | Required | Purpose |
|
|
29
|
-
| -------------------- | -------- | ----------------- |
|
|
30
|
-
| `APITOGO_API_KEY_ID` | Yes | Platform API auth |
|
|
31
|
-
| `APITOGO_API_SECRET` | Yes | Platform API auth |
|
|
32
|
-
|
|
33
|
-
### Local machine
|
|
34
|
-
|
|
35
|
-
- Node.js 20+ (scaffold, build, preview)
|
|
36
|
-
- Network access to the npm registry during install/build
|
|
37
|
-
- OIDC credentials at publish time (site `.env` only — never in shell history for sharing)
|
|
38
|
-
- Stripe secrets at publish only when you have **paid** project plans
|
|
39
|
-
|
|
40
|
-
## Changing your site
|
|
41
|
-
|
|
42
|
-
| Approach | When it helps |
|
|
43
|
-
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
44
|
-
| **`npx apitogo config`** | Wire OpenAPI, custom pages, gateway plans, and site title from the terminal. See [Make config](../configuration/make-config.mdx). |
|
|
45
|
-
| **Edit files directly** | Full control — `apitogo.config.json`, `pages/**`, `landing/LandingPage.tsx`, etc. |
|
|
46
|
-
|
|
47
|
-
Common CLI shape tasks:
|
|
48
|
-
|
|
49
|
-
| Change | How
|
|
50
|
-
| --------------------------------- |
|
|
51
|
-
| Backend runtime | `npx apitogo config` (backend)
|
|
52
|
-
| OpenAPI
|
|
53
|
-
| Custom docs pages | `npx apitogo config` (page) or add under `pages/` |
|
|
54
|
-
| Gateway / API plans | `npx apitogo config` (plan) or edit
|
|
55
|
-
| Site title | `--title` or edit `apitogo.config.json`
|
|
56
|
-
| Theme, fonts, branding, projectId | Edit `apitogo.config.json`
|
|
57
|
-
|
|
58
|
-
Home page content often lives in `landing/LandingPage.tsx`. Site footer can live under
|
|
59
|
-
`modules.landing.content.footer` in `apitogo.config.json`.
|
|
60
|
-
|
|
61
|
-
## Config model (local site)
|
|
62
|
-
|
|
63
|
-
| File | Role |
|
|
64
|
-
| --------------------- | ------------------------------------- |
|
|
65
|
-
| `apitogo.config.json` | Site, modules, plans, auth type, apis |
|
|
66
|
-
| `.env` | `VITE_*` + `APITOGO_CONFIG_*` secrets |
|
|
67
|
-
|
|
68
|
-
Details: [Manifest](../configuration/manifest.md).
|
|
69
|
-
|
|
70
|
-
## CLI vs MCP
|
|
71
|
-
|
|
72
|
-
Both paths use the same config-first model. `npx apitogo deploy` runs the same engine as MCP
|
|
73
|
-
`publish_dev_portal`.
|
|
74
|
-
|
|
75
|
-
| Task | CLI | MCP (agent) |
|
|
76
|
-
| ----------------- | --------------------------------------------- | --------------------------------------------- |
|
|
77
|
-
| Scaffold | `npx @lukoweb/apitogo@latest init` | `create_dev_portal` |
|
|
78
|
-
| Shape config | `npx apitogo config` + file edits | `apply_product_intent` (shape) |
|
|
79
|
-
| Preview | `npx apitogo run` | `npm run dev` / preview tool |
|
|
80
|
-
| Publish | `npx apitogo deploy` | `publish_dev_portal` |
|
|
81
|
-
| Status / teardown | `npx apitogo status` / `npx apitogo teardown` | `verify_dev_portal_live` / `teardown_project` |
|
|
82
|
-
|
|
83
|
-
Prefer MCP when an agent should drive changes. Prefer CLI for CI, scripts, or terminal-only
|
|
84
|
-
workflows.
|
|
85
|
-
|
|
86
|
-
## Next
|
|
87
|
-
|
|
88
|
-
- [Install the CLI](./setup.md)
|
|
89
|
-
- [Shape](./shape.md) · [Go live](./go-live.md) · [Commands](./commands.md)
|
|
90
|
-
- [MCP overview](../mcp/overview.md) — agent-driven workflow
|
|
91
|
-
- [Manifest](../configuration/manifest.md)
|
|
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 `npx apitogo run`, and publish to APItoGo hosting with
|
|
10
|
+
`npx apitogo deploy`.
|
|
11
|
+
|
|
12
|
+
**First time?** Install and wire credentials → **[Install the CLI](./setup.md)**. Then follow
|
|
13
|
+
[Shape](./shape.md) and [Go live](./go-live.md).
|
|
14
|
+
|
|
15
|
+
## What you get
|
|
16
|
+
|
|
17
|
+
- Scaffold a local portal site (`npx @lukoweb/apitogo@latest init`)
|
|
18
|
+
- Shape backend, OpenAPI, plans, and docs pages via `npx apitogo config` and file edits
|
|
19
|
+
- Preview locally (`npx apitogo run`)
|
|
20
|
+
- Publish to APItoGo hosting (`npx apitogo deploy`) with platform plans **Free**, **Starter**, or
|
|
21
|
+
**Professional**
|
|
22
|
+
- Check live status (`npx apitogo status`) and tear down (`npx apitogo teardown --yes`)
|
|
23
|
+
|
|
24
|
+
## Prerequisites
|
|
25
|
+
|
|
26
|
+
### Shell environment (for deploy / status / teardown)
|
|
27
|
+
|
|
28
|
+
| Variable | Required | Purpose |
|
|
29
|
+
| -------------------- | -------- | ----------------- |
|
|
30
|
+
| `APITOGO_API_KEY_ID` | Yes | Platform API auth |
|
|
31
|
+
| `APITOGO_API_SECRET` | Yes | Platform API auth |
|
|
32
|
+
|
|
33
|
+
### Local machine
|
|
34
|
+
|
|
35
|
+
- Node.js 20+ (scaffold, build, preview)
|
|
36
|
+
- Network access to the npm registry during install/build
|
|
37
|
+
- OIDC credentials at publish time (site `.env` only — never in shell history for sharing)
|
|
38
|
+
- Stripe secrets at publish only when you have **paid** project plans
|
|
39
|
+
|
|
40
|
+
## Changing your site
|
|
41
|
+
|
|
42
|
+
| Approach | When it helps |
|
|
43
|
+
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
44
|
+
| **`npx apitogo config`** | Wire OpenAPI, custom pages, gateway plans, and site title from the terminal. See [Make config](../configuration/make-config.mdx). |
|
|
45
|
+
| **Edit files directly** | Full control — `apitogo.config.json`, `pages/**`, `landing/LandingPage.tsx`, etc. |
|
|
46
|
+
|
|
47
|
+
Common CLI shape tasks:
|
|
48
|
+
|
|
49
|
+
| Change | How |
|
|
50
|
+
| --------------------------------- | ---------------------------------------------------------------- |
|
|
51
|
+
| Backend runtime | `npx apitogo config` (backend) |
|
|
52
|
+
| OpenAPI files (`gateway.specs`) | `npx apitogo config` (openapi) |
|
|
53
|
+
| Custom docs pages | `npx apitogo config` (page) or add under `apitogo/portal/pages/` |
|
|
54
|
+
| Gateway / API plans | `npx apitogo config` (plan) or edit `apitogo/plans.json` |
|
|
55
|
+
| Site title | `--title` or edit `apitogo.config.json` |
|
|
56
|
+
| Theme, fonts, branding, projectId | Edit `apitogo.config.json` |
|
|
57
|
+
|
|
58
|
+
Home page content often lives in `landing/LandingPage.tsx`. Site footer can live under
|
|
59
|
+
`modules.landing.content.footer` in `apitogo.config.json`.
|
|
60
|
+
|
|
61
|
+
## Config model (local site)
|
|
62
|
+
|
|
63
|
+
| File | Role |
|
|
64
|
+
| --------------------- | ------------------------------------- |
|
|
65
|
+
| `apitogo.config.json` | Site, modules, plans, auth type, apis |
|
|
66
|
+
| `.env` | `VITE_*` + `APITOGO_CONFIG_*` secrets |
|
|
67
|
+
|
|
68
|
+
Details: [Manifest](../configuration/manifest.md).
|
|
69
|
+
|
|
70
|
+
## CLI vs MCP
|
|
71
|
+
|
|
72
|
+
Both paths use the same config-first model. `npx apitogo deploy` runs the same engine as MCP
|
|
73
|
+
`publish_dev_portal`.
|
|
74
|
+
|
|
75
|
+
| Task | CLI | MCP (agent) |
|
|
76
|
+
| ----------------- | --------------------------------------------- | --------------------------------------------- |
|
|
77
|
+
| Scaffold | `npx @lukoweb/apitogo@latest init` | `create_dev_portal` |
|
|
78
|
+
| Shape config | `npx apitogo config` + file edits | `apply_product_intent` (shape) |
|
|
79
|
+
| Preview | `npx apitogo run` | `npm run dev` / preview tool |
|
|
80
|
+
| Publish | `npx apitogo deploy` | `publish_dev_portal` |
|
|
81
|
+
| Status / teardown | `npx apitogo status` / `npx apitogo teardown` | `verify_dev_portal_live` / `teardown_project` |
|
|
82
|
+
|
|
83
|
+
Prefer MCP when an agent should drive changes. Prefer CLI for CI, scripts, or terminal-only
|
|
84
|
+
workflows.
|
|
85
|
+
|
|
86
|
+
## Next
|
|
87
|
+
|
|
88
|
+
- [Install the CLI](./setup.md)
|
|
89
|
+
- [Shape](./shape.md) · [Go live](./go-live.md) · [Commands](./commands.md)
|
|
90
|
+
- [MCP overview](../mcp/overview.md) — agent-driven workflow
|
|
91
|
+
- [Manifest](../configuration/manifest.md)
|
package/docs/cli/shape.md
CHANGED
|
@@ -1,127 +1,126 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Shape with CLI
|
|
3
|
-
description:
|
|
4
|
-
Scaffold and customize a developer portal locally with npx apitogo init, config, and run.
|
|
5
|
-
sidebar_icon: pencil-ruler
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
**Shape** means: create or update a local portal site (OpenAPI, plans, docs pages, auth) without
|
|
9
|
-
publishing. You preview with `npx apitogo run`.
|
|
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
|
-
`npx @lukoweb/apitogo@latest init` scaffolds into `./dev-portal` by default (pass a folder name or
|
|
17
|
-
`--name` to override), installs dependencies, and wires nearby OpenAPI / docs. Then run config via
|
|
18
|
-
`npx`:
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
npx @lukoweb/apitogo@latest init
|
|
22
|
-
cd dev-portal
|
|
23
|
-
npx apitogo config # backend, OpenAPI, pages, plans (apply each immediately)
|
|
24
|
-
npx apitogo run # http://localhost:3000
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
Named folder:
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
npx @lukoweb/apitogo@latest init ./my-portal --name "Books API"
|
|
31
|
-
cd ./my-portal
|
|
32
|
-
npx apitogo config
|
|
33
|
-
npx apitogo run
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
`npx @lukoweb/apitogo init` does **not** call the platform. Run `npx apitogo deploy` when you are
|
|
37
|
-
ready to go live.
|
|
38
|
-
|
|
39
|
-
## Interactive config (`npx apitogo config`)
|
|
40
|
-
|
|
41
|
-
On a TTY, bare `npx apitogo config` opens the wizard. Each choice is written immediately; the loop
|
|
42
|
-
continues until you type `done`:
|
|
43
|
-
|
|
44
|
-
| Choice | What it does
|
|
45
|
-
| --------- |
|
|
46
|
-
| `backend` | Set `
|
|
47
|
-
| `openapi` |
|
|
48
|
-
| `page` | Create `pages/<slug>.
|
|
49
|
-
| `plan` | Add a
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
| `--
|
|
81
|
-
| `--
|
|
82
|
-
| `--
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
- **
|
|
91
|
-
- **
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
npx apitogo run
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
npx apitogo build
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
npx apitogo
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
When the site looks right, [go live](./go-live.md) with `npx apitogo deploy`.
|
|
1
|
+
---
|
|
2
|
+
title: Shape with CLI
|
|
3
|
+
description:
|
|
4
|
+
Scaffold and customize a developer portal locally with npx apitogo init, config, and run.
|
|
5
|
+
sidebar_icon: pencil-ruler
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
**Shape** means: create or update a local portal site (OpenAPI, plans, docs pages, auth) without
|
|
9
|
+
publishing. You preview with `npx apitogo run`.
|
|
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
|
+
`npx @lukoweb/apitogo@latest init` scaffolds into `./dev-portal` by default (pass a folder name or
|
|
17
|
+
`--name` to override), installs dependencies, and wires nearby OpenAPI / docs. Then run config via
|
|
18
|
+
`npx`:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npx @lukoweb/apitogo@latest init
|
|
22
|
+
cd dev-portal
|
|
23
|
+
npx apitogo config # backend, OpenAPI, pages, plans (apply each immediately)
|
|
24
|
+
npx apitogo run # http://localhost:3000
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Named folder:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npx @lukoweb/apitogo@latest init ./my-portal --name "Books API"
|
|
31
|
+
cd ./my-portal
|
|
32
|
+
npx apitogo config
|
|
33
|
+
npx apitogo run
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`npx @lukoweb/apitogo init` does **not** call the platform. Run `npx apitogo deploy` when you are
|
|
37
|
+
ready to go live.
|
|
38
|
+
|
|
39
|
+
## Interactive config (`npx apitogo config`)
|
|
40
|
+
|
|
41
|
+
On a TTY, bare `npx apitogo config` opens the wizard. Each choice is written immediately; the loop
|
|
42
|
+
continues until you type `done`:
|
|
43
|
+
|
|
44
|
+
| Choice | What it does |
|
|
45
|
+
| --------- | ------------------------------------------------------------------------ |
|
|
46
|
+
| `backend` | Set `gateway.origin`: API code folder, runtime and runtime version |
|
|
47
|
+
| `openapi` | Add an OpenAPI file to `gateway.specs` |
|
|
48
|
+
| `page` | Create `apitogo/portal/pages/<slug>.mdx` (the sidebar follows the files) |
|
|
49
|
+
| `plan` | Add a plan to `apitogo/plans.json` (title, price, rate limit, quota) |
|
|
50
|
+
|
|
51
|
+
Fonts and colors are **not** prompted. See [Colors & theme](../customization/colors-theme.mdx).
|
|
52
|
+
|
|
53
|
+
**Paid plans:** a plan with a price needs `plans.billing.provider: "stripe"`, and **Starter** or
|
|
54
|
+
**Professional** platform hosting on deploy. **Free** cannot publish paid gateway plans or custom
|
|
55
|
+
domains.
|
|
56
|
+
|
|
57
|
+
Full reference: [Make config (CLI)](../configuration/make-config.mdx) ·
|
|
58
|
+
[Gateway plans](../configuration/plans.md)
|
|
59
|
+
|
|
60
|
+
## Configure with flags
|
|
61
|
+
|
|
62
|
+
Changes a config version 2 project. Every change to `apitogo.config.json` is checked before it is
|
|
63
|
+
written. The command does not create a project: use `init` or `create` for that.
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
npx apitogo config --title "Books API"
|
|
67
|
+
npx apitogo config --page-slug guides/quickstart --page-title "Quickstart"
|
|
68
|
+
npx apitogo config --plan '{"sku":"free","displayName":"Free"}'
|
|
69
|
+
npx apitogo config --no-interactive
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Common flags:
|
|
73
|
+
|
|
74
|
+
| Flag | Purpose |
|
|
75
|
+
| -------------------------------------------- | ---------------------------------------------------------- |
|
|
76
|
+
| `--interactive` / `-i` | Force wizard (default on TTY). `--no-interactive` skips it |
|
|
77
|
+
| `--title` | Set `portal.name` |
|
|
78
|
+
| `--source`, `--runtime`, `--runtime-version` | Set `gateway.origin` |
|
|
79
|
+
| `--openapi` | Add a file to `gateway.specs` |
|
|
80
|
+
| `--page-slug`, `--page-title` | Add a docs page |
|
|
81
|
+
| `--plan` | Add or replace a plan in `plans.json` |
|
|
82
|
+
| `--patch` | Deep-merge JSON into `apitogo.config.json` |
|
|
83
|
+
|
|
84
|
+
## Shape by editing files
|
|
85
|
+
|
|
86
|
+
After `npx apitogo config`, edit the manifest and site files directly:
|
|
87
|
+
|
|
88
|
+
- **Services, backend, OpenAPI files** — `apitogo.config.json`
|
|
89
|
+
- **Plans** — `apitogo/plans.json`
|
|
90
|
+
- **Docs pages** — `apitogo/portal/pages/**/*.mdx`
|
|
91
|
+
- **Home page** — the file in `portal.landing` (for example
|
|
92
|
+
`apitogo/portal/landing/LandingPage.tsx`)
|
|
93
|
+
|
|
94
|
+
Never put OIDC or Stripe secrets in `apitogo.config.json`. Use `.env` with
|
|
95
|
+
`APITOGO_CONFIG_AUTHENTICATION__*` before publish.
|
|
96
|
+
|
|
97
|
+
## Preview locally
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
npx apitogo run
|
|
101
|
+
npx apitogo run --port 4000 --open
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Production build check:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
npx apitogo build
|
|
108
|
+
npx apitogo build --preview
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Shape-phase edits hot-reload when the dev server is running.
|
|
112
|
+
|
|
113
|
+
## Existing docs + OpenAPI folder
|
|
114
|
+
|
|
115
|
+
If you already have `pages/` and an OpenAPI spec:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
npx @lukoweb/apitogo@latest init
|
|
119
|
+
cd dev-portal
|
|
120
|
+
npx apitogo config
|
|
121
|
+
npx apitogo run
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Next
|
|
125
|
+
|
|
126
|
+
When the site looks right, [go live](./go-live.md) with `npx apitogo deploy`.
|