@xano/developer-mcp 2.1.0 → 2.2.1-beta.0
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_docs/topics/auth.js +41 -7
- package/dist/cli_docs/topics/profile.js +71 -2
- package/dist/cli_docs/topics/sandbox.js +2 -1
- package/dist/cli_docs/topics/start.js +10 -3
- package/dist/cli_docs/topics/static_host.js +221 -26
- package/dist/tools/index.d.ts +1 -3
- package/dist/tools/xanoscript_docs.d.ts +1 -3
- package/dist/tools/xanoscript_docs.js +4 -4
- package/dist/xanoscript.d.ts +8 -0
- package/dist/xanoscript.js +43 -3
- package/dist/xanoscript_docs/README.md +1 -0
- package/dist/xanoscript_docs/docs_index.json +17 -4
- package/dist/xanoscript_docs/essentials.md +27 -0
- package/dist/xanoscript_docs/file-uploads.md +408 -0
- package/dist/xanoscript_docs/integrations/utilities.md +61 -21
- package/dist/xanoscript_docs/types.md +12 -1
- package/dist/xanoscript_docs/version.json +1 -1
- package/package.json +1 -1
|
@@ -3,17 +3,26 @@ export const authDoc = {
|
|
|
3
3
|
title: "Xano CLI - Authentication",
|
|
4
4
|
description: `The \`auth\` command provides browser-based OAuth authentication for the Xano CLI. It opens your browser, lets you log in to your Xano account, and automatically creates a profile with your credentials.
|
|
5
5
|
|
|
6
|
-
## How It Works
|
|
6
|
+
## How It Works (default flow)
|
|
7
7
|
|
|
8
|
-
1. CLI starts a local HTTP server on a random port
|
|
8
|
+
1. CLI starts a local HTTP server on a random port (127.0.0.1)
|
|
9
9
|
2. Opens your browser to the Xano login page
|
|
10
10
|
3. After login, Xano redirects back to the local server with your token
|
|
11
11
|
4. CLI validates the token, lets you select instance/workspace/branch
|
|
12
12
|
5. Saves the profile to \`~/.xano/credentials.yaml\`
|
|
13
13
|
|
|
14
|
-
The authentication flow has a 5-minute timeout
|
|
14
|
+
The authentication flow has a 5-minute timeout.
|
|
15
|
+
|
|
16
|
+
## Headless Flow (\`--no-browser\`)
|
|
17
|
+
|
|
18
|
+
On remote/SSH sessions, Docker containers, or locked-down networks where the browser can't reach the CLI's loopback address, use \`--no-browser\`: the CLI prints a login URL, you open it in any browser, and paste back the code it displays. No local callback server required.
|
|
19
|
+
|
|
20
|
+
## Pre-selecting with Flags
|
|
21
|
+
|
|
22
|
+
Each interactive picker can be pre-answered with a flag: \`-i/--instance\` (instance name), \`-w/--workspace\` (workspace ID or name), \`-b/--branch\` (branch label), and \`-p/--profile\` (profile name to save). An empty value (\`""\`) takes the picker's default answer: \`-w ""\` skips workspace selection, \`-b ""\` skips and uses the live branch, \`-p ""\` uses the default profile name. With all four set alongside \`--no-browser\`, the only input is pasting the code from the browser — useful for scripted or remote setups.`,
|
|
15
23
|
ai_hints: `**auth vs profile wizard:**
|
|
16
24
|
- \`xano auth\` - Browser-based OAuth login (recommended for interactive use)
|
|
25
|
+
- \`xano auth --no-browser\` - Headless login: open the printed URL in any browser, paste back the code (for SSH/Docker/remote hosts)
|
|
17
26
|
- \`xano profile wizard\` - Token-based interactive setup (requires manually copying token)
|
|
18
27
|
- \`xano profile create\` - Non-interactive, requires all flags
|
|
19
28
|
|
|
@@ -21,11 +30,15 @@ The authentication flow has a 5-minute timeout.`,
|
|
|
21
30
|
- User is setting up CLI for the first time
|
|
22
31
|
- User doesn't have an access token handy
|
|
23
32
|
- User prefers browser-based login
|
|
33
|
+
- User is in a headless/SSH environment: use \`xano auth --no-browser\`
|
|
24
34
|
|
|
25
|
-
**When to suggest profile wizard instead:**
|
|
35
|
+
**When to suggest profile wizard/create instead:**
|
|
26
36
|
- User already has an access token
|
|
27
|
-
- User
|
|
28
|
-
|
|
37
|
+
- User needs fully non-interactive setup (CI/CD) — \`profile create\` requires no prompts at all
|
|
38
|
+
|
|
39
|
+
**Flag meaning caution:** On \`xano auth\`, \`-p/--profile\` is the *profile name to save*, not the profile-selection flag that other commands use. Backup branches are filtered out of the branch picker.
|
|
40
|
+
|
|
41
|
+
**Self-hosted note:** With a non-default \`--origin\`, the origin itself is the instance, so \`--instance\` is ignored.
|
|
29
42
|
|
|
30
43
|
**After auth, suggest \`xano sandbox\`:**
|
|
31
44
|
The sandbox is a free-tier personal dev environment (auto-provisioned singleton tenant) ideal for experimenting without touching production.`,
|
|
@@ -37,13 +50,21 @@ The sandbox is a free-tier personal dev environment (auto-provisioned singleton
|
|
|
37
50
|
usage: "xano auth [options]",
|
|
38
51
|
flags: [
|
|
39
52
|
{ name: "origin", short: "o", type: "string", required: false, default: "https://app.xano.com", description: "Xano account origin URL. Use this to point at a custom/self-hosted Xano instance." },
|
|
53
|
+
{ name: "no-browser", type: "boolean", required: false, description: "Headless login: print a URL and paste back the code shown in the browser, instead of starting a local callback server (use on remote/SSH/Docker hosts where 127.0.0.1 is not reachable from the browser)" },
|
|
54
|
+
{ name: "instance", short: "i", type: "string", required: false, description: "Pre-select an instance by name (skips the instance picker). Ignored for self-hosted origins." },
|
|
55
|
+
{ name: "workspace", short: "w", type: "string", required: false, description: "Pre-select a workspace by ID or name (skips the workspace picker); pass \"\" to skip workspace" },
|
|
56
|
+
{ name: "branch", short: "b", type: "string", required: false, description: "Pre-select a branch by label (skips the branch picker); pass \"\" to skip and use the live branch" },
|
|
57
|
+
{ name: "profile", short: "p", type: "string", required: false, description: "Profile name to save (skips the profile name prompt); pass \"\" to use the default name. Note: unlike other commands, -p here names the profile being created." },
|
|
40
58
|
{ name: "insecure", short: "k", type: "boolean", required: false, description: "Skip TLS certificate verification (for self-signed certificates)" },
|
|
41
59
|
{ name: "config", short: "c", type: "string", required: false, description: "Path to credentials file (default: ~/.xano/credentials.yaml). Env: XANO_CONFIG" }
|
|
42
60
|
],
|
|
43
61
|
examples: [
|
|
44
62
|
"xano auth",
|
|
45
63
|
"xano auth --origin https://custom.xano.com",
|
|
46
|
-
"xano auth -k # for self-signed certificates"
|
|
64
|
+
"xano auth -k # for self-signed certificates",
|
|
65
|
+
"xano auth --no-browser # headless: paste the code shown in the browser",
|
|
66
|
+
"xano auth -i my-instance -w 5 -b dev -p staging # pre-answer all pickers",
|
|
67
|
+
"xano auth --no-browser -i my-instance -w \"\" -b \"\" -p \"\" # scripted setup, only the code prompt remains"
|
|
47
68
|
]
|
|
48
69
|
}
|
|
49
70
|
],
|
|
@@ -61,6 +82,19 @@ The sandbox is a free-tier personal dev environment (auto-provisioned singleton
|
|
|
61
82
|
],
|
|
62
83
|
example: `npm install -g @xano/cli
|
|
63
84
|
xano auth
|
|
85
|
+
xano profile me`
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: "Headless Setup (SSH/Docker/Remote)",
|
|
89
|
+
description: "Authenticate on a host where the browser cannot reach the CLI's local callback server",
|
|
90
|
+
steps: [
|
|
91
|
+
"Run: `xano auth --no-browser` (add -i/-w/-b/-p to skip the pickers)",
|
|
92
|
+
"Open the printed URL in any browser and log in",
|
|
93
|
+
"Copy the code shown in the browser and paste it into the CLI prompt",
|
|
94
|
+
"Verify: `xano profile me`"
|
|
95
|
+
],
|
|
96
|
+
example: `xano auth --no-browser -i my-instance -w 5 -b dev -p staging
|
|
97
|
+
# open the printed URL in any browser, paste back the code
|
|
64
98
|
xano profile me`
|
|
65
99
|
}
|
|
66
100
|
]
|
|
@@ -23,7 +23,35 @@ profiles:
|
|
|
23
23
|
workspace: 1
|
|
24
24
|
branch: 2 # staging branch
|
|
25
25
|
default: production
|
|
26
|
-
|
|
26
|
+
\`\`\`
|
|
27
|
+
|
|
28
|
+
## Project-Local Profile (\`profile.yaml\`)
|
|
29
|
+
|
|
30
|
+
To avoid accidentally targeting the wrong workspace, pin a project to a profile by adding a \`profile.yaml\` file at the project root. The CLI searches the current directory and walks up parent directories (like \`.git\`) to find it.
|
|
31
|
+
|
|
32
|
+
\`profile.yaml\` contains **no secrets** — it references a profile by name; the access token always comes from \`~/.xano/credentials.yaml\`. An \`access_token\` key is rejected, and \`insecure\` cannot be set from a project file (security boundary).
|
|
33
|
+
|
|
34
|
+
\`\`\`yaml
|
|
35
|
+
# ./profile.yaml
|
|
36
|
+
profile: staging # which credentials.yaml profile to use
|
|
37
|
+
workspace: 110 # optional override
|
|
38
|
+
instance_origin: https://your-instance.xano.io # optional override
|
|
39
|
+
account_origin: https://app.xano.com # optional override
|
|
40
|
+
branch: main # optional override
|
|
41
|
+
\`\`\`
|
|
42
|
+
|
|
43
|
+
When a \`profile.yaml\` is in effect, every command prints the active target, e.g. \`Using profile 'staging' (workspace 110) · profile.yaml\` (suppressed for \`--output json\` and credential-management commands).
|
|
44
|
+
|
|
45
|
+
Generate one with \`xano profile use <name>\` — it writes a self-documenting \`profile.yaml\` (every overridable field included as a commented example) and offers to add it to \`.gitignore\`.
|
|
46
|
+
|
|
47
|
+
## Profile Selection Precedence
|
|
48
|
+
|
|
49
|
+
1. \`-p/--profile\` flag
|
|
50
|
+
2. \`XANO_PROFILE\` environment variable
|
|
51
|
+
3. \`profile.yaml\` (\`profile:\` field, plus field overrides)
|
|
52
|
+
4. Default profile from the credentials file
|
|
53
|
+
|
|
54
|
+
An explicit \`-p/--profile\` or \`XANO_PROFILE\` ignores \`profile.yaml\` entirely (name and overrides).`,
|
|
27
55
|
ai_hints: `**Use profiles for:**
|
|
28
56
|
- Different environments (production, staging, development)
|
|
29
57
|
- Multiple Xano instances
|
|
@@ -36,7 +64,13 @@ default: production
|
|
|
36
64
|
**Switching contexts:**
|
|
37
65
|
- Use \`-p <profile>\` flag on any command
|
|
38
66
|
- Or set \`XANO_PROFILE\` environment variable
|
|
39
|
-
- Or
|
|
67
|
+
- Or pin a project with \`xano profile use <name>\` (writes ./profile.yaml)
|
|
68
|
+
- Or use \`profile set\` to change the global default
|
|
69
|
+
|
|
70
|
+
**Suggest \`profile use\` when:**
|
|
71
|
+
- User juggles multiple workspaces/projects and could push to the wrong one by forgetting \`-p\`
|
|
72
|
+
- A repo should always target a specific profile/workspace regardless of the user's global default
|
|
73
|
+
- Remember: profile.yaml is overridden entirely by an explicit \`-p\` or \`XANO_PROFILE\`
|
|
40
74
|
|
|
41
75
|
**Alternative auth methods:**
|
|
42
76
|
- \`xano auth\` - Browser-based OAuth login (no token needed)
|
|
@@ -123,6 +157,28 @@ default: production
|
|
|
123
157
|
],
|
|
124
158
|
examples: ["xano profile delete old-profile", "xano profile delete test --force"]
|
|
125
159
|
},
|
|
160
|
+
{
|
|
161
|
+
name: "profile use",
|
|
162
|
+
description: "Pin a profile for the current project by writing a local profile.yaml. When present, the CLI uses this profile (and any overrides) instead of the default, unless -p/--profile or XANO_PROFILE is set. Warns before overwriting an existing profile.yaml and offers to add it to .gitignore (skipped if already ignored).",
|
|
163
|
+
usage: "xano profile use <name> [options]",
|
|
164
|
+
args: [
|
|
165
|
+
{ name: "name", required: true, description: "Profile name (from credentials.yaml) to pin for this project" }
|
|
166
|
+
],
|
|
167
|
+
flags: [
|
|
168
|
+
{ name: "workspace", short: "w", type: "string", required: false, description: "Override workspace for this project" },
|
|
169
|
+
{ name: "branch", short: "b", type: "string", required: false, description: "Override branch for this project" },
|
|
170
|
+
{ name: "instance_origin", short: "i", type: "string", required: false, description: "Override instance origin for this project" },
|
|
171
|
+
{ name: "account_origin", short: "a", type: "string", required: false, description: "Override account origin for this project" },
|
|
172
|
+
{ name: "gitignore", type: "boolean", required: false, description: "Add profile.yaml to .gitignore without prompting (--no-gitignore to skip the prompt without adding)" },
|
|
173
|
+
{ name: "config", short: "c", type: "string", required: false, description: "Path to credentials file (default: ~/.xano/credentials.yaml). Env: XANO_CONFIG" }
|
|
174
|
+
],
|
|
175
|
+
examples: [
|
|
176
|
+
"xano profile use staging",
|
|
177
|
+
"xano profile use staging -w 110",
|
|
178
|
+
"xano profile use staging -w 110 --gitignore",
|
|
179
|
+
"xano profile use staging --no-gitignore"
|
|
180
|
+
]
|
|
181
|
+
},
|
|
126
182
|
{
|
|
127
183
|
name: "profile set",
|
|
128
184
|
description: "Set the default profile",
|
|
@@ -186,6 +242,19 @@ default: production
|
|
|
186
242
|
"Set default: `xano profile set prod`",
|
|
187
243
|
"Use staging when needed: `xano workspace pull ./code -p staging`"
|
|
188
244
|
]
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
name: "Pin a Project to a Profile",
|
|
248
|
+
description: "Prevent commands in a project directory from targeting the wrong workspace",
|
|
249
|
+
steps: [
|
|
250
|
+
"From the project root: `xano profile use staging -w 110`",
|
|
251
|
+
"Accept the prompt to add profile.yaml to .gitignore (or pass --gitignore)",
|
|
252
|
+
"Commands run inside the project now print `Using profile 'staging' (workspace 110) · profile.yaml`",
|
|
253
|
+
"Override per-command when needed with `-p <other-profile>` (ignores profile.yaml entirely)"
|
|
254
|
+
],
|
|
255
|
+
example: `cd my-project
|
|
256
|
+
xano profile use staging -w 110 --gitignore
|
|
257
|
+
xano workspace pull -d ./code # uses 'staging', workspace 110`
|
|
189
258
|
}
|
|
190
259
|
]
|
|
191
260
|
};
|
|
@@ -100,9 +100,10 @@ export const sandboxDoc = {
|
|
|
100
100
|
usage: "xano sandbox review [options]",
|
|
101
101
|
flags: [
|
|
102
102
|
{ name: "url-only", short: "u", type: "boolean", required: false, description: "Print the URL without opening the browser" },
|
|
103
|
+
{ name: "insecure", short: "k", type: "boolean", required: false, description: "Skip TLS certificate verification (for self-signed certificates)" },
|
|
103
104
|
{ name: "output", short: "o", type: "string", required: false, default: "summary", description: "Output format: summary or json" }
|
|
104
105
|
],
|
|
105
|
-
examples: ["xano sandbox review", "xano sandbox review --url-only"]
|
|
106
|
+
examples: ["xano sandbox review", "xano sandbox review --url-only", "xano sandbox review --insecure"]
|
|
106
107
|
},
|
|
107
108
|
{
|
|
108
109
|
name: "sandbox impersonate",
|
|
@@ -32,7 +32,7 @@ npm link
|
|
|
32
32
|
\`\`\`bash
|
|
33
33
|
xano auth
|
|
34
34
|
\`\`\`
|
|
35
|
-
Opens your browser to log in. Automatically creates a profile.
|
|
35
|
+
Opens your browser to log in. Automatically creates a profile. On remote/SSH/Docker hosts where the browser can't reach the CLI, use \`xano auth --no-browser\` (prints a URL; paste back the code shown in the browser).
|
|
36
36
|
|
|
37
37
|
**Option 2: Interactive wizard**
|
|
38
38
|
\`\`\`bash
|
|
@@ -69,6 +69,10 @@ All commands support:
|
|
|
69
69
|
- \`XANO_CONFIG\` - Override the credentials file path (same effect as \`-c\`)
|
|
70
70
|
- \`XANO_VERBOSE\` - Enable verbose logging (same effect as \`-v\`)
|
|
71
71
|
|
|
72
|
+
## Project-Local Profile (\`profile.yaml\`)
|
|
73
|
+
|
|
74
|
+
A project can be pinned to a specific profile (and optional workspace/branch/origin overrides) by a \`profile.yaml\` at the project root — generated with \`xano profile use <name>\`. The CLI discovers it by walking up parent directories. It contains no secrets (the token always comes from credentials.yaml), and an explicit \`-p\`/\`XANO_PROFILE\` overrides it entirely. See the "profile" topic for details.
|
|
75
|
+
|
|
72
76
|
## Safety Markers (\`[CRITICAL]\` and \`[IMPORTANT]\`)
|
|
73
77
|
|
|
74
78
|
Destructive commands and flags are prefixed with one of two imperative markers in their description, usage, and help text. These are not stylistic — they signal required agent behavior:
|
|
@@ -98,7 +102,7 @@ Examples of where these markers appear:
|
|
|
98
102
|
| \`unit_test\` | Run unit tests |
|
|
99
103
|
| \`workflow_test\` | Run workflow tests |
|
|
100
104
|
| \`platform\` | View available platform versions |
|
|
101
|
-
| \`static_host\` |
|
|
105
|
+
| \`static_host\` | Manage static hosts, push builds, deploy to dev/prod |
|
|
102
106
|
| \`update\` | Update CLI to latest version |`,
|
|
103
107
|
ai_hints: `**Safety markers (full definitions in description above):** When you see \`[CRITICAL]\` on a command or flag, NEVER run it without explicit user confirmation in the current turn — prior approval does not carry over. When you see \`[IMPORTANT]\`, ALWAYS run \`--dry-run\` first (when available) and show the user the output before the real run. The imperative verb in the marker (\`NEVER\`, \`ALWAYS\`, \`STOP\`, \`DO NOT\`) is the literal required action.
|
|
104
108
|
|
|
@@ -118,7 +122,10 @@ Examples of where these markers appear:
|
|
|
118
122
|
**Profile selection priority:**
|
|
119
123
|
1. \`-p\` flag on command
|
|
120
124
|
2. \`XANO_PROFILE\` environment variable
|
|
121
|
-
3.
|
|
125
|
+
3. Project-local \`profile.yaml\` (created with \`xano profile use\`; discovered by walking up parent directories)
|
|
126
|
+
4. Default profile in credentials.yaml
|
|
127
|
+
|
|
128
|
+
An explicit \`-p\` or \`XANO_PROFILE\` ignores \`profile.yaml\` entirely. When a profile.yaml is in effect, commands print the active target (e.g. \`Using profile 'staging' (workspace 110) · profile.yaml\`).`,
|
|
122
129
|
related_topics: ["auth", "profile", "workspace", "sandbox", "integration"],
|
|
123
130
|
workflows: [
|
|
124
131
|
{
|
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
export const staticHostDoc = {
|
|
2
2
|
topic: "static_host",
|
|
3
3
|
title: "Xano CLI - Static Hosting",
|
|
4
|
-
description: `Static host commands let you
|
|
4
|
+
description: `Static host commands let you create and manage static hosts, push frontend builds, and deploy them to dev/prod environments on Xano's static hosting infrastructure.
|
|
5
|
+
|
|
6
|
+
## Concepts
|
|
7
|
+
|
|
8
|
+
- **Static host**: A named hosting target in a workspace. Each host has a **dev** and a **prod** environment, each with its own URL.
|
|
9
|
+
- **Build**: An uploaded snapshot of your site (a directory or zip). Builds are created with \`build push\` and deployed to an environment with \`deploy\`.
|
|
10
|
+
- **Git config**: A host can optionally be linked to a git repository (\`edit --git-repo\` plus SSH keys).
|
|
11
|
+
- **v1 vs v2 hosting**: v2 is instance-managed hosting. Older v1 hosts can be moved with \`static_host migrate\`.`,
|
|
5
12
|
ai_hints: `**Static hosting workflow:**
|
|
6
|
-
1.
|
|
7
|
-
2.
|
|
8
|
-
3.
|
|
13
|
+
1. Create a host once: \`xano static_host create my-app\`
|
|
14
|
+
2. Build your frontend (React, Vue, etc.)
|
|
15
|
+
3. Push the build output directory: \`xano static_host build push my-app -d ./dist -n "v1.0.0"\`
|
|
16
|
+
4. Deploy it: \`xano static_host deploy my-app --build_id <id> --env dev\` (then \`--env prod\`)
|
|
17
|
+
|
|
18
|
+
**Prefer \`build push\` over \`build create\`:** \`build create\` is deprecated and hidden — \`build push -f <file>\` covers the zip-upload case, and \`build push -d <dir>\` (or no flag for the current directory) zips and uploads a directory for you. The build name is optional (auto-generated from the timestamp). For package.json builds, push waits for the build to finish unless \`--no-wait\`.
|
|
19
|
+
|
|
20
|
+
**build get/delete/deploy take \`--build_id\` as a flag**, not a positional argument (older CLI versions used positionals).
|
|
21
|
+
|
|
22
|
+
**\`build pull\` source selection:** defaults to the original uploaded source (including package.json); use \`--source built\` for the compiled/served output. Select the build by \`--build_id\`, \`--latest\`, or \`--env dev|prod\` (the build currently deployed there).
|
|
23
|
+
|
|
24
|
+
**Destructive:** \`build delete\` is permanent and prompts for confirmation; its \`--force\` flag is marked [CRITICAL] — never run it without explicit user confirmation.
|
|
9
25
|
|
|
10
26
|
**Use cases:**
|
|
11
27
|
- Deploy SPAs built with modern frameworks
|
|
@@ -32,30 +48,112 @@ export const staticHostDoc = {
|
|
|
32
48
|
]
|
|
33
49
|
},
|
|
34
50
|
{
|
|
35
|
-
name: "static_host
|
|
36
|
-
description: "Create a new
|
|
37
|
-
usage: "xano static_host
|
|
51
|
+
name: "static_host create",
|
|
52
|
+
description: "Create a new static host in the workspace",
|
|
53
|
+
usage: "xano static_host create <name> [options]",
|
|
38
54
|
args: [
|
|
39
|
-
{ name: "
|
|
55
|
+
{ name: "name", required: true, description: "Name for the new static host" }
|
|
40
56
|
],
|
|
41
57
|
flags: [
|
|
42
|
-
{ name: "
|
|
43
|
-
{ name: "name", short: "n", type: "string", required: true, description: "Build name/version" },
|
|
44
|
-
{ name: "description", short: "d", type: "string", required: false, description: "Build description" },
|
|
58
|
+
{ name: "description", type: "string", required: false, description: "Description for the static host" },
|
|
45
59
|
{ name: "workspace", short: "w", type: "string", required: false, description: "Workspace ID (optional if set in profile)" },
|
|
46
60
|
{ name: "output", short: "o", type: "string", required: false, default: "summary", description: "Output format: summary or json" }
|
|
47
61
|
],
|
|
48
62
|
examples: [
|
|
49
|
-
"xano static_host
|
|
50
|
-
"xano static_host
|
|
63
|
+
"xano static_host create marketing",
|
|
64
|
+
"xano static_host create marketing --description 'Marketing site' -w 40"
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: "static_host get",
|
|
69
|
+
description: "Get a single static host's details (name, git config, dev/prod environments and URLs)",
|
|
70
|
+
usage: "xano static_host get <static_host> [options]",
|
|
71
|
+
args: [
|
|
72
|
+
{ name: "static_host", required: true, description: "Static host name" }
|
|
73
|
+
],
|
|
74
|
+
flags: [
|
|
75
|
+
{ name: "workspace", short: "w", type: "string", required: false, description: "Workspace ID (optional if set in profile)" },
|
|
76
|
+
{ name: "output", short: "o", type: "string", required: false, default: "summary", description: "Output format: summary or json" }
|
|
77
|
+
],
|
|
78
|
+
examples: [
|
|
79
|
+
"xano static_host get my-app",
|
|
80
|
+
"xano static_host get my-app -w 40 -o json"
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "static_host edit",
|
|
85
|
+
description: "Update a static host's name, description, or git configuration. Renaming changes the deployed hostname.",
|
|
86
|
+
usage: "xano static_host edit <static_host> [options]",
|
|
87
|
+
args: [
|
|
88
|
+
{ name: "static_host", required: true, description: "Static host name to edit" }
|
|
89
|
+
],
|
|
90
|
+
flags: [
|
|
91
|
+
{ name: "name", type: "string", required: false, description: "New name for the static host (renaming changes the deployed hostname)" },
|
|
92
|
+
{ name: "description", type: "string", required: false, description: "New description for the static host" },
|
|
93
|
+
{ name: "git-repo", type: "string", required: false, description: "Git repository URL (e.g. git@github.com:org/repo.git)" },
|
|
94
|
+
{ name: "git-public-key", type: "string", required: false, description: "Git SSH public key" },
|
|
95
|
+
{ name: "git-private-key-file", type: "string", required: false, description: "Path to a file containing the git SSH private key (read from disk; never passed on the command line)" },
|
|
96
|
+
{ name: "workspace", short: "w", type: "string", required: false, description: "Workspace ID (optional if set in profile)" },
|
|
97
|
+
{ name: "output", short: "o", type: "string", required: false, default: "summary", description: "Output format: summary or json" }
|
|
98
|
+
],
|
|
99
|
+
examples: [
|
|
100
|
+
"xano static_host edit my-app --description 'Marketing site'",
|
|
101
|
+
"xano static_host edit my-app --name my-app-v2",
|
|
102
|
+
"xano static_host edit my-app --git-repo git@github.com:me/site.git --git-private-key-file ./deploy_key"
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: "static_host build push",
|
|
107
|
+
description: "Push a directory or zip file as a new static host build. Defaults to the current directory; the build name is auto-generated from the timestamp if omitted. For package.json builds, waits for the build to finish unless --no-wait.",
|
|
108
|
+
usage: "xano static_host build push <static_host> [options]",
|
|
109
|
+
args: [
|
|
110
|
+
{ name: "static_host", required: true, description: "Static host name" }
|
|
111
|
+
],
|
|
112
|
+
flags: [
|
|
113
|
+
{ name: "directory", short: "d", type: "string", required: false, description: "Directory to push (defaults to current directory). Mutually exclusive with --file." },
|
|
114
|
+
{ name: "file", short: "f", type: "string", required: false, description: "Path to a zip file to upload (alternative to -d). Mutually exclusive with --directory." },
|
|
115
|
+
{ name: "name", short: "n", type: "string", required: false, description: "Build name (auto-generated from the current timestamp if omitted)" },
|
|
116
|
+
{ name: "description", type: "string", required: false, description: "Build description" },
|
|
117
|
+
{ name: "no-wait", type: "boolean", required: false, description: "Return immediately after upload instead of waiting for the build to finish" },
|
|
118
|
+
{ name: "workspace", short: "w", type: "string", required: false, description: "Workspace ID (optional if set in profile)" },
|
|
119
|
+
{ name: "output", short: "o", type: "string", required: false, default: "summary", description: "Output format: summary or json" }
|
|
120
|
+
],
|
|
121
|
+
examples: [
|
|
122
|
+
"xano static_host build push my-app -d ./dist -n 'v1.0.0'",
|
|
123
|
+
"xano static_host build push my-app # current dir, auto-named",
|
|
124
|
+
"xano static_host build push my-app -f ./build.zip -n 'v1.0.0'",
|
|
125
|
+
"xano static_host build push my-app -n 'release' --description 'Production build'"
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: "static_host build pull",
|
|
130
|
+
description: "Pull a static host build to disk. Defaults to the original uploaded source (including package.json); use --source built for the compiled/served output. Select the build by --build_id, --latest, or --env (mutually exclusive).",
|
|
131
|
+
usage: "xano static_host build pull <static_host> (--build_id <id> | --latest | --env <dev|prod>) [options]",
|
|
132
|
+
args: [
|
|
133
|
+
{ name: "static_host", required: true, description: "Static host name" }
|
|
134
|
+
],
|
|
135
|
+
flags: [
|
|
136
|
+
{ name: "build_id", type: "string", required: false, description: "Build ID to pull. Mutually exclusive with --latest and --env." },
|
|
137
|
+
{ name: "latest", type: "boolean", required: false, description: "Pull the latest build. Mutually exclusive with --build_id and --env." },
|
|
138
|
+
{ name: "env", type: "string", required: false, description: "Pull the build currently deployed to this environment (dev or prod). Mutually exclusive with --build_id and --latest." },
|
|
139
|
+
{ name: "directory", short: "d", type: "string", required: false, default: ".", description: "Output directory for pulled files (defaults to current directory)" },
|
|
140
|
+
{ name: "source", type: "string", required: false, default: "original", description: "Which files to pull: 'original' (the uploaded source, including package.json) or 'built' (the compiled/served output)" },
|
|
141
|
+
{ name: "workspace", short: "w", type: "string", required: false, description: "Workspace ID (optional if set in profile)" }
|
|
142
|
+
],
|
|
143
|
+
examples: [
|
|
144
|
+
"xano static_host build pull my-app --build_id 52",
|
|
145
|
+
"xano static_host build pull my-app --build_id 52 --source built",
|
|
146
|
+
"xano static_host build pull my-app --latest",
|
|
147
|
+
"xano static_host build pull my-app --env dev",
|
|
148
|
+
"xano static_host build pull my-app --env prod -d ./prod-release"
|
|
51
149
|
]
|
|
52
150
|
},
|
|
53
151
|
{
|
|
54
152
|
name: "static_host build list",
|
|
55
153
|
description: "List all builds for a static host",
|
|
56
|
-
usage: "xano static_host build list <
|
|
154
|
+
usage: "xano static_host build list <static_host> [-w <workspace>]",
|
|
57
155
|
args: [
|
|
58
|
-
{ name: "
|
|
156
|
+
{ name: "static_host", required: true, description: "Static host name" }
|
|
59
157
|
],
|
|
60
158
|
flags: [
|
|
61
159
|
{ name: "workspace", short: "w", type: "string", required: false, description: "Workspace ID (optional if set in profile)" },
|
|
@@ -70,34 +168,131 @@ export const staticHostDoc = {
|
|
|
70
168
|
},
|
|
71
169
|
{
|
|
72
170
|
name: "static_host build get",
|
|
73
|
-
description: "Get details of a specific build.
|
|
74
|
-
usage: "xano static_host build get <
|
|
171
|
+
description: "Get details of a specific build for a static host. The build is selected with the --build_id flag (not a positional argument).",
|
|
172
|
+
usage: "xano static_host build get <static_host> --build_id <id>",
|
|
75
173
|
args: [
|
|
76
|
-
{ name: "build_id", required: true, description: "Build ID" },
|
|
77
174
|
{ name: "static_host", required: true, description: "Static host name" }
|
|
78
175
|
],
|
|
79
176
|
flags: [
|
|
177
|
+
{ name: "build_id", type: "string", required: true, description: "Build ID" },
|
|
80
178
|
{ name: "workspace", short: "w", type: "string", required: false, description: "Workspace ID (optional if set in profile)" },
|
|
81
179
|
{ name: "output", short: "o", type: "string", required: false, default: "summary", description: "Output format: summary or json" }
|
|
82
180
|
],
|
|
83
181
|
examples: [
|
|
84
|
-
"xano static_host build get
|
|
85
|
-
"xano static_host build get
|
|
182
|
+
"xano static_host build get my-app --build_id 52",
|
|
183
|
+
"xano static_host build get my-app --build_id 52 -o json"
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
name: "static_host build delete",
|
|
188
|
+
description: "Delete a static host build permanently. This action cannot be undone. Prompts for confirmation unless --force.",
|
|
189
|
+
usage: "xano static_host build delete <static_host> --build_id <id> [--force]",
|
|
190
|
+
args: [
|
|
191
|
+
{ name: "static_host", required: true, description: "Static host name" }
|
|
192
|
+
],
|
|
193
|
+
flags: [
|
|
194
|
+
{ name: "build_id", type: "string", required: true, description: "Build ID to delete" },
|
|
195
|
+
{ name: "force", short: "f", type: "boolean", required: false, description: "[CRITICAL] NEVER run without explicit user confirmation. Skips the confirmation prompt." },
|
|
196
|
+
{ name: "workspace", short: "w", type: "string", required: false, description: "Workspace ID (optional if set in profile)" },
|
|
197
|
+
{ name: "output", short: "o", type: "string", required: false, default: "summary", description: "Output format: summary or json" }
|
|
198
|
+
],
|
|
199
|
+
examples: [
|
|
200
|
+
"xano static_host build delete my-app --build_id 52",
|
|
201
|
+
"xano static_host build delete my-app --build_id 52 --force"
|
|
202
|
+
]
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: "static_host deploy",
|
|
206
|
+
description: "Deploy a static host build to an environment (dev or prod). Prints the deployed URL.",
|
|
207
|
+
usage: "xano static_host deploy <static_host> --build_id <id> --env <dev|prod>",
|
|
208
|
+
args: [
|
|
209
|
+
{ name: "static_host", required: true, description: "Static host name" }
|
|
210
|
+
],
|
|
211
|
+
flags: [
|
|
212
|
+
{ name: "build_id", type: "string", required: true, description: "Build ID to deploy" },
|
|
213
|
+
{ name: "env", type: "string", required: true, description: "Target environment: dev or prod" },
|
|
214
|
+
{ name: "workspace", short: "w", type: "string", required: false, description: "Workspace ID (optional if set in profile)" },
|
|
215
|
+
{ name: "output", short: "o", type: "string", required: false, default: "summary", description: "Output format: summary or json" }
|
|
216
|
+
],
|
|
217
|
+
examples: [
|
|
218
|
+
"xano static_host deploy my-app --build_id 52 --env dev",
|
|
219
|
+
"xano static_host deploy my-app --build_id 52 --env prod",
|
|
220
|
+
"xano static_host deploy my-app --build_id 52 --env prod -o json"
|
|
221
|
+
]
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
name: "static_host migrate",
|
|
225
|
+
description: "Migrate a static host to instance-managed (v2) hosting. Reparents the Ingress, verifies it, clears master, and marks the host v2. Migrates both environments unless --env is given.",
|
|
226
|
+
usage: "xano static_host migrate [static_host] [--all] [--env <dev|prod>] [--dry-run]",
|
|
227
|
+
args: [
|
|
228
|
+
{ name: "static_host", required: false, description: "Static host name to migrate (omit when using --all)" }
|
|
229
|
+
],
|
|
230
|
+
flags: [
|
|
231
|
+
{ name: "all", type: "boolean", required: false, description: "Migrate every host still on v1 in the workspace" },
|
|
232
|
+
{ name: "dry-run", type: "boolean", required: false, description: "List the hosts that would be migrated without changing anything" },
|
|
233
|
+
{ name: "env", type: "string", required: false, description: "Which environment to migrate: dev or prod (migrates both if omitted)" },
|
|
234
|
+
{ name: "workspace", short: "w", type: "string", required: false, description: "Workspace ID (optional if set in profile)" },
|
|
235
|
+
{ name: "output", short: "o", type: "string", required: false, default: "summary", description: "Output format: summary or json" }
|
|
236
|
+
],
|
|
237
|
+
examples: [
|
|
238
|
+
"xano static_host migrate my-app",
|
|
239
|
+
"xano static_host migrate my-app --env dev",
|
|
240
|
+
"xano static_host migrate --all --dry-run",
|
|
241
|
+
"xano static_host migrate --all"
|
|
242
|
+
]
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
name: "static_host build create",
|
|
246
|
+
description: "[Deprecated: use 'static_host build push -f <file>' instead] Create a new build from a zip file. Hidden from CLI help.",
|
|
247
|
+
usage: "xano static_host build create <static_host> -f <file> [options]",
|
|
248
|
+
args: [
|
|
249
|
+
{ name: "static_host", required: true, description: "Static host name" }
|
|
250
|
+
],
|
|
251
|
+
flags: [
|
|
252
|
+
{ name: "file", short: "f", type: "string", required: true, description: "Path to ZIP file to upload" },
|
|
253
|
+
{ name: "name", short: "n", type: "string", required: false, description: "Build name (auto-generated from the current timestamp if omitted)" },
|
|
254
|
+
{ name: "description", short: "d", type: "string", required: false, description: "Build description" },
|
|
255
|
+
{ name: "no-wait", type: "boolean", required: false, description: "Return immediately after upload instead of waiting for the build to finish" },
|
|
256
|
+
{ name: "workspace", short: "w", type: "string", required: false, description: "Workspace ID (optional if set in profile)" },
|
|
257
|
+
{ name: "output", short: "o", type: "string", required: false, default: "summary", description: "Output format: summary or json" }
|
|
258
|
+
],
|
|
259
|
+
examples: [
|
|
260
|
+
"xano static_host build push my-app -f ./build.zip -n 'v1.0.0' # preferred replacement"
|
|
86
261
|
]
|
|
87
262
|
}
|
|
88
263
|
],
|
|
89
264
|
workflows: [
|
|
90
265
|
{
|
|
91
266
|
name: "Deploy Frontend",
|
|
92
|
-
description: "Build and deploy a frontend application",
|
|
267
|
+
description: "Build, push, and deploy a frontend application",
|
|
93
268
|
steps: [
|
|
269
|
+
"Create the host once: `xano static_host create my-app`",
|
|
94
270
|
"Build your app: `npm run build`",
|
|
95
|
-
"
|
|
96
|
-
"Deploy: `xano static_host
|
|
271
|
+
"Push the build output: `xano static_host build push my-app -d ./dist -n 'v1.0.0'`",
|
|
272
|
+
"Deploy to dev: `xano static_host deploy my-app --build_id <id> --env dev`",
|
|
273
|
+
"Verify, then deploy to prod: `xano static_host deploy my-app --build_id <id> --env prod`"
|
|
97
274
|
],
|
|
98
|
-
example: `
|
|
99
|
-
|
|
100
|
-
xano static_host build
|
|
275
|
+
example: `xano static_host create my-frontend
|
|
276
|
+
npm run build
|
|
277
|
+
xano static_host build push my-frontend -d ./dist -n 'v1.0.0'
|
|
278
|
+
xano static_host deploy my-frontend --build_id 52 --env dev
|
|
279
|
+
xano static_host deploy my-frontend --build_id 52 --env prod`
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
name: "Roll Back a Deployment",
|
|
283
|
+
description: "Deploy a previous build to an environment",
|
|
284
|
+
steps: [
|
|
285
|
+
"List builds: `xano static_host build list my-app`",
|
|
286
|
+
"Deploy the previous build ID: `xano static_host deploy my-app --build_id <old_id> --env prod`"
|
|
287
|
+
]
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
name: "Recover Build Source",
|
|
291
|
+
description: "Pull the source of a deployed build back to disk",
|
|
292
|
+
steps: [
|
|
293
|
+
"Pull what's live in prod: `xano static_host build pull my-app --env prod -d ./recovered`",
|
|
294
|
+
"Or pull the compiled output: `xano static_host build pull my-app --env prod --source built -d ./recovered`"
|
|
295
|
+
]
|
|
101
296
|
}
|
|
102
297
|
]
|
|
103
298
|
};
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -35,9 +35,7 @@ export declare const toolSpecs: {
|
|
|
35
35
|
warnings: z.ZodOptional<z.ZodNumber>;
|
|
36
36
|
}>;
|
|
37
37
|
readonly xano_xanoscript_docs: BuiltTool<{
|
|
38
|
-
topic: z.ZodOptional<z.
|
|
39
|
-
[x: string]: string;
|
|
40
|
-
}>>;
|
|
38
|
+
topic: z.ZodOptional<z.ZodString>;
|
|
41
39
|
file_path: z.ZodOptional<z.ZodString>;
|
|
42
40
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
43
41
|
index: "index";
|
|
@@ -52,9 +52,7 @@ export declare function xanoscriptDocs(args?: XanoscriptDocsArgs): XanoscriptDoc
|
|
|
52
52
|
*/
|
|
53
53
|
export declare function xanoscriptDocsTool(args?: XanoscriptDocsArgs): ToolResult;
|
|
54
54
|
export declare const xanoscriptDocsToolSpec: import("./define_tool.js").BuiltTool<{
|
|
55
|
-
topic: z.ZodOptional<z.
|
|
56
|
-
[x: string]: string;
|
|
57
|
-
}>>;
|
|
55
|
+
topic: z.ZodOptional<z.ZodString>;
|
|
58
56
|
file_path: z.ZodOptional<z.ZodString>;
|
|
59
57
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
60
58
|
index: "index";
|
|
@@ -8,7 +8,7 @@ import { readFileSync } from "fs";
|
|
|
8
8
|
import { dirname, join } from "path";
|
|
9
9
|
import { fileURLToPath } from "url";
|
|
10
10
|
import { z } from "zod";
|
|
11
|
-
import { readXanoscriptDocsV2, readXanoscriptDocsStructured, getXanoscriptDocsVersion,
|
|
11
|
+
import { readXanoscriptDocsV2, readXanoscriptDocsStructured, getXanoscriptDocsVersion, getTopicDescriptions, getTierFacts, } from "../xanoscript.js";
|
|
12
12
|
import { defineTool } from "./define_tool.js";
|
|
13
13
|
// =============================================================================
|
|
14
14
|
// Path Resolution
|
|
@@ -156,7 +156,6 @@ export function xanoscriptDocsTool(args) {
|
|
|
156
156
|
// =============================================================================
|
|
157
157
|
// MCP Tool Definition
|
|
158
158
|
// =============================================================================
|
|
159
|
-
const topicEnumValues = getTopicNames();
|
|
160
159
|
// Derive tier size facts from the actual files so the advertised numbers can
|
|
161
160
|
// never drift stale (see getTierFacts). Computed once at module load.
|
|
162
161
|
const tierFacts = getTierFacts(getXanoscriptDocsPath());
|
|
@@ -177,10 +176,11 @@ export const xanoscriptDocsToolSpec = defineTool({
|
|
|
177
176
|
},
|
|
178
177
|
inputShape: {
|
|
179
178
|
topic: z
|
|
180
|
-
.
|
|
179
|
+
.string()
|
|
181
180
|
.optional()
|
|
182
181
|
.describe("Documentation topic to retrieve. Call without any parameters to get the compact topic index; use topic='readme' for the full prose overview. " +
|
|
183
|
-
"Example: topic='syntax' for language syntax, topic='database' for database operations, topic='types' for type system
|
|
182
|
+
"Example: topic='syntax' for language syntax, topic='database' for database operations, topic='types' for type system. " +
|
|
183
|
+
"Common synonyms are accepted and resolved automatically (e.g. 'upload'/'storage' -> 'file-uploads'); an unrecognized topic returns the list of valid topics.\n\n" +
|
|
184
184
|
"Available topics:\n" +
|
|
185
185
|
getTopicDescriptions()),
|
|
186
186
|
file_path: z
|
package/dist/xanoscript.d.ts
CHANGED
|
@@ -24,6 +24,14 @@ export interface XanoscriptDocsArgs {
|
|
|
24
24
|
exclude_topics?: string[];
|
|
25
25
|
}
|
|
26
26
|
export declare const XANOSCRIPT_DOCS_V2: Record<string, DocConfig>;
|
|
27
|
+
/**
|
|
28
|
+
* Resolve a topic name or alias to a canonical topic name. Returns the input
|
|
29
|
+
* unchanged when it is already canonical or unknown, so callers can still
|
|
30
|
+
* surface the existing "Unknown topic" error for genuinely bad input.
|
|
31
|
+
*/
|
|
32
|
+
export declare function resolveTopic(input?: string): string | undefined;
|
|
33
|
+
/** Get all alias names (keys of the alias -> canonical topic map). */
|
|
34
|
+
export declare function getAliasNames(): string[];
|
|
27
35
|
/**
|
|
28
36
|
* Clear all cached documentation content and version data.
|
|
29
37
|
* Useful for testing or when docs files change at runtime.
|