@lukoweb/apitogo 0.1.66 → 0.1.68

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.
Files changed (55) hide show
  1. package/dist/cli/cli.js +529 -379
  2. package/docs/components/playground.mdx +6 -8
  3. package/docs/components/slot.mdx +2 -2
  4. package/docs/concepts/auth-provider-api-identities.md +8 -12
  5. package/docs/configuration/ai-assistants.md +3 -3
  6. package/docs/configuration/api-catalog.md +4 -4
  7. package/docs/configuration/api-reference.md +11 -11
  8. package/docs/configuration/authentication-auth0.md +8 -1
  9. package/docs/configuration/authentication-azure-ad.md +8 -1
  10. package/docs/configuration/authentication-clerk.md +8 -1
  11. package/docs/configuration/authentication-firebase.md +8 -1
  12. package/docs/configuration/authentication-pingfederate.md +8 -1
  13. package/docs/configuration/authentication-supabase.md +10 -3
  14. package/docs/configuration/authentication.md +96 -195
  15. package/docs/configuration/build-configuration.mdx +2 -2
  16. package/docs/configuration/docs.md +10 -10
  17. package/docs/configuration/footer.mdx +84 -180
  18. package/docs/configuration/llms.md +1 -1
  19. package/docs/configuration/make-config.mdx +12 -5
  20. package/docs/configuration/manifest.md +4 -14
  21. package/docs/configuration/navigation.mdx +2 -2
  22. package/docs/configuration/overview.md +95 -310
  23. package/docs/configuration/protected-routes.md +3 -3
  24. package/docs/configuration/search.md +4 -3
  25. package/docs/configuration/site.md +5 -5
  26. package/docs/configuration/slots.mdx +1 -1
  27. package/docs/custom-plugins.md +1 -1
  28. package/docs/customization/colors-theme.mdx +8 -8
  29. package/docs/customization/fonts.md +4 -4
  30. package/docs/deploy/apitogo.md +18 -12
  31. package/docs/deploy/cloudflare-pages.md +0 -1
  32. package/docs/deploy/direct-upload.md +0 -1
  33. package/docs/deploy/github-pages.md +1 -2
  34. package/docs/deploy/vercel.md +2 -3
  35. package/docs/deployment.md +11 -10
  36. package/docs/extending/events.md +1 -1
  37. package/docs/guides/custom-pages.md +4 -8
  38. package/docs/guides/environment-variables.md +41 -49
  39. package/docs/guides/managing-api-keys-and-identities.md +40 -115
  40. package/docs/guides/navigation-rules.mdx +1 -1
  41. package/docs/guides/processors.mdx +2 -2
  42. package/docs/guides/transforming-examples.md +1 -1
  43. package/docs/markdown/code-blocks.md +2 -2
  44. package/docs/markdown/mdx.md +1 -1
  45. package/docs/mcp/go-live.md +100 -0
  46. package/docs/mcp/overview.md +76 -0
  47. package/docs/mcp/setup.md +173 -0
  48. package/docs/mcp/shape.md +76 -0
  49. package/docs/mcp/tools.md +102 -0
  50. package/docs/plugins.md +20 -1
  51. package/docs/quickstart.md +49 -54
  52. package/docs/writing.mdx +1 -1
  53. package/package.json +1 -1
  54. package/src/vite/plugin-config.ts +3 -0
  55. package/docs/guides/navigation-migration.md +0 -87
@@ -1,87 +1,82 @@
1
1
  ---
2
2
  title: Quickstart
3
3
  description:
4
- Get started with APIToGo by creating a new APIToGo app using the `@lukoweb/create-apitogo` tool.
4
+ Get started with APIToGo MCP — connect your agent, shape a portal, and preview locally.
5
5
  sidebar_icon: circle-play
6
- zuplo: false
7
6
  ---
8
7
 
9
- Ready to build beautiful API documentation and developer portals in minutes? APIToGo's CLI tool will
10
- have you up and running with a modern, customizable site that your developers will love.
8
+ Build an API product (developer portal, plans, gateway, backend) with an AI agent and the
9
+ **APItoGo MCP** server. Works with Cursor, Claude, Codex, and other MCP hosts.
11
10
 
12
11
  ## Prerequisites
13
12
 
14
- - **Node.js** `22.7.0+` (or `20.19+`) - [Download here](https://nodejs.org/)
15
- - A terminal or command prompt
16
- - Your favorite code editor
13
+ - **Node.js 20+** on the agent machine
14
+ - An MCP-capable agent (Cursor, Claude Desktop / Claude Code, Codex, …)
15
+ - Platform API keys from [apitogo.com](https://apitogo.com)
17
16
 
18
- ## Getting Started
17
+ ## Get started
19
18
 
20
19
  <Stepper>
21
20
 
22
- 1. **Create your new APIToGo project:**
21
+ 1. **Create API credentials**
23
22
 
24
- ```bash
25
- npm create @lukoweb/apitogo@latest
26
- ```
23
+ In the [APItoGo dashboard](https://apitogo.com), create an API key and copy the **key id** and
24
+ **secret**.
27
25
 
28
- The CLI will walk you through setting up your project with interactive prompts. By default you
29
- get an empty dev-portal site; opt in to include starter example docs and an OpenAPI spec.
26
+ 1. **Configure MCP in your agent**
30
27
 
31
- 1. **Navigate to your project:**
28
+ Wire `@lukoweb/apitogo-mcp` with your keys. Paste-ready snippets for **Cursor**, **Claude
29
+ Desktop**, **Claude Code**, **Codex**, and other hosts:
32
30
 
33
- ```bash
34
- cd your-project-name
35
- ```
31
+ → **[Configure MCP in your agent](./mcp/setup.md)**
36
32
 
37
- 1. **Launch the development server:**
33
+ Verify with `whoami` or by listing APItoGo tools.
38
34
 
39
- ```bash
40
- npm run dev
41
- ```
35
+ 1. **Shape a product**
42
36
 
43
- 🎉 **That's it!** Your APIToGo site is now running at `http://localhost:3000`. You'll see hot
44
- reloading as you make changes, so you can iterate quickly.
37
+ Ask your agent something like:
45
38
 
46
- 1. **What's next?**
47
- - Customize your [theme and colors](./customization/colors-theme.mdx)
48
- - Add your [OpenAPI specifications](./configuration/api-reference.md)
49
- - Set up [authentication](./configuration/authentication.md)
50
- - [Deploy your site](./deployment.md) when you're ready to go live
39
+ > Create a portal in `./dev-portal` for my API in `./api` with Free (100/min) and Pro (1000/min);
40
+ > make `/health` public.
51
41
 
52
- </Stepper>
42
+ The agent should call `apply_product_intent` with `mode: "shape"` (or `create_dev_portal` for an
43
+ empty scaffold). See [Shape](./mcp/shape.md).
44
+
45
+ 1. **Preview locally**
53
46
 
54
- ## Use an existing folder (Markdown and OpenAPI)
47
+ ```bash
48
+ cd ./dev-portal
49
+ npm run dev
50
+ ```
55
51
 
56
- If you already have **`.md` / `.mdx`** files and an **OpenAPI** spec in a project directory, you can
57
- add APIToGo without starting from `create-apitogo`:
52
+ Open `http://localhost:3000`. Iterate with MCP tools (pages, OpenAPI, theme, plans). Customize
53
+ the home page in `landing/LandingPage.tsx` when you have real copy.
58
54
 
59
- 1. **Lay out content in a predictable way** — Put docs under a single folder (default name
60
- **`pages/`**). Place your OpenAPI file where the tooling can find it, for example
61
- **`apis/openapi.json`** or **`openapi.json`** in the project root.
55
+ 1. **Go live when ready**
62
56
 
63
- 2. **Install the CLI** (once per machine), then run **`make-config`** from that project root:
57
+ Save OIDC (and Stripe if you have paid plans) in the site `.env`, then ask the agent to publish
58
+ — see [Go live](./mcp/go-live.md). Never paste secrets into chat.
64
59
 
65
- ```bash
66
- npm install -g @lukoweb/apitogo@latest
67
- apitogo make-config
68
- ```
60
+ </Stepper>
69
61
 
70
- This can create **`package.json`**, **`tsconfig.json`**, and **`apitogo.config.tsx`** when
71
- missing, add an **`apis`** entry when a spec is detected, and generate **`navigation`** and
72
- **`redirects`** from your Markdown tree.
62
+ ## What's next
73
63
 
74
- 3. **Install dependencies and start dev** (if `package.json` was just created):
64
+ - [Configure MCP](./mcp/setup.md) — agent-specific install
65
+ - [MCP overview](./mcp/overview.md) — what the server does
66
+ - [Shape](./mcp/shape.md) · [Go live](./mcp/go-live.md) · [Tools](./mcp/tools.md)
67
+ - [Manifest](./configuration/manifest.md) · [Authentication](./configuration/authentication.md)
75
68
 
76
- ```bash
77
- npm install
78
- npm run dev
79
- ```
69
+ ## Without an agent (CLI)
80
70
 
81
- For options (for example `--pages-dir` if your docs are not under `pages/`) and full behavior, see
82
- **[Make config (CLI)](./configuration/make-config.mdx)**.
71
+ If you prefer not to use MCP:
83
72
 
84
- ## 🚀 Pro Tips
73
+ ```bash
74
+ npm create @lukoweb/apitogo@latest
75
+ cd your-project-name
76
+ npm run dev
77
+ ```
85
78
 
86
- - Use `npm run build` to create a production build
87
- - Join our [Discord community](https://apitogo.com) for support and tips
79
+ For an existing `pages/` + OpenAPI folder: `apitogo make-config` (see
80
+ [Make config](./configuration/make-config.mdx)). Portal sites still need `apitogo.config.json` —
81
+ [Manifest](./configuration/manifest.md). Site-only deploy with a token:
82
+ [Deploy with APIToGo CLI](./deploy/apitogo.md).
package/docs/writing.mdx CHANGED
@@ -30,7 +30,7 @@ Your content goes here using standard Markdown syntax.
30
30
  To make your documentation discoverable, add it to the navigation configuration. Documents are
31
31
  referenced by their file path:
32
32
 
33
- ```ts title="apitogo.config.ts"
33
+ ```ts title="config"
34
34
  const config = {
35
35
  navigation: [
36
36
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lukoweb/apitogo",
3
- "version": "0.1.66",
3
+ "version": "0.1.68",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "**/*.css",
@@ -77,8 +77,11 @@ import { runPluginTransformConfig } from "@lukoweb/apitogo/plugins";
77
77
 
78
78
  const embeddedConfig = ${serializeClientConfig(loadedConfig)};
79
79
 
80
+ // JSON embedding drops Symbol values (React element's $$typeof). Prefer live
81
+ // navigation/plugins from the TSX module so custom-page elements stay valid.
80
82
  const config = await runPluginTransformConfig({
81
83
  ...embeddedConfig,
84
+ navigation: rawConfig?.navigation ?? embeddedConfig.navigation,
82
85
  plugins: rawConfig?.plugins ?? embeddedConfig.plugins ?? [],
83
86
  __meta: ${JSON.stringify(clientMeta)},
84
87
  });
@@ -1,87 +0,0 @@
1
- ---
2
- title: Navigation Migration
3
- navigation_icon: arrow-right-left
4
- ---
5
-
6
- This guide explains how to migrate existing configurations that used `topNavigation`, `sidebar` and
7
- `customPages` to the new unified `navigation` configuration introduced in vNEXT.
8
-
9
- ## Overview
10
-
11
- Navigation is now configured through a single `navigation` array. Items at the root level become top
12
- navigation tabs, while nested categories automatically form the sidebar. Custom pages are added
13
- using the `custom-page` item type.
14
-
15
- ## Before and After
16
-
17
- ```tsx title="Before"
18
- const config: ApitogoConfig = {
19
- topNavigation: [
20
- { id: "docs", label: "Docs" },
21
- { id: "api", label: "API" },
22
- ],
23
- sidebar: {
24
- docs: [{ type: "doc", id: "introduction" }],
25
- },
26
- customPages: [{ path: "/playground", render: Playground, prose: false }],
27
- apis: {
28
- type: "file",
29
- input: "./openapi.json",
30
- navigationId: "api",
31
- },
32
- };
33
- ```
34
-
35
- ```tsx title="After"
36
- const config: ApitogoConfig = {
37
- navigation: [
38
- {
39
- type: "category",
40
- label: "Docs",
41
- items: ["introduction"],
42
- },
43
- {
44
- type: "custom-page",
45
- path: "/playground",
46
- element: <Playground />,
47
- },
48
- {
49
- type: "link",
50
- to: "/api",
51
- label: "API",
52
- },
53
- ],
54
- apis: [
55
- {
56
- path: "/api",
57
- type: "file",
58
- input: "./openapi.json",
59
- },
60
- ],
61
- };
62
- ```
63
-
64
- ## Migration steps
65
-
66
- <Stepper>
67
-
68
- 1. **Create a `navigation` array**
69
-
70
- Move all items from `topNavigation` and your sidebar into a new `navigation` array.
71
-
72
- 1. **Convert custom pages**
73
-
74
- Replace entries in `customPages` with `type: "custom-page"` items inside `navigation`.
75
-
76
- 1. **Update plugin configs**
77
-
78
- Replace all uses of `navigationId` with `path` in plugin options like `apis` or `catalogs`.
79
- Navigation items of type `link` should use the `to` property to reference the path of the API or
80
- catalog.
81
-
82
- 1. **Reference plugin paths in navigation**
83
-
84
- Items produced by plugins are not added automatically. Add links or categories in your
85
- `navigation` so users can access them.
86
-
87
- </Stepper>