@lukoweb/apitogo 0.2.54 → 0.2.57
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 +2196 -1352
- package/dist/declarations/cli/platform/client/platform-api.d.ts +29 -0
- package/dist/declarations/cli/platform/helpers/platform-plan-catalog.d.ts +6 -0
- package/dist/declarations/config/validators/ZudokuConfig.d.ts +2 -0
- package/dist/declarations/lib/authentication/providers/openid.d.ts +2 -1
- package/dist/declarations/lib/plugins/markdown/index.d.ts +2 -1
- package/dist/flat-config.d.ts +1 -0
- package/docs/cli/commands.md +50 -32
- package/docs/cli/go-live.md +66 -93
- package/docs/cli/overview.md +18 -17
- package/docs/cli/setup.md +130 -141
- package/docs/cli/shape.md +94 -11
- package/docs/cli/walkthrough.md +1 -1
- package/docs/components/slot.mdx +116 -119
- package/docs/configuration/api-reference.md +98 -397
- package/docs/configuration/authentication.md +118 -159
- package/docs/configuration/footer.mdx +89 -118
- package/docs/configuration/make-config.mdx +2 -2
- package/docs/configuration/overview.md +97 -166
- package/docs/configuration/plans.md +100 -110
- package/docs/configuration/portal.md +116 -0
- package/docs/customization/colors-theme.mdx +255 -278
- package/docs/customization/fonts.md +105 -110
- package/docs/customization/landing-page.md +189 -188
- package/docs/deploy/apitogo.md +13 -17
- package/docs/deployment.md +15 -9
- package/docs/guides/stripe-setup.mdx +123 -0
- package/docs/markdown/frontmatter.md +172 -173
- package/docs/mcp/go-live.md +100 -100
- package/docs/mcp/overview.md +76 -76
- package/docs/quickstart.md +88 -72
- package/docs/writing.mdx +68 -72
- package/package.json +1 -1
- package/src/config/v2/docs-navigation.ts +7 -2
- package/src/config/v2/index.ts +1 -0
- package/src/config/v2/resolve.ts +28 -0
- package/src/config/v2/rules.ts +32 -1
- package/src/config/v2/schema.ts +9 -0
- package/src/config/v2/services.ts +90 -15
- package/src/config/v2/starter-landing.ts +41 -0
- package/src/config/v2/wrapper.ts +141 -7
- package/src/config/validators/ZudokuConfig.ts +794 -792
- package/src/lib/authentication/providers/openid.tsx +6 -1
- package/src/lib/plugins/markdown/index.tsx +86 -82
- package/src/vite/dev-server.ts +9 -1
- package/src/vite/dev-ssr-config.ts +32 -0
- package/src/vite/plugin-config.ts +4 -2
- package/src/vite/plugin-docs.ts +213 -205
- package/docs/concepts/auth-provider-api-identities.md +0 -105
- package/docs/configuration/ai-assistants.md +0 -65
- package/docs/configuration/api-catalog.md +0 -109
- package/docs/configuration/authentication-auth0.md +0 -181
- package/docs/configuration/authentication-azure-ad.md +0 -245
- package/docs/configuration/authentication-clerk.md +0 -117
- package/docs/configuration/authentication-firebase.md +0 -69
- package/docs/configuration/authentication-pingfederate.md +0 -143
- package/docs/configuration/authentication-supabase.md +0 -233
- package/docs/configuration/build-configuration.mdx +0 -147
- package/docs/configuration/docs.md +0 -282
- package/docs/configuration/llms.md +0 -90
- package/docs/configuration/manifest.md +0 -129
- package/docs/configuration/navigation.mdx +0 -415
- package/docs/configuration/protected-routes.md +0 -150
- package/docs/configuration/search.md +0 -164
- package/docs/configuration/sentry.mdx +0 -44
- package/docs/configuration/site.md +0 -124
- package/docs/configuration/slots.mdx +0 -125
- package/docs/configuration/vite-config.md +0 -18
- package/docs/custom-plugins.md +0 -285
- package/docs/deploy/apache-nginx.md +0 -41
- package/docs/deploy/cloudflare-pages.md +0 -74
- package/docs/deploy/direct-upload.md +0 -17
- package/docs/deploy/github-pages.md +0 -49
- package/docs/deploy/vercel.md +0 -101
- package/docs/extending/events.md +0 -124
- package/docs/guides/environment-variables.md +0 -94
- package/docs/guides/managing-api-keys-and-identities.md +0 -89
- package/docs/guides/navigation-rules.mdx +0 -203
- package/docs/guides/processors.mdx +0 -234
- package/docs/guides/transforming-examples.md +0 -156
- package/docs/guides/using-multiple-apis.md +0 -87
- package/docs/plugins.md +0 -24
|
@@ -18,6 +18,11 @@ export interface ProjectModuleStateDto {
|
|
|
18
18
|
type: string;
|
|
19
19
|
status: string;
|
|
20
20
|
}
|
|
21
|
+
export type ProjectIdentityBrandingBody = {
|
|
22
|
+
name?: string;
|
|
23
|
+
logoUrl?: string;
|
|
24
|
+
color?: string;
|
|
25
|
+
};
|
|
21
26
|
export interface ProjectDto {
|
|
22
27
|
id: string;
|
|
23
28
|
ownerTenantId: string;
|
|
@@ -246,6 +251,27 @@ export interface DevPortalEmailDnsRecordDto {
|
|
|
246
251
|
value: string;
|
|
247
252
|
ttlSeconds?: number | null;
|
|
248
253
|
}
|
|
254
|
+
export interface PlatformPlanDto {
|
|
255
|
+
id: string;
|
|
256
|
+
displayName: string;
|
|
257
|
+
tagline: string;
|
|
258
|
+
priceAmount: string;
|
|
259
|
+
pricePeriod: string;
|
|
260
|
+
ctaLabel: string;
|
|
261
|
+
sortOrder: number;
|
|
262
|
+
highlights: string[];
|
|
263
|
+
entitlements: {
|
|
264
|
+
featureKey: string;
|
|
265
|
+
valueType: string;
|
|
266
|
+
value: string;
|
|
267
|
+
}[];
|
|
268
|
+
}
|
|
269
|
+
export interface BillingWebhookStatusDto {
|
|
270
|
+
webhookSecretConfigured: boolean;
|
|
271
|
+
lastEventAtUtc: string | null;
|
|
272
|
+
lastEventType: string | null;
|
|
273
|
+
eventCount: number;
|
|
274
|
+
}
|
|
249
275
|
export interface DevPortalBackendDto {
|
|
250
276
|
fqdn: string | null;
|
|
251
277
|
containerAppName: string;
|
|
@@ -560,6 +586,7 @@ export declare class PlatformApiClient {
|
|
|
560
586
|
}): Promise<GatewayDryRunDto>;
|
|
561
587
|
deleteGateway(projectId: string): Promise<GatewayTeardownAcceptedDto>;
|
|
562
588
|
putProjectIdentity(projectId: string, body: ProjectIdentityRequestBody): Promise<ProjectIdentityDto>;
|
|
589
|
+
putProjectIdentityBranding(projectId: string, body: ProjectIdentityBrandingBody): Promise<void>;
|
|
563
590
|
putProjectIdentityConnection(projectId: string, connectionId: string, body: ProjectIdentityConnectionBody): Promise<ProjectIdentityConnectionDto>;
|
|
564
591
|
listProjectIdentityConnections(projectId: string): Promise<ProjectIdentityConnectionDto[]>;
|
|
565
592
|
deleteProjectIdentityConnection(projectId: string, connectionId: string): Promise<void>;
|
|
@@ -573,6 +600,8 @@ export declare class PlatformApiClient {
|
|
|
573
600
|
cancelUrl?: string;
|
|
574
601
|
}): Promise<DevPortalBillingDto>;
|
|
575
602
|
linkDevPortalIdentity(projectId: string): Promise<DevPortalIdentityLinkDto>;
|
|
603
|
+
listPlatformPlans(): Promise<PlatformPlanDto[]>;
|
|
604
|
+
getBillingWebhookStatus(projectId: string): Promise<BillingWebhookStatusDto | null>;
|
|
576
605
|
getDevPortalBackend(projectId: string): Promise<DevPortalBackendDto | null>;
|
|
577
606
|
getDevPortalSetupStatus(projectId: string): Promise<DevPortalSetupStatusDto>;
|
|
578
607
|
getDevPortalSettings(projectId: string): Promise<DevPortalSettingsDto | null>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { PlatformPlanDto } from "../client/platform-api.js";
|
|
1
2
|
import type { FreeProjectsQuota } from "./free-projects-quota.js";
|
|
2
3
|
export type PlatformPlanId = "free" | "starter" | "professional";
|
|
3
4
|
export interface PlatformPlanOption {
|
|
@@ -12,6 +13,11 @@ export interface PlatformPlanOption {
|
|
|
12
13
|
limitations: string[];
|
|
13
14
|
}
|
|
14
15
|
export declare const PLATFORM_PLAN_CATALOG: PlatformPlanOption[];
|
|
16
|
+
export type PlatformPlanDisplay = Pick<PlatformPlanOption, "displayName" | "priceLabel" | "summary" | "features" | "limitations"> & {
|
|
17
|
+
id: string;
|
|
18
|
+
};
|
|
19
|
+
export declare function toPlanDisplays(plans: readonly PlatformPlanDto[]): PlatformPlanDisplay[];
|
|
20
|
+
export declare function loadPlanDisplays(listPlatformPlans: () => Promise<PlatformPlanDto[]>): Promise<PlatformPlanDisplay[]>;
|
|
15
21
|
export declare const PLATFORM_PLAN_USER_PROMPT = "Which API ToGo platform plan do you want for this project \u2014 Free, Starter, or Professional?";
|
|
16
22
|
export declare function formatFreeProjectsQuotaHint(quota: FreeProjectsQuota): string;
|
|
17
23
|
export declare function buildPlatformPlanSelectionAgentInstruction(quota?: FreeProjectsQuota | null): string;
|
|
@@ -331,6 +331,7 @@ declare const AuthenticationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
331
331
|
redirectToAfterSignUp: z.ZodOptional<z.ZodString>;
|
|
332
332
|
redirectToAfterSignIn: z.ZodOptional<z.ZodString>;
|
|
333
333
|
redirectToAfterSignOut: z.ZodOptional<z.ZodString>;
|
|
334
|
+
tokenIdentity: z.ZodOptional<z.ZodBoolean>;
|
|
334
335
|
}, z.core.$strip>, z.ZodObject<{
|
|
335
336
|
type: z.ZodLiteral<"azureb2c">;
|
|
336
337
|
basePath: z.ZodOptional<z.ZodString>;
|
|
@@ -6753,6 +6754,7 @@ export declare const ZudokuConfig: z.ZodObject<{
|
|
|
6753
6754
|
redirectToAfterSignUp: z.ZodOptional<z.ZodString>;
|
|
6754
6755
|
redirectToAfterSignIn: z.ZodOptional<z.ZodString>;
|
|
6755
6756
|
redirectToAfterSignOut: z.ZodOptional<z.ZodString>;
|
|
6757
|
+
tokenIdentity: z.ZodOptional<z.ZodBoolean>;
|
|
6756
6758
|
}, z.core.$strip>, z.ZodObject<{
|
|
6757
6759
|
type: z.ZodLiteral<"azureb2c">;
|
|
6758
6760
|
basePath: z.ZodOptional<z.ZodString>;
|
|
@@ -35,7 +35,8 @@ export declare class OpenIDAuthenticationProvider extends CoreAuthenticationPlug
|
|
|
35
35
|
protected readonly redirectToAfterSignOut: string;
|
|
36
36
|
private readonly audience?;
|
|
37
37
|
private readonly scopes;
|
|
38
|
-
|
|
38
|
+
private readonly tokenIdentity;
|
|
39
|
+
constructor({ issuer, audience, clientId, redirectToAfterSignUp, redirectToAfterSignIn, redirectToAfterSignOut, basePath, scopes, tokenIdentity, }: OpenIDAuthenticationConfig);
|
|
39
40
|
protected getAuthServer(): Promise<oauth.AuthorizationServer>;
|
|
40
41
|
protected setTokensFromResponse(response: oauth.TokenEndpointResponse): void;
|
|
41
42
|
signUp(_: {
|
|
@@ -6,6 +6,7 @@ import type { ApitogoPlugin } from "../../core/plugins.js";
|
|
|
6
6
|
export interface MarkdownPluginOptions extends ZudokuDocsConfig {
|
|
7
7
|
basePath: string;
|
|
8
8
|
fileImports: Record<string, () => Promise<MDXImport>>;
|
|
9
|
+
reservedPaths?: string[];
|
|
9
10
|
}
|
|
10
11
|
export type MarkdownPluginDefaultOptions = Pick<Frontmatter, "toc" | "disablePager" | "showLastModified" | "suggestEdit" | "copyPage">;
|
|
11
12
|
export type Frontmatter = {
|
|
@@ -31,5 +32,5 @@ export type MDXImport = {
|
|
|
31
32
|
__filepath: string;
|
|
32
33
|
default: (props: MDXProps) => JSX.Element;
|
|
33
34
|
};
|
|
34
|
-
export declare const withIndexAliases: <T>(fileImports: Record<string, T
|
|
35
|
+
export declare const withIndexAliases: <T>(fileImports: Record<string, T>, reserved?: readonly string[]) => [string, T][];
|
|
35
36
|
export declare const markdownPlugin: (options: MarkdownPluginOptions) => ApitogoPlugin;
|
package/dist/flat-config.d.ts
CHANGED
package/docs/cli/commands.md
CHANGED
|
@@ -12,25 +12,26 @@ same commands so agents and humans get identical behavior.
|
|
|
12
12
|
|
|
13
13
|
| Command | Role |
|
|
14
14
|
| ---------------- | ------------------------------------------------------------------------ |
|
|
15
|
-
| `
|
|
15
|
+
| `create` | Guided setup in a new folder (`--template full` for every service) |
|
|
16
|
+
| `init` | Create a project in the current folder |
|
|
16
17
|
| `config` | Write or update `apitogo.config.json` (interactive or flags) |
|
|
17
18
|
| `run` | Local preview server |
|
|
18
19
|
| `build` | Production build (`--preview` to serve locally) |
|
|
19
20
|
| `check` | Publish readiness (secrets, manifest, site validation) |
|
|
20
21
|
| `project create` | Create the platform project (Free plan in version 2) and link the folder |
|
|
21
|
-
| `
|
|
22
|
+
| `project use` | Move the folder to another existing project |
|
|
23
|
+
| `deploy` | Deploy the portal, gateway, sign-in and plans |
|
|
22
24
|
| `status` | Account, project, and live readiness |
|
|
23
25
|
| `teardown --yes` | Delete the linked platform project |
|
|
24
26
|
|
|
25
27
|
## Scaffold and config
|
|
26
28
|
|
|
27
|
-
| Command | Role
|
|
28
|
-
| ------------ |
|
|
29
|
-
| `init [dir]` | Folder (default
|
|
30
|
-
| `config` | Interactive on TTY; flags: `--openapi`, `--page-*`, `--plan`, `--backend`, `--theme`, `--patch`, `--json`
|
|
29
|
+
| Command | Role |
|
|
30
|
+
| ------------ | --------------------------------------------------------------------------------------------------------- |
|
|
31
|
+
| `init [dir]` | Folder (default: the current one); `--name`, `--yes`, `--dry-run`, `--force`, `--json` |
|
|
32
|
+
| `config` | Interactive on TTY; flags: `--openapi`, `--page-*`, `--plan`, `--backend`, `--theme`, `--patch`, `--json` |
|
|
31
33
|
|
|
32
|
-
`
|
|
33
|
-
scaffold. See [Install the CLI](./setup.md#scaffold-options).
|
|
34
|
+
`init` uses an existing `docs/` folder in place. See [Install the CLI](./setup.md#scaffold-options).
|
|
34
35
|
|
|
35
36
|
See [Make config (CLI)](../configuration/make-config.mdx) for all `config` flags.
|
|
36
37
|
|
|
@@ -44,17 +45,17 @@ See [Make config (CLI)](../configuration/make-config.mdx) for all `config` flags
|
|
|
44
45
|
|
|
45
46
|
## Platform (requires API credentials)
|
|
46
47
|
|
|
47
|
-
| Command
|
|
48
|
-
|
|
|
49
|
-
| `project create`
|
|
50
|
-
| `
|
|
51
|
-
| `
|
|
52
|
-
| `deploy
|
|
53
|
-
| `deploy --
|
|
54
|
-
| `deploy --
|
|
55
|
-
| `deploy --resume-from`
|
|
56
|
-
| `status`
|
|
57
|
-
| `teardown --yes`
|
|
48
|
+
| Command | Role |
|
|
49
|
+
| ------------------------- | ----------------------------------------------------------------------------------------------------- |
|
|
50
|
+
| `project create` | Create the platform project only: chooses the hosting plan, waits for hosting and writes `project.id` |
|
|
51
|
+
| `project use <id>` | Move the folder to another existing project |
|
|
52
|
+
| `check` | Dry-run publish readiness |
|
|
53
|
+
| `deploy` | Deploy every service in the config (and create the project on the first run) |
|
|
54
|
+
| `deploy --only <service>` | Limit to `portal`, `gateway`, `identity` or `plans` |
|
|
55
|
+
| `deploy --force` | Redeploy selected resources even when healthy |
|
|
56
|
+
| `deploy --resume-from` | Resume interrupted publish |
|
|
57
|
+
| `status` | Whoami + project + live verification |
|
|
58
|
+
| `teardown --yes` | Delete platform project (confirmation required) |
|
|
58
59
|
|
|
59
60
|
Env: `APITOGO_API_KEY_ID`, `APITOGO_API_SECRET`. Optional: `APITOGO_API_URL`.
|
|
60
61
|
|
|
@@ -100,15 +101,13 @@ none.
|
|
|
100
101
|
| `--no-wait` | Return before the hosting is ready |
|
|
101
102
|
| `--json` | Print raw JSON only |
|
|
102
103
|
|
|
103
|
-
| `deploy` option
|
|
104
|
-
|
|
|
105
|
-
| `--only`
|
|
106
|
-
| `--env`
|
|
107
|
-
| `--force`
|
|
108
|
-
| `--resume-from`
|
|
109
|
-
| `--no-wait`
|
|
110
|
-
| `--platform-plan` | Ignored. The plan is chosen by `project create --plan` |
|
|
111
|
-
| `--project-name` | Ignored. The name is `project.name` |
|
|
104
|
+
| `deploy` option | In version 2 |
|
|
105
|
+
| --------------- | ---------------------------------------------------------- |
|
|
106
|
+
| `--only` | `portal`, `gateway`, `identity`, `plans` (comma-separated) |
|
|
107
|
+
| `--env` | Static Web App environment (default: production) |
|
|
108
|
+
| `--force` | Redeploy even when nothing changed |
|
|
109
|
+
| `--resume-from` | Resume the publish ledger from a step id |
|
|
110
|
+
| `--no-wait` | Do not wait for long-running jobs |
|
|
112
111
|
|
|
113
112
|
### Selling paid plans needs Starter or Professional
|
|
114
113
|
|
|
@@ -134,12 +133,31 @@ This is what you pay APItoGo for hosting. What your customers pay you for your p
|
|
|
134
133
|
|
|
135
134
|
See [Walkthrough: from an empty folder to a customer's first call](./walkthrough.md).
|
|
136
135
|
|
|
136
|
+
### Move a folder to another project
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
npx apitogo project use fe3a12b0-fbaf-4315-b37f-b731d930ee57
|
|
140
|
+
npx apitogo deploy
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
`project use <id>` points the folder at another project you own, for good. It checks that the
|
|
144
|
+
project exists, writes its id into `project.id` and clears the folder's deploy record, so the next
|
|
145
|
+
`deploy` sets up every service in the new project. The old project is left as it is (`teardown`
|
|
146
|
+
deletes it).
|
|
147
|
+
|
|
148
|
+
- A folder that already deploys to a project asks first. Pass `--yes` to skip the question, which
|
|
149
|
+
scripts and `--json` need.
|
|
150
|
+
- Secrets, such as the Stripe keys, belong to each project: set them again with
|
|
151
|
+
`apitogo secrets set`.
|
|
152
|
+
- The people who signed up to the old portal, and their API keys, stay with the old project.
|
|
153
|
+
|
|
137
154
|
## Hand-edit exceptions
|
|
138
155
|
|
|
139
|
-
| Change | Where
|
|
140
|
-
| ----------------- |
|
|
141
|
-
| Home page content | `landing/LandingPage.tsx`
|
|
142
|
-
| Site footer | `apitogo.
|
|
156
|
+
| Change | Where |
|
|
157
|
+
| ----------------- | ---------------------------------------- |
|
|
158
|
+
| Home page content | `apitogo/portal/landing/LandingPage.tsx` |
|
|
159
|
+
| Site footer | `apitogo/portal/footer/Footer.tsx` |
|
|
160
|
+
| Colors and fonts | `apitogo/portal/theme.json` |
|
|
143
161
|
|
|
144
162
|
There is no CLI command for arbitrary home page content.
|
|
145
163
|
|
package/docs/cli/go-live.md
CHANGED
|
@@ -1,135 +1,108 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Go live with CLI
|
|
3
|
-
description:
|
|
4
|
-
|
|
3
|
+
description: >-
|
|
4
|
+
Deploy your project with npx apitogo deploy: the hosting plan, the secrets deploy asks for, one
|
|
5
|
+
service at a time, and checking the result.
|
|
5
6
|
sidebar_icon: rocket
|
|
6
7
|
---
|
|
7
8
|
|
|
8
|
-
**Go live**
|
|
9
|
-
|
|
10
|
-
`publish_dev_portal` spawns the same CLI.
|
|
9
|
+
**Go live** deploys everything in `apitogo.config.json` to APItoGo: the portal, the gateway, sign-in
|
|
10
|
+
and plans.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
## Before you deploy
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
version 2 project, which `npx @lukoweb/apitogo@latest init` creates by default, is published
|
|
16
|
-
differently: run `npx apitogo project create`, then `npx apitogo deploy`. Its resources are
|
|
17
|
-
`portal`, `gateway`, `identity` and `plans`, and the options `--platform-plan` and `--project-name`
|
|
18
|
-
do not apply. See [Walkthrough: from an empty folder to a customer's first call](./walkthrough.md)
|
|
19
|
-
and
|
|
20
|
-
[Config version 2: create the project, then deploy](./commands.md#config-version-2-create-the-project-then-deploy).
|
|
14
|
+
1. Sign in to APItoGo once on this computer:
|
|
21
15
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
## Before you publish
|
|
25
|
-
|
|
26
|
-
1. Confirm **gateway / API plans** in `apitogo.config.json`. Do not invent Free + Pro unless you
|
|
27
|
-
chose them.
|
|
28
|
-
2. Save secrets in the site **`.env`** (never commit or paste into tickets):
|
|
29
|
-
|
|
30
|
-
```sh
|
|
31
|
-
APITOGO_CONFIG_AUTHENTICATION__OIDC__AUTHORITY=https://login.example.com
|
|
32
|
-
APITOGO_CONFIG_AUTHENTICATION__OIDC__CLIENT_ID=your-client-id
|
|
33
|
-
APITOGO_CONFIG_AUTHENTICATION__OIDC__CLIENT_SECRET=your-client-secret
|
|
34
|
-
# Only when you have paid project plans:
|
|
35
|
-
APITOGO_CONFIG_AUTHENTICATION__STRIPE__SECRET_KEY=sk_test_...
|
|
36
|
-
APITOGO_CONFIG_AUTHENTICATION__STRIPE__WEBHOOK_SECRET=whsec_...
|
|
16
|
+
```bash
|
|
17
|
+
npx apitogo login
|
|
37
18
|
```
|
|
38
19
|
|
|
39
|
-
|
|
40
|
-
**Professional**. Starter and Professional use Stripe checkout on the platform.
|
|
20
|
+
In CI, set `APITOGO_API_KEY_ID` and `APITOGO_API_SECRET` (an API key from the dashboard) instead.
|
|
41
21
|
|
|
42
|
-
|
|
43
|
-
If your manifest has paid API tiers, use Starter or Professional — see
|
|
44
|
-
[Gateway plans](../configuration/plans.md).
|
|
22
|
+
2. Check the config:
|
|
45
23
|
|
|
46
24
|
```bash
|
|
47
|
-
|
|
48
|
-
export APITOGO_API_SECRET=...
|
|
25
|
+
npx apitogo check
|
|
49
26
|
```
|
|
50
27
|
|
|
51
|
-
##
|
|
28
|
+
## Deploy
|
|
52
29
|
|
|
53
30
|
```bash
|
|
54
|
-
|
|
55
|
-
npx apitogo deploy --platform-plan free
|
|
56
|
-
npx apitogo status
|
|
31
|
+
npx apitogo deploy
|
|
57
32
|
```
|
|
58
33
|
|
|
59
|
-
|
|
34
|
+
On the first run, deploy creates the project: it asks for the hosting plan (**Free**, **Starter** or
|
|
35
|
+
**Professional**) and writes the project's id into `apitogo.config.json`. Starter and Professional
|
|
36
|
+
open the platform's checkout. To create the project without deploying, run
|
|
37
|
+
`npx apitogo project create --plan <plan>`.
|
|
60
38
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
39
|
+
Then it sets up each service and prints what it did:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
identity: deployed (https://id.apitogo.com/<project>)
|
|
43
|
+
gateway: deployed (https://<name>.api.apitogo.com/), 12 operation(s)
|
|
44
|
+
plans: deployed, 2 plans, billing: stripe
|
|
45
|
+
portal: deployed to production (https://<name>.apitogo.com)
|
|
46
|
+
Deploy finished.
|
|
47
|
+
```
|
|
66
48
|
|
|
67
|
-
|
|
68
|
-
credentials.
|
|
49
|
+
A step whose input has not changed since the last deploy is skipped. `--force` runs it anyway.
|
|
69
50
|
|
|
70
|
-
|
|
71
|
-
paid gateway plans, create a webhook at `manualSteps.stripeWebhookUrl` for the listed events.
|
|
51
|
+
## Secrets deploy asks for
|
|
72
52
|
|
|
73
|
-
|
|
53
|
+
Deploy asks, hidden, for the secrets the config needs and stores them as project secrets:
|
|
74
54
|
|
|
75
|
-
|
|
55
|
+
| When | It asks for |
|
|
56
|
+
| ------------------------------------- | -------------------------------------------------------------- |
|
|
57
|
+
| `plans.json` has a plan with a price | Your Stripe secret key, then the webhook signing secret |
|
|
58
|
+
| `identity.connections` has a provider | That provider's client secret, under the name the config gives |
|
|
59
|
+
|
|
60
|
+
[Set up Stripe for paid plans](../guides/stripe-setup.mdx) shows where the Stripe values are. Set or
|
|
61
|
+
change a secret yourself with `npx apitogo secrets set <NAME>`, and list them with
|
|
62
|
+
`npx apitogo secrets list`.
|
|
63
|
+
|
|
64
|
+
Selling paid plans and using a custom domain need **Starter** or **Professional**. On **Free**,
|
|
65
|
+
deploy stops at a paid plan and says so.
|
|
66
|
+
|
|
67
|
+
## One service at a time
|
|
76
68
|
|
|
77
69
|
```bash
|
|
78
|
-
npx apitogo deploy --only
|
|
79
|
-
npx apitogo deploy --only
|
|
80
|
-
npx apitogo deploy --only portal-frontend
|
|
81
|
-
npx apitogo deploy --only apihub,portal-frontend
|
|
82
|
-
npx apitogo deploy --only portal-frontend --force
|
|
70
|
+
npx apitogo deploy --only portal
|
|
71
|
+
npx apitogo deploy --only gateway,plans
|
|
83
72
|
```
|
|
84
73
|
|
|
85
|
-
|
|
86
|
-
| ----------------- | ------------------------------------------------ |
|
|
87
|
-
| `apihub` | Gateway plans/baseline, API hub package + deploy |
|
|
88
|
-
| `portal-backend` | Dev-portal module settings and plan catalog |
|
|
89
|
-
| `portal-frontend` | Site build + Static Web App deploy |
|
|
74
|
+
`--only` takes `portal`, `gateway`, `identity` and `plans`.
|
|
90
75
|
|
|
91
|
-
|
|
76
|
+
## Other flags
|
|
92
77
|
|
|
93
|
-
|
|
78
|
+
| Flag | Purpose |
|
|
79
|
+
| -------------- | ------------------------------------------------------------------------ |
|
|
80
|
+
| `--force` | Redeploy even when nothing changed |
|
|
81
|
+
| `--yes` | Confirm a change that cannot be undone, such as another sign-in provider |
|
|
82
|
+
| `--verbose` | Show the build log and every platform step |
|
|
83
|
+
| `--json` | Print the result as JSON only |
|
|
84
|
+
| `--project-id` | Deploy to this project for this run only |
|
|
94
85
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
| `--project-id` | Override project GUID |
|
|
98
|
-
| `--project-name` | Display name when creating a project |
|
|
99
|
-
| `--platform-plan` | `free` \| `starter` \| `professional` |
|
|
100
|
-
| `--resume-from` | Resume publish ledger from step id |
|
|
101
|
-
| `--no-wait` | Do not wait for long-running jobs |
|
|
102
|
-
| `--json` | Print raw JSON result only |
|
|
86
|
+
To move the folder to another project for good, use `npx apitogo project use <id>` (see
|
|
87
|
+
[Commands](./commands.md#move-a-folder-to-another-project)).
|
|
103
88
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
## After publish
|
|
89
|
+
## After deploy
|
|
107
90
|
|
|
108
91
|
```bash
|
|
109
|
-
npx apitogo status # account
|
|
110
|
-
npx apitogo
|
|
111
|
-
npx apitogo teardown --yes # delete the platform project
|
|
92
|
+
npx apitogo status # account, project and live checks
|
|
93
|
+
npx apitogo teardown --yes # delete the project and everything in it
|
|
112
94
|
```
|
|
113
95
|
|
|
114
|
-
##
|
|
115
|
-
|
|
116
|
-
| Kind | Meaning | How |
|
|
117
|
-
| ---------------- | ------------------------------------------- | ------------------------------------------------------------------ |
|
|
118
|
-
| Platform hosting | Free / Starter / Professional on APItoGo | `--platform-plan` |
|
|
119
|
-
| Gateway / API | End-user SKUs and rate limits on `/pricing` | `apitogo.config.json` — [Gateway plans](../configuration/plans.md) |
|
|
120
|
-
|
|
121
|
-
## CLI deploy vs MCP publish
|
|
96
|
+
## Your plans and APItoGo's
|
|
122
97
|
|
|
123
|
-
|
|
|
124
|
-
|
|
|
125
|
-
|
|
|
126
|
-
|
|
|
98
|
+
| Kind | What it is | Where |
|
|
99
|
+
| ------------ | ------------------------------------------------- | --------------------------------------------------------- |
|
|
100
|
+
| Hosting plan | What you pay APItoGo: Free, Starter, Professional | Chosen on the first deploy or `project create --plan` |
|
|
101
|
+
| Your plans | What your users pay you for your API | `apitogo/plans.json` ([Plans](../configuration/plans.md)) |
|
|
127
102
|
|
|
128
103
|
## Related
|
|
129
104
|
|
|
130
|
-
- [
|
|
105
|
+
- [Walkthrough](./walkthrough.md)
|
|
131
106
|
- [Commands](./commands.md)
|
|
132
|
-
- [
|
|
133
|
-
- [Manifest](../configuration/manifest.md)
|
|
134
|
-
- [Gateway plans](../configuration/plans.md)
|
|
107
|
+
- [Configuration overview](../configuration/overview.md)
|
|
135
108
|
- [MCP go live](../mcp/go-live.md)
|
package/docs/cli/overview.md
CHANGED
|
@@ -46,26 +46,27 @@ local files, preview with `npx apitogo run`, and publish to APItoGo hosting with
|
|
|
46
46
|
|
|
47
47
|
Common CLI shape tasks:
|
|
48
48
|
|
|
49
|
-
| Change
|
|
50
|
-
|
|
|
51
|
-
| Backend runtime
|
|
52
|
-
| OpenAPI files (`gateway.specs`)
|
|
53
|
-
| Custom docs pages
|
|
54
|
-
| Gateway / API plans
|
|
55
|
-
| Site title
|
|
56
|
-
| Theme
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
`
|
|
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 and fonts | Edit `apitogo/portal/theme.json` |
|
|
57
|
+
|
|
58
|
+
The home page is `apitogo/portal/landing/LandingPage.tsx` and the footer
|
|
59
|
+
`apitogo/portal/footer/Footer.tsx`, named by `portal.landing` and `portal.footer`.
|
|
60
60
|
|
|
61
61
|
## Config model (local site)
|
|
62
62
|
|
|
63
|
-
| File | Role
|
|
64
|
-
| --------------------- |
|
|
65
|
-
| `apitogo.config.json` |
|
|
66
|
-
|
|
|
63
|
+
| File | Role |
|
|
64
|
+
| --------------------- | ---------------------------------------------- |
|
|
65
|
+
| `apitogo.config.json` | The services: portal, gateway, identity, plans |
|
|
66
|
+
| `apitogo/` | Pages, plans, theme, OpenAPI files |
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
Secrets are project secrets (`npx apitogo secrets set`), never files. Details:
|
|
69
|
+
[Configuration overview](../configuration/overview.md).
|
|
69
70
|
|
|
70
71
|
## CLI vs MCP
|
|
71
72
|
|
|
@@ -88,4 +89,4 @@ workflows.
|
|
|
88
89
|
- [Install the CLI](./setup.md)
|
|
89
90
|
- [Shape](./shape.md) · [Go live](./go-live.md) · [Commands](./commands.md)
|
|
90
91
|
- [MCP overview](../mcp/overview.md) — agent-driven workflow
|
|
91
|
-
- [Manifest](../configuration/
|
|
92
|
+
- [Manifest](../configuration/overview.md)
|