@lukoweb/apitogo 0.2.60 → 0.2.61
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 +893 -527
- package/docs/cli/commands.md +6 -6
- package/docs/cli/go-live.md +12 -12
- package/docs/cli/overview.md +26 -27
- package/docs/cli/setup.md +38 -46
- package/docs/cli/shape.md +32 -35
- package/docs/cli/walkthrough.md +19 -19
- package/docs/components/slot.mdx +116 -116
- package/docs/configuration/api-reference.md +1 -1
- package/docs/configuration/authentication.md +3 -3
- package/docs/configuration/footer.mdx +89 -89
- package/docs/configuration/gateway.md +8 -8
- package/docs/configuration/make-config.mdx +20 -10
- package/docs/configuration/overview.md +3 -3
- package/docs/configuration/plans.md +5 -5
- package/docs/configuration/portal.md +36 -0
- package/docs/customization/colors-theme.mdx +255 -255
- package/docs/customization/fonts.md +105 -105
- package/docs/customization/landing-page.md +1 -1
- package/docs/deploy/apitogo.md +3 -3
- package/docs/deployment.md +3 -3
- package/docs/guides/custom-pages.md +3 -3
- package/docs/guides/customer-account.md +1 -1
- package/docs/guides/stripe-setup.mdx +9 -9
- package/docs/markdown/frontmatter.md +2 -2
- package/docs/mcp/go-live.md +7 -7
- package/docs/mcp/overview.md +58 -58
- package/docs/mcp/setup.md +6 -6
- package/docs/mcp/shape.md +2 -2
- package/docs/mcp/tools.md +57 -57
- package/docs/quickstart.md +6 -4
- package/docs/writing.mdx +68 -68
- package/package.json +1 -1
- package/src/config/apitogo-config-core.ts +11 -1
- package/src/config/v2/resolve.ts +19 -0
- package/src/config/v2/rules.ts +88 -0
- package/src/config/v2/schema.ts +28 -0
- package/src/config/v2/wrapper.ts +76 -13
- package/src/vite/config.ts +278 -273
- package/src/vite/markdown-output-path.ts +48 -0
- package/src/vite/plugin-markdown-export.ts +210 -214
- package/src/vite/prerender/prerender.ts +4 -4
- package/src/vite/watch-ignore.ts +19 -0
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
---
|
|
2
|
-
sidebar_icon: baseline
|
|
3
|
-
title: Font & Typography
|
|
4
|
-
sidebar_label: Font & Typography
|
|
5
|
-
description:
|
|
6
|
-
Learn how to customize fonts and typography in APIToGo using predefined Google Fonts, custom font
|
|
7
|
-
URLs, or local fonts for sans, serif, and monospace text.
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
APIToGo allows you to customize fonts for text (`sans`), serif content (`serif`), and code (`mono`).
|
|
11
|
-
You can use predefined Google Fonts, external sources, or local fonts.
|
|
12
|
-
|
|
13
|
-
Fonts go under `fonts` in the portal's theme file, **`apitogo/portal/theme.json`**. See
|
|
14
|
-
[Colors & theme](./colors-theme.mdx) for the rest of that file. Local font files go in
|
|
15
|
-
`apitogo/portal/public/`, which the portal serves at `/`.
|
|
16
|
-
|
|
17
|
-
## Predefined Google Fonts
|
|
18
|
-
|
|
19
|
-
The easiest way to use fonts is with predefined Google Fonts. Simply specify the font name as a
|
|
20
|
-
string:
|
|
21
|
-
|
|
22
|
-
```json title=apitogo/portal/theme.json
|
|
23
|
-
{
|
|
24
|
-
"fonts": {
|
|
25
|
-
"sans": "Inter",
|
|
26
|
-
"serif": "Merriweather",
|
|
27
|
-
"mono": "JetBrains Mono"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
### Available Google Fonts
|
|
33
|
-
|
|
34
|
-
The following fonts are available as predefined options:
|
|
35
|
-
|
|
36
|
-
**Sans Serif:** Inter, Roboto, Open Sans, Poppins, Montserrat, Outfit, Plus Jakarta Sans, DM Sans,
|
|
37
|
-
IBM Plex Sans, Geist, Oxanium, Space Grotesk
|
|
38
|
-
|
|
39
|
-
**Serif:** Architects Daughter, Merriweather, Playfair Display, Lora, Source Serif Pro, Libre
|
|
40
|
-
Baskerville
|
|
41
|
-
|
|
42
|
-
**Monospace:** JetBrains Mono, Fira Code, Source Code Pro, IBM Plex Mono, Roboto Mono, Space Mono,
|
|
43
|
-
Geist Mono
|
|
44
|
-
|
|
45
|
-
## Custom Font URLs
|
|
46
|
-
|
|
47
|
-
For more control or to use fonts not in the predefined list, you can specify a custom font URL:
|
|
48
|
-
|
|
49
|
-
```json title=apitogo/portal/theme.json
|
|
50
|
-
{
|
|
51
|
-
"fonts": {
|
|
52
|
-
"sans": {
|
|
53
|
-
"url": "https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap",
|
|
54
|
-
"fontFamily": "Roboto, sans-serif"
|
|
55
|
-
},
|
|
56
|
-
"mono": {
|
|
57
|
-
"url": "https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;700&display=swap",
|
|
58
|
-
"fontFamily": "Roboto Mono, monospace"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## Local Fonts
|
|
65
|
-
|
|
66
|
-
To use local fonts, add them to the `public` folder and create a `fonts.css` file:
|
|
67
|
-
|
|
68
|
-
```css
|
|
69
|
-
@font-face {
|
|
70
|
-
font-family: "CustomFont";
|
|
71
|
-
font-style: normal;
|
|
72
|
-
font-weight: 400;
|
|
73
|
-
src: url("/custom-font-400.woff2") format("woff2");
|
|
74
|
-
}
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
Then reference the local CSS file:
|
|
78
|
-
|
|
79
|
-
```json title=apitogo/portal/theme.json
|
|
80
|
-
{
|
|
81
|
-
"fonts": {
|
|
82
|
-
"sans": {
|
|
83
|
-
"url": "/fonts.css",
|
|
84
|
-
"fontFamily": "CustomFont, sans-serif"
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
## Mixed Configuration
|
|
91
|
-
|
|
92
|
-
You can mix predefined fonts with custom fonts:
|
|
93
|
-
|
|
94
|
-
```json title=apitogo/portal/theme.json
|
|
95
|
-
{
|
|
96
|
-
"fonts": {
|
|
97
|
-
"sans": "Inter",
|
|
98
|
-
"serif": {
|
|
99
|
-
"url": "/custom-serif.css",
|
|
100
|
-
"fontFamily": "CustomSerif, serif"
|
|
101
|
-
},
|
|
102
|
-
"mono": "Fira Code"
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
```
|
|
1
|
+
---
|
|
2
|
+
sidebar_icon: baseline
|
|
3
|
+
title: Font & Typography
|
|
4
|
+
sidebar_label: Font & Typography
|
|
5
|
+
description:
|
|
6
|
+
Learn how to customize fonts and typography in APIToGo using predefined Google Fonts, custom font
|
|
7
|
+
URLs, or local fonts for sans, serif, and monospace text.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
APIToGo allows you to customize fonts for text (`sans`), serif content (`serif`), and code (`mono`).
|
|
11
|
+
You can use predefined Google Fonts, external sources, or local fonts.
|
|
12
|
+
|
|
13
|
+
Fonts go under `fonts` in the portal's theme file, **`apitogo/portal/theme.json`**. See
|
|
14
|
+
[Colors & theme](./colors-theme.mdx) for the rest of that file. Local font files go in
|
|
15
|
+
`apitogo/portal/public/`, which the portal serves at `/`.
|
|
16
|
+
|
|
17
|
+
## Predefined Google Fonts
|
|
18
|
+
|
|
19
|
+
The easiest way to use fonts is with predefined Google Fonts. Simply specify the font name as a
|
|
20
|
+
string:
|
|
21
|
+
|
|
22
|
+
```json title=apitogo/portal/theme.json
|
|
23
|
+
{
|
|
24
|
+
"fonts": {
|
|
25
|
+
"sans": "Inter",
|
|
26
|
+
"serif": "Merriweather",
|
|
27
|
+
"mono": "JetBrains Mono"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Available Google Fonts
|
|
33
|
+
|
|
34
|
+
The following fonts are available as predefined options:
|
|
35
|
+
|
|
36
|
+
**Sans Serif:** Inter, Roboto, Open Sans, Poppins, Montserrat, Outfit, Plus Jakarta Sans, DM Sans,
|
|
37
|
+
IBM Plex Sans, Geist, Oxanium, Space Grotesk
|
|
38
|
+
|
|
39
|
+
**Serif:** Architects Daughter, Merriweather, Playfair Display, Lora, Source Serif Pro, Libre
|
|
40
|
+
Baskerville
|
|
41
|
+
|
|
42
|
+
**Monospace:** JetBrains Mono, Fira Code, Source Code Pro, IBM Plex Mono, Roboto Mono, Space Mono,
|
|
43
|
+
Geist Mono
|
|
44
|
+
|
|
45
|
+
## Custom Font URLs
|
|
46
|
+
|
|
47
|
+
For more control or to use fonts not in the predefined list, you can specify a custom font URL:
|
|
48
|
+
|
|
49
|
+
```json title=apitogo/portal/theme.json
|
|
50
|
+
{
|
|
51
|
+
"fonts": {
|
|
52
|
+
"sans": {
|
|
53
|
+
"url": "https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap",
|
|
54
|
+
"fontFamily": "Roboto, sans-serif"
|
|
55
|
+
},
|
|
56
|
+
"mono": {
|
|
57
|
+
"url": "https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;700&display=swap",
|
|
58
|
+
"fontFamily": "Roboto Mono, monospace"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Local Fonts
|
|
65
|
+
|
|
66
|
+
To use local fonts, add them to the `public` folder and create a `fonts.css` file:
|
|
67
|
+
|
|
68
|
+
```css
|
|
69
|
+
@font-face {
|
|
70
|
+
font-family: "CustomFont";
|
|
71
|
+
font-style: normal;
|
|
72
|
+
font-weight: 400;
|
|
73
|
+
src: url("/custom-font-400.woff2") format("woff2");
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Then reference the local CSS file:
|
|
78
|
+
|
|
79
|
+
```json title=apitogo/portal/theme.json
|
|
80
|
+
{
|
|
81
|
+
"fonts": {
|
|
82
|
+
"sans": {
|
|
83
|
+
"url": "/fonts.css",
|
|
84
|
+
"fontFamily": "CustomFont, sans-serif"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Mixed Configuration
|
|
91
|
+
|
|
92
|
+
You can mix predefined fonts with custom fonts:
|
|
93
|
+
|
|
94
|
+
```json title=apitogo/portal/theme.json
|
|
95
|
+
{
|
|
96
|
+
"fonts": {
|
|
97
|
+
"sans": "Inter",
|
|
98
|
+
"serif": {
|
|
99
|
+
"url": "/custom-serif.css",
|
|
100
|
+
"fontFamily": "CustomSerif, serif"
|
|
101
|
+
},
|
|
102
|
+
"mono": "Fira Code"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
```
|
|
@@ -153,7 +153,7 @@ to the gateway if they must not be discoverable.
|
|
|
153
153
|
### Troubleshooting
|
|
154
154
|
|
|
155
155
|
- **The list is always the fallback:** the project has no plans backend yet. Add `plans` to the
|
|
156
|
-
config and run `
|
|
156
|
+
config and run `apitogo deploy`.
|
|
157
157
|
- **CORS errors:** the backend only allows the portal's configured frontend URL. Serving the site
|
|
158
158
|
from another domain requires adding it to the backend's allowed origins.
|
|
159
159
|
- **Empty list on a new portal:** the portal is not activated yet, or the gateway has no release.
|
package/docs/deploy/apitogo.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Deploy with the APItoGo CLI
|
|
2
2
|
|
|
3
3
|
```bash
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
apitogo login
|
|
5
|
+
apitogo deploy
|
|
6
|
+
apitogo status
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
`deploy` creates the project on its first run, then sets up every service in `apitogo.config.json`.
|
package/docs/deployment.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Your portal, gateway, sign-in and plans are deployed to APItoGo with one command:
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
|
|
6
|
+
apitogo deploy
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
| Path | Docs |
|
|
@@ -11,5 +11,5 @@ npx apitogo deploy
|
|
|
11
11
|
| **CLI** | [Deploy with the APItoGo CLI](./deploy/apitogo.md) · [Go live with CLI](./cli/go-live.md) |
|
|
12
12
|
| **MCP / agents** | [Go live](./mcp/go-live.md) |
|
|
13
13
|
|
|
14
|
-
To check the portal before deploying, `
|
|
15
|
-
|
|
14
|
+
To check the portal before deploying, `apitogo run` previews it locally and `apitogo build` makes a
|
|
15
|
+
production build.
|
|
@@ -42,9 +42,9 @@ export default function QuickstartPage() {
|
|
|
42
42
|
|
|
43
43
|
## CLI scaffold
|
|
44
44
|
|
|
45
|
-
`
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
`apitogo config` creates a starter React page at `apitogo/portal/pages/<slug>.tsx`. Choose `page` in
|
|
46
|
+
the wizard loop, or pass `--page-slug` and `--page-title`. Add `--page-format mdx` for a Markdown
|
|
47
|
+
page instead.
|
|
48
48
|
|
|
49
49
|
Predefined UI components (Callout, Card, Button, Heading, and more) are documented under
|
|
50
50
|
[/docs/components](/docs/components).
|
|
@@ -94,7 +94,7 @@ the customer calls, those calls show as errors in the usage page.
|
|
|
94
94
|
| `429` | The plan's limit was reached. The rate limit renews each period; the quota carries `Retry-After`. |
|
|
95
95
|
| A customer paid but has no plan | The webhook is missing or its signing secret is wrong. Check it in Stripe and in `plans.billing`. |
|
|
96
96
|
| The usage page shows nothing after real calls | Calls only count when made with a key. Check that the gateway has been deployed with plans. |
|
|
97
|
-
| Calls from the portal's own pages are blocked | Run `
|
|
97
|
+
| Calls from the portal's own pages are blocked | Run `apitogo deploy` again. The gateway lists the portal's address after the portal exists. |
|
|
98
98
|
|
|
99
99
|
## Related
|
|
100
100
|
|
|
@@ -6,8 +6,8 @@ description:
|
|
|
6
6
|
step by step with pictures.
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
A plan with a price is paid through **your own Stripe account**. `
|
|
10
|
-
|
|
9
|
+
A plan with a price is paid through **your own Stripe account**. `apitogo deploy` needs two things
|
|
10
|
+
from Stripe:
|
|
11
11
|
|
|
12
12
|
| What | Starts with | What it does |
|
|
13
13
|
| ---------------------- | ------------------------ | --------------------------------------------------- |
|
|
@@ -37,7 +37,7 @@ restricted key (`rk_`) works too, if it may write Checkout Sessions, Customers a
|
|
|
37
37
|
Run deploy and paste the key when it asks:
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
|
-
|
|
40
|
+
apitogo deploy
|
|
41
41
|
# Stripe secret key (hidden):
|
|
42
42
|
```
|
|
43
43
|
|
|
@@ -93,13 +93,13 @@ Paste it where deploy asks:
|
|
|
93
93
|
If you skipped it, set it later and deploy the plans again:
|
|
94
94
|
|
|
95
95
|
```bash
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
apitogo secrets set STRIPE_WEBHOOK
|
|
97
|
+
apitogo deploy --only plans
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
## Check it works
|
|
101
101
|
|
|
102
|
-
Run `
|
|
102
|
+
Run `apitogo deploy --only plans` again. When Stripe has sent an event, it reports:
|
|
103
103
|
|
|
104
104
|
```
|
|
105
105
|
Stripe webhook: verified (last event 2 min ago, checkout.session.completed)
|
|
@@ -114,9 +114,9 @@ Live mode has its own keys and its own webhooks. Switch to your live account in
|
|
|
114
114
|
three steps there, and set the new values:
|
|
115
115
|
|
|
116
116
|
```bash
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
apitogo secrets set STRIPE_API_KEY
|
|
118
|
+
apitogo secrets set STRIPE_WEBHOOK
|
|
119
|
+
apitogo deploy --only plans
|
|
120
120
|
```
|
|
121
121
|
|
|
122
122
|
Selling paid plans needs the **Starter** or **Professional** hosting plan. See
|
|
@@ -133,8 +133,8 @@ draft: true
|
|
|
133
133
|
|
|
134
134
|
When `draft: true` is set:
|
|
135
135
|
|
|
136
|
-
- The document will be visible when running `
|
|
137
|
-
- The document will be excluded from builds created with `
|
|
136
|
+
- The document will be visible when running `apitogo run`
|
|
137
|
+
- The document will be excluded from builds created with `apitogo build`
|
|
138
138
|
- The document won't appear in the navigation or be accessible via URL in production
|
|
139
139
|
|
|
140
140
|
:::
|
package/docs/mcp/go-live.md
CHANGED
|
@@ -29,11 +29,11 @@ Paid plans need the project's Stripe key and webhook secret. Set them yourself i
|
|
|
29
29
|
secret's value never goes through the agent:
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
|
|
32
|
+
apitogo secrets set STRIPE_API_KEY
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
|
|
36
|
+
apitogo secrets set STRIPE_WEBHOOK
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
**`apitogo_secrets_list`** shows which names are set. See the
|
|
@@ -60,11 +60,11 @@ URL and the sign-in issuer.
|
|
|
60
60
|
Every tool answers with the CLI's JSON. A failure carries `error` and usually a `hint` with the next
|
|
61
61
|
step, for example to log in:
|
|
62
62
|
|
|
63
|
-
| Message | What to do
|
|
64
|
-
| ------------------------ |
|
|
65
|
-
| Not logged in | Run `
|
|
66
|
-
| A secret is missing | Set it with `
|
|
67
|
-
| Hosting is not ready yet | Wait a few minutes, then deploy again
|
|
63
|
+
| Message | What to do |
|
|
64
|
+
| ------------------------ | ----------------------------------------------------------------------------- |
|
|
65
|
+
| Not logged in | Run `apitogo login`, or give the server API credentials ([setup](./setup.md)) |
|
|
66
|
+
| A secret is missing | Set it with `apitogo secrets set NAME` |
|
|
67
|
+
| Hosting is not ready yet | Wait a few minutes, then deploy again |
|
|
68
68
|
|
|
69
69
|
## Remove it
|
|
70
70
|
|
package/docs/mcp/overview.md
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: MCP overview
|
|
3
|
-
description:
|
|
4
|
-
Let an AI agent create, shape, check and deploy an APItoGo project through the APItoGo MCP server.
|
|
5
|
-
sidebar_icon: bot
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
The **APItoGo MCP** server (`@lukoweb/apitogo-mcp`) gives an AI agent the same commands you run in a
|
|
9
|
-
terminal: create a project, add services, change plans and pages, check, preview and deploy. Each
|
|
10
|
-
tool runs the [`apitogo` CLI](../cli/overview.md) in the project folder, so an agent and a person
|
|
11
|
-
always get the same result.
|
|
12
|
-
|
|
13
|
-
**First time?** Wire the server into your agent → **[Configure MCP in your agent](./setup.md)**.
|
|
14
|
-
|
|
15
|
-
## How it fits together
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
agent ──MCP tool──> apitogo-mcp ──runs──> apitogo <command> --json (in the project folder)
|
|
19
|
-
│
|
|
20
|
-
├── apitogo.config.json, apitogo/ (your files)
|
|
21
|
-
└── APItoGo platform (deploy, status)
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
- Everything the project is lives in `apitogo.config.json` (config version 2) and the `apitogo/`
|
|
25
|
-
folder. See [Configuration](../configuration/overview.md).
|
|
26
|
-
- The tools answer with the CLI's JSON, so the agent sees what changed, what a deploy would do, and
|
|
27
|
-
why something failed.
|
|
28
|
-
- The agent can also edit the project's files directly (the landing page, docs pages, OpenAPI file,
|
|
29
|
-
`plans.json`) when no tool covers a change.
|
|
30
|
-
|
|
31
|
-
## The usual flow
|
|
32
|
-
|
|
33
|
-
| Step | Tool |
|
|
34
|
-
| ------------------------- | ---------------------------------------------------------- |
|
|
35
|
-
| Make the project folder | `apitogo_create`, or `apitogo_init` + `apitogo_add` |
|
|
36
|
-
| Shape it | `apitogo_config` (name, OpenAPI, pages, plans), file edits |
|
|
37
|
-
| Check it | `apitogo_check` |
|
|
38
|
-
| Make the platform project | `apitogo_project_create` |
|
|
39
|
-
| Preview the deploy | `apitogo_plan` |
|
|
40
|
-
| Deploy | `apitogo_deploy` |
|
|
41
|
-
| See what is live | `apitogo_status` |
|
|
42
|
-
|
|
43
|
-
Details: [Shape a project](./shape.md) · [Go live](./go-live.md) · [All tools](./tools.md).
|
|
44
|
-
|
|
45
|
-
## What the agent never does
|
|
46
|
-
|
|
47
|
-
- **Handle secret values.** You set secrets such as the Stripe key yourself with
|
|
48
|
-
`apitogo secrets set NAME` in a terminal. The agent can list their names.
|
|
49
|
-
- **Delete without you.** `apitogo_teardown` needs the project's name typed back, and the server
|
|
50
|
-
tells the agent to ask you first, as for removing a secret, choosing a paid plan, or a deploy
|
|
51
|
-
change that cannot be undone.
|
|
52
|
-
- **Pay.** A paid project plan answers with a checkout link that you open and pay.
|
|
53
|
-
|
|
54
|
-
## Next
|
|
55
|
-
|
|
56
|
-
- [Configure MCP](./setup.md)
|
|
57
|
-
- [Shape a project](./shape.md) · [Go live](./go-live.md) · [Tools](./tools.md)
|
|
58
|
-
- Without an agent: [CLI overview](../cli/overview.md)
|
|
1
|
+
---
|
|
2
|
+
title: MCP overview
|
|
3
|
+
description:
|
|
4
|
+
Let an AI agent create, shape, check and deploy an APItoGo project through the APItoGo MCP server.
|
|
5
|
+
sidebar_icon: bot
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
The **APItoGo MCP** server (`@lukoweb/apitogo-mcp`) gives an AI agent the same commands you run in a
|
|
9
|
+
terminal: create a project, add services, change plans and pages, check, preview and deploy. Each
|
|
10
|
+
tool runs the [`apitogo` CLI](../cli/overview.md) in the project folder, so an agent and a person
|
|
11
|
+
always get the same result.
|
|
12
|
+
|
|
13
|
+
**First time?** Wire the server into your agent → **[Configure MCP in your agent](./setup.md)**.
|
|
14
|
+
|
|
15
|
+
## How it fits together
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
agent ──MCP tool──> apitogo-mcp ──runs──> apitogo <command> --json (in the project folder)
|
|
19
|
+
│
|
|
20
|
+
├── apitogo.config.json, apitogo/ (your files)
|
|
21
|
+
└── APItoGo platform (deploy, status)
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
- Everything the project is lives in `apitogo.config.json` (config version 2) and the `apitogo/`
|
|
25
|
+
folder. See [Configuration](../configuration/overview.md).
|
|
26
|
+
- The tools answer with the CLI's JSON, so the agent sees what changed, what a deploy would do, and
|
|
27
|
+
why something failed.
|
|
28
|
+
- The agent can also edit the project's files directly (the landing page, docs pages, OpenAPI file,
|
|
29
|
+
`plans.json`) when no tool covers a change.
|
|
30
|
+
|
|
31
|
+
## The usual flow
|
|
32
|
+
|
|
33
|
+
| Step | Tool |
|
|
34
|
+
| ------------------------- | ---------------------------------------------------------- |
|
|
35
|
+
| Make the project folder | `apitogo_create`, or `apitogo_init` + `apitogo_add` |
|
|
36
|
+
| Shape it | `apitogo_config` (name, OpenAPI, pages, plans), file edits |
|
|
37
|
+
| Check it | `apitogo_check` |
|
|
38
|
+
| Make the platform project | `apitogo_project_create` |
|
|
39
|
+
| Preview the deploy | `apitogo_plan` |
|
|
40
|
+
| Deploy | `apitogo_deploy` |
|
|
41
|
+
| See what is live | `apitogo_status` |
|
|
42
|
+
|
|
43
|
+
Details: [Shape a project](./shape.md) · [Go live](./go-live.md) · [All tools](./tools.md).
|
|
44
|
+
|
|
45
|
+
## What the agent never does
|
|
46
|
+
|
|
47
|
+
- **Handle secret values.** You set secrets such as the Stripe key yourself with
|
|
48
|
+
`apitogo secrets set NAME` in a terminal. The agent can list their names.
|
|
49
|
+
- **Delete without you.** `apitogo_teardown` needs the project's name typed back, and the server
|
|
50
|
+
tells the agent to ask you first, as for removing a secret, choosing a paid plan, or a deploy
|
|
51
|
+
change that cannot be undone.
|
|
52
|
+
- **Pay.** A paid project plan answers with a checkout link that you open and pay.
|
|
53
|
+
|
|
54
|
+
## Next
|
|
55
|
+
|
|
56
|
+
- [Configure MCP](./setup.md)
|
|
57
|
+
- [Shape a project](./shape.md) · [Go live](./go-live.md) · [Tools](./tools.md)
|
|
58
|
+
- Without an agent: [CLI overview](../cli/overview.md)
|
package/docs/mcp/setup.md
CHANGED
|
@@ -12,8 +12,8 @@ projects. The server is the same everywhere; only the host config file changes.
|
|
|
12
12
|
## Prerequisites
|
|
13
13
|
|
|
14
14
|
- **Node.js 20+** on the machine that runs the agent
|
|
15
|
-
- Signed in to APItoGo: run `
|
|
16
|
-
|
|
15
|
+
- Signed in to APItoGo: run `apitogo login` once in a terminal. Or give the server API credentials
|
|
16
|
+
(API key id and secret from [apitogo.com](https://apitogo.com)) in its env.
|
|
17
17
|
|
|
18
18
|
## Shared server definition
|
|
19
19
|
|
|
@@ -143,8 +143,8 @@ Restart Codex / open a new session. See [Codex MCP docs](https://developers.open
|
|
|
143
143
|
Any client that supports **stdio** MCP can run APItoGo:
|
|
144
144
|
|
|
145
145
|
1. Set command `npx`, args `["-y", "@lukoweb/apitogo-mcp"]`
|
|
146
|
-
2. Sign in with `
|
|
147
|
-
|
|
146
|
+
2. Sign in with `apitogo login`, or pass `APITOGO_API_KEY_ID` and `APITOGO_API_SECRET` in the server
|
|
147
|
+
env
|
|
148
148
|
3. Restart the host and confirm tools load
|
|
149
149
|
|
|
150
150
|
Examples: Windsurf, VS Code Copilot Chat MCP, custom MCP clients — follow that product’s “add stdio
|
|
@@ -159,8 +159,8 @@ In a new agent chat:
|
|
|
159
159
|
2. Ask it for the status of your project; it calls `apitogo_status`.
|
|
160
160
|
|
|
161
161
|
If the server fails to start: confirm Node 20+ and that `npx -y @lukoweb/apitogo-mcp` works in a
|
|
162
|
-
terminal. If a tool says you are not logged in, run `
|
|
163
|
-
|
|
162
|
+
terminal. If a tool says you are not logged in, run `apitogo login` or check the API key id and
|
|
163
|
+
secret.
|
|
164
164
|
|
|
165
165
|
## Next
|
|
166
166
|
|
package/docs/mcp/shape.md
CHANGED
|
@@ -69,8 +69,8 @@ set yourself; see [Plans](../configuration/plans.md) and the
|
|
|
69
69
|
|
|
70
70
|
- **`apitogo_check`** finds mistakes in the config and its files before a deploy. With `offline` it
|
|
71
71
|
asks the platform nothing.
|
|
72
|
-
- To see the portal locally, run `
|
|
73
|
-
|
|
72
|
+
- To see the portal locally, run `apitogo run` in the folder yourself; it keeps running, so it is
|
|
73
|
+
not an MCP tool.
|
|
74
74
|
|
|
75
75
|
## Next
|
|
76
76
|
|
package/docs/mcp/tools.md
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: MCP tools
|
|
3
|
-
description: Every tool of the APItoGo MCP server and the CLI command it runs.
|
|
4
|
-
sidebar_icon: wrench
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Each tool runs one `apitogo` command with `--json` in the project folder and answers with its JSON.
|
|
8
|
-
Every tool takes `directory`: the project folder, absolute or relative to where the server runs
|
|
9
|
-
(default: that folder).
|
|
10
|
-
|
|
11
|
-
## Make and shape a project
|
|
12
|
-
|
|
13
|
-
| Tool | Runs | What it does |
|
|
14
|
-
| ---------------- | -------------------------- | ----------------------------------------------------------------------- |
|
|
15
|
-
| `apitogo_create` | `apitogo create` | A new project folder; `template` `full` or `blank`, optional `services` |
|
|
16
|
-
| `apitogo_init` | `apitogo init` | Prepares an existing folder: `apitogo.config.json` and `apitogo/` only |
|
|
17
|
-
| `apitogo_add` | `apitogo add <service>` | Adds `portal`, `gateway`, `identity` or `plans`; settings in `options` |
|
|
18
|
-
| `apitogo_remove` | `apitogo remove <service>` | Takes a service out of the config; `deleteFiles` also deletes its files |
|
|
19
|
-
| `apitogo_config` | `apitogo config` | Portal name, OpenAPI, docs pages, plans, or a `patch` of the config |
|
|
20
|
-
|
|
21
|
-
`options` of `apitogo_add` and `apitogo_config` are the command's flags in camelCase, for example
|
|
22
|
-
`{"planSku":"pro","planPrice":"19"}` for `--plan-sku pro --plan-price 19`. A flag the command does
|
|
23
|
-
not have is refused before anything runs. `true` and `false` are `--flag` and `--no-flag`; a list
|
|
24
|
-
repeats the flag.
|
|
25
|
-
|
|
26
|
-
## Check, preview, deploy
|
|
27
|
-
|
|
28
|
-
| Tool | Runs | What it does |
|
|
29
|
-
| ---------------- | ---------------- | ------------------------------------------------------------ |
|
|
30
|
-
| `apitogo_check` | `apitogo check` | Checks the config and its files; `offline`, `validateBuild` |
|
|
31
|
-
| `apitogo_plan` | `apitogo plan` | What a deploy would do for each service; changes nothing |
|
|
32
|
-
| `apitogo_deploy` | `apitogo deploy` | Deploys what changed; `only`, `force`, `confirmIrreversible` |
|
|
33
|
-
| `apitogo_status` | `apitogo status` | Each service's state and addresses; `skipLive` is faster |
|
|
34
|
-
|
|
35
|
-
## Platform project
|
|
36
|
-
|
|
37
|
-
| Tool | Runs | What it does |
|
|
38
|
-
| ------------------------ | -------------------------- | ---------------------------------------------------------------------------------------------- |
|
|
39
|
-
| `apitogo_project_create` | `apitogo project create` | Creates the project; `plan` free, starter or professional |
|
|
40
|
-
| `apitogo_project_use` | `apitogo project use <id>` | Points the folder at another existing project |
|
|
41
|
-
| `apitogo_secrets_list` | `apitogo secrets list` | The names of the project's secrets, never their values |
|
|
42
|
-
| `apitogo_secrets_remove` | `apitogo secrets rm` | Removes a secret |
|
|
43
|
-
| `apitogo_teardown` | `apitogo teardown` | Deletes the project, or with `only` its gateway, identity or plans; needs `confirmProjectName` |
|
|
44
|
-
|
|
45
|
-
## Not a tool, on purpose
|
|
46
|
-
|
|
47
|
-
| Command | Why |
|
|
48
|
-
| --------------------- | --------------------------------------------------------- |
|
|
49
|
-
| `apitogo login` | Opens a browser to sign you in; run it once in a terminal |
|
|
50
|
-
| `apitogo secrets set` | A secret's value must not pass through the agent |
|
|
51
|
-
| `apitogo run` | The local preview keeps running; start it yourself |
|
|
52
|
-
|
|
53
|
-
## Safety hints
|
|
54
|
-
|
|
55
|
-
Tools carry MCP hints so hosts can ask before running them: `apitogo_check`, `apitogo_plan`,
|
|
56
|
-
`apitogo_status` and `apitogo_secrets_list` are read-only; `apitogo_remove`,
|
|
57
|
-
`apitogo_secrets_remove` and `apitogo_teardown` are marked destructive.
|
|
1
|
+
---
|
|
2
|
+
title: MCP tools
|
|
3
|
+
description: Every tool of the APItoGo MCP server and the CLI command it runs.
|
|
4
|
+
sidebar_icon: wrench
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Each tool runs one `apitogo` command with `--json` in the project folder and answers with its JSON.
|
|
8
|
+
Every tool takes `directory`: the project folder, absolute or relative to where the server runs
|
|
9
|
+
(default: that folder).
|
|
10
|
+
|
|
11
|
+
## Make and shape a project
|
|
12
|
+
|
|
13
|
+
| Tool | Runs | What it does |
|
|
14
|
+
| ---------------- | -------------------------- | ----------------------------------------------------------------------- |
|
|
15
|
+
| `apitogo_create` | `apitogo create` | A new project folder; `template` `full` or `blank`, optional `services` |
|
|
16
|
+
| `apitogo_init` | `apitogo init` | Prepares an existing folder: `apitogo.config.json` and `apitogo/` only |
|
|
17
|
+
| `apitogo_add` | `apitogo add <service>` | Adds `portal`, `gateway`, `identity` or `plans`; settings in `options` |
|
|
18
|
+
| `apitogo_remove` | `apitogo remove <service>` | Takes a service out of the config; `deleteFiles` also deletes its files |
|
|
19
|
+
| `apitogo_config` | `apitogo config` | Portal name, OpenAPI, docs pages, plans, or a `patch` of the config |
|
|
20
|
+
|
|
21
|
+
`options` of `apitogo_add` and `apitogo_config` are the command's flags in camelCase, for example
|
|
22
|
+
`{"planSku":"pro","planPrice":"19"}` for `--plan-sku pro --plan-price 19`. A flag the command does
|
|
23
|
+
not have is refused before anything runs. `true` and `false` are `--flag` and `--no-flag`; a list
|
|
24
|
+
repeats the flag.
|
|
25
|
+
|
|
26
|
+
## Check, preview, deploy
|
|
27
|
+
|
|
28
|
+
| Tool | Runs | What it does |
|
|
29
|
+
| ---------------- | ---------------- | ------------------------------------------------------------ |
|
|
30
|
+
| `apitogo_check` | `apitogo check` | Checks the config and its files; `offline`, `validateBuild` |
|
|
31
|
+
| `apitogo_plan` | `apitogo plan` | What a deploy would do for each service; changes nothing |
|
|
32
|
+
| `apitogo_deploy` | `apitogo deploy` | Deploys what changed; `only`, `force`, `confirmIrreversible` |
|
|
33
|
+
| `apitogo_status` | `apitogo status` | Each service's state and addresses; `skipLive` is faster |
|
|
34
|
+
|
|
35
|
+
## Platform project
|
|
36
|
+
|
|
37
|
+
| Tool | Runs | What it does |
|
|
38
|
+
| ------------------------ | -------------------------- | ---------------------------------------------------------------------------------------------- |
|
|
39
|
+
| `apitogo_project_create` | `apitogo project create` | Creates the project; `plan` free, starter or professional |
|
|
40
|
+
| `apitogo_project_use` | `apitogo project use <id>` | Points the folder at another existing project |
|
|
41
|
+
| `apitogo_secrets_list` | `apitogo secrets list` | The names of the project's secrets, never their values |
|
|
42
|
+
| `apitogo_secrets_remove` | `apitogo secrets rm` | Removes a secret |
|
|
43
|
+
| `apitogo_teardown` | `apitogo teardown` | Deletes the project, or with `only` its gateway, identity or plans; needs `confirmProjectName` |
|
|
44
|
+
|
|
45
|
+
## Not a tool, on purpose
|
|
46
|
+
|
|
47
|
+
| Command | Why |
|
|
48
|
+
| --------------------- | --------------------------------------------------------- |
|
|
49
|
+
| `apitogo login` | Opens a browser to sign you in; run it once in a terminal |
|
|
50
|
+
| `apitogo secrets set` | A secret's value must not pass through the agent |
|
|
51
|
+
| `apitogo run` | The local preview keeps running; start it yourself |
|
|
52
|
+
|
|
53
|
+
## Safety hints
|
|
54
|
+
|
|
55
|
+
Tools carry MCP hints so hosts can ask before running them: `apitogo_check`, `apitogo_plan`,
|
|
56
|
+
`apitogo_status` and `apitogo_secrets_list` are read-only; `apitogo_remove`,
|
|
57
|
+
`apitogo_secrets_remove` and `apitogo_teardown` are marked destructive.
|