@xano/developer-mcp 2.2.2-beta.6 → 2.2.3-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.
@@ -14,6 +14,7 @@ import { profileDoc } from "./topics/profile.js";
14
14
  import { workspaceDoc } from "./topics/workspace.js";
15
15
  import { branchDoc } from "./topics/branch.js";
16
16
  import { functionDoc } from "./topics/function.js";
17
+ import { knowledgeDoc } from "./topics/knowledge.js";
17
18
  import { releaseDoc } from "./topics/release.js";
18
19
  import { tenantDoc } from "./topics/tenant.js";
19
20
  import { unitTestDoc } from "./topics/unit_test.js";
@@ -33,6 +34,7 @@ export const topics = {
33
34
  workspace: workspaceDoc,
34
35
  branch: branchDoc,
35
36
  function: functionDoc,
37
+ knowledge: knowledgeDoc,
36
38
  release: releaseDoc,
37
39
  tenant: tenantDoc,
38
40
  unit_test: unitTestDoc,
@@ -1,7 +1,7 @@
1
1
  export const functionDoc = {
2
2
  topic: "function",
3
3
  title: "Xano CLI - Function Management",
4
- description: `Function commands let you list, view, create, and edit individual Xano functions. This is useful for quick edits or when you don't need to sync the entire workspace.
4
+ description: `Function commands let you list, view, create, edit, and run individual Xano functions. This is useful for quick edits or when you don't need to sync the entire workspace.
5
5
 
6
6
  ## Syntax note
7
7
 
@@ -24,7 +24,15 @@ Xano CLI commands are SPACE-separated (e.g. \`xano function list\`), not colon-s
24
24
 
25
25
  **Draft / publish:**
26
26
  - \`function edit\` publishes by default; use \`--no-publish\` to save as draft only
27
- - Use \`--include_draft\` on \`function get\` / \`function list\` to see draft versions`,
27
+ - Use \`--include_draft\` on \`function get\` / \`function list\` to see draft versions
28
+
29
+ **Running functions (\`function run\`):**
30
+ - Functions are run by NAME, not ID: \`xano function run my_function\`
31
+ - Build the input JSON with repeatable \`-d\` pairs: \`key=value\` for strings, \`key:=raw_json\` for numbers/booleans/objects/arrays, \`key@file\` for file contents
32
+ - Or pass a whole object: \`--json '{...}'\`, \`--json @file.json\`, or \`--stdin\`; \`-d\` pairs override keys from the JSON object
33
+ - Default output is the bare result value as JSON (pipe-friendly, e.g. \`| jq\`); use \`-o summary\` for status + result, \`--logs\` for debugger logs
34
+ - The CLI checks inputs against the function's declared schema and prompts for missing required inputs on a TTY; in scripts, pass all required inputs (or \`--no-input-check\` to send as-is)
35
+ - Exit code 1 when the execution status is not ok — safe to use in CI`,
28
36
  related_topics: ["workspace", "sandbox", "branch"],
29
37
  commands: [
30
38
  {
@@ -111,6 +119,33 @@ Xano CLI commands are SPACE-separated (e.g. \`xano function list\`), not colon-s
111
119
  "xano function edit 145 -f ./updated_function.xs --edit",
112
120
  "xano function edit 145 -f ./draft.xs --no-publish"
113
121
  ]
122
+ },
123
+ {
124
+ name: "function run",
125
+ description: "Run (execute) a named function in a workspace and print its result. Functions are selected by NAME (not ID). Input is a JSON object assembled from --json/--stdin plus repeatable --data pairs (--data overrides). Unless --no-input-check, the CLI validates the payload against the function's declared inputs, warns on mismatches, and prompts for missing required inputs on a TTY (non-TTY errors instead). Exits 1 if the execution status is not ok.",
126
+ usage: "xano function run [name] [options]",
127
+ args: [
128
+ { name: "name", required: false, description: "Name of the function to run (interactive picker if omitted and --name unset)" }
129
+ ],
130
+ flags: [
131
+ { name: "name", short: "n", type: "string", required: false, description: "Name of the function to run (alternative to the positional argument)" },
132
+ { name: "data", short: "d", type: "string", required: false, description: "Input field as key=value (string), key:=json (raw JSON), or key@file (file contents). Repeatable; layered on top of --json/--stdin." },
133
+ { name: "json", type: "string", required: false, description: "Input as a JSON object: inline, @file.json, or '-' for stdin. Mutually exclusive with --stdin." },
134
+ { name: "stdin", short: "s", type: "boolean", required: false, default: "false", description: "Read the input JSON object from stdin (same as --json -). Mutually exclusive with --json." },
135
+ { name: "branch", type: "string", required: false, description: "Branch to run from (defaults to profile branch, then main)" },
136
+ { name: "logs", type: "boolean", required: false, default: "false", description: "Print the execution logs returned by the debugger" },
137
+ { name: "no-input-check", type: "boolean", required: false, default: "false", description: "Skip local schema validation and interactive prompting; send the payload as-is" },
138
+ { name: "workspace", short: "w", type: "string", required: false, description: "Workspace ID (uses profile workspace if not provided)" },
139
+ { name: "output", short: "o", type: "string", required: false, default: "json", description: "Output format: json (prints just the result value) or summary (status + result)" },
140
+ { name: "profile", short: "p", type: "string", required: false, description: "Profile name to use" }
141
+ ],
142
+ examples: [
143
+ "xano function run validate_token -d token=abc123",
144
+ "xano function run calc_totals -d amount:=42.5 -d items:='[1,2,3]'",
145
+ "xano function run import_users --json @input.json",
146
+ "echo '{\"user_id\": 7}' | xano function run get_profile --stdin",
147
+ "xano function run send_digest -d body@./email.html --branch dev --logs"
148
+ ]
114
149
  }
115
150
  ],
116
151
  workflows: [
@@ -134,6 +169,18 @@ xano function edit 145 -f auth_check.xs`
134
169
  "Create in Xano: `xano function create -f template.xs`"
135
170
  ]
136
171
  },
172
+ {
173
+ name: "Run a Function with Inputs",
174
+ description: "Execute a function and consume its result in a script",
175
+ steps: [
176
+ "Run with inline inputs: `xano function run my_function -d user_id:=7`",
177
+ "Or pipe a JSON object: `echo '{\"user_id\": 7}' | xano function run my_function --stdin`",
178
+ "Default output is the bare result JSON — pipe to jq or capture in a variable",
179
+ "Check the exit code: non-ok execution status exits 1"
180
+ ],
181
+ example: `RESULT=$(xano function run calc_totals -d items:='[1,2,3]')
182
+ echo "$RESULT" | jq .total`
183
+ },
137
184
  {
138
185
  name: "Draft Then Publish",
139
186
  description: "Save an edit as a draft and publish later",
@@ -0,0 +1,2 @@
1
+ import type { TopicDoc } from "../types.js";
2
+ export declare const knowledgeDoc: TopicDoc;
@@ -0,0 +1,127 @@
1
+ export const knowledgeDoc = {
2
+ topic: "knowledge",
3
+ title: "Xano CLI - Knowledge & Skills",
4
+ description: `Knowledge commands let you read workspace knowledge and skills (AI context documents) from the CLI. Knowledge items are markdown documents attached to a workspace that guide AI agents: always-on context, on-demand docs, and skills with reference files.
5
+
6
+ ## Key Concepts
7
+
8
+ - **Knowledge types**: \`agents.md\` (the workspace's AGENTS.md), \`doc\` (standalone markdown docs), and \`skill\` (a SKILL.md plus optional reference files).
9
+ - **Inclusion**: how an item is surfaced to AI — \`always\` (always-on context), \`on demand\` (auto-selected when relevant), or \`manual\` (only when explicitly referenced).
10
+ - **Read via \`knowledge list\`/\`knowledge get\`**; **write via workspace/sandbox push** — there is no \`knowledge push\`/\`knowledge pull\`. Knowledge is synced automatically as part of \`workspace pull/push\` and \`sandbox pull/push\` under the \`knowledge/\` directory.
11
+
12
+ ## On-Disk Layout (from workspace/sandbox pull)
13
+
14
+ \`\`\`
15
+ ./your-code/
16
+ └── knowledge/
17
+ ├── agents.md # type: agents.md
18
+ ├── docs/
19
+ │ └── api_conventions.md # type: doc
20
+ └── skills/
21
+ └── deploy_checklist/
22
+ ├── SKILL.md # type: skill
23
+ └── references/
24
+ └── runbook.md # skill reference files
25
+ \`\`\`
26
+
27
+ ## Frontmatter Format
28
+
29
+ Each primary markdown file carries YAML frontmatter with keys in this order: \`name\`, \`description\`, \`knowledge_type\`, \`scope\`, \`inclusion\`, \`enabled\`, \`guid\`.
30
+
31
+ \`\`\`markdown
32
+ ---
33
+ name: API Conventions
34
+ description: How our endpoints are structured
35
+ knowledge_type: doc
36
+ scope: workspace
37
+ inclusion: on demand
38
+ enabled: true
39
+ guid: abc123...
40
+ ---
41
+
42
+ # API Conventions
43
+ ...
44
+ \`\`\`
45
+
46
+ **\`inclusion\` values** (display labels): \`always\`, \`on demand\`, \`manual\`. On push, aliases are normalized case-insensitively to the backend enum: \`on demand\` → auto, \`manual\` → referenced, \`always included\`/\`always\` → always; the raw backend values (\`auto\`, \`referenced\`) are also accepted. If \`inclusion\` is missing, it defaults to on-demand. Other missing fields default on push: \`description\` → empty, \`enabled\` → true, \`scope\` → workspace; \`knowledge_type\` is inferred from the file's path if absent or invalid.`,
47
+ ai_hints: `**Reading vs writing knowledge:**
48
+ - \`knowledge list\` / \`knowledge get\` are read-only viewers.
49
+ - To create or edit knowledge, edit files under \`knowledge/\` in a pulled directory and run \`workspace push\` (or \`sandbox push\`). Knowledge participates in push previews, \`--sync\`/\`--delete\`, and \`--include\`/\`--exclude\` globs (match against \`knowledge/**\`).
50
+ - A knowledge-only push works even with no .xs files: \`xano workspace push -i "knowledge/**"\`.
51
+
52
+ **\`knowledge list\` output modes:**
53
+ - Default markdown output renders always-on items in full under \`# Always-on Knowledge\` and everything else as name+description bullets under \`# On-demand Knowledge\` — ideal for feeding directly into an AI context window.
54
+ - \`--enabled-only\` defaults to true; use \`--no-enabled-only\` to include disabled items.
55
+
56
+ **\`knowledge get\` matching:** the name match is case-insensitive; on a miss the error lists all available names. Use \`--file <path>\` to fetch a skill's reference file instead of its SKILL.md.
57
+
58
+ **Frontmatter caution:** write \`inclusion\` (not \`mode\`) in frontmatter — the CLI writes \`inclusion: always | on demand | manual\` on pull and normalizes those labels back to the backend enum on push.`,
59
+ related_topics: ["workspace", "sandbox"],
60
+ commands: [
61
+ {
62
+ name: "knowledge list",
63
+ description: "List workspace knowledge and skills as plain-text markdown. Always-on items are rendered in full; on-demand items as name + description bullets.",
64
+ usage: "xano knowledge list [options]",
65
+ flags: [
66
+ { name: "branch", short: "b", type: "string", required: false, description: "Branch ID" },
67
+ { name: "enabled-only", type: "boolean", required: false, default: "true", description: "Only show enabled knowledge (use --no-enabled-only to include disabled)" },
68
+ { name: "type", short: "t", type: "string", required: false, description: "Filter by knowledge type: skill, doc, or agents.md" },
69
+ { name: "workspace", short: "w", type: "string", required: false, description: "Workspace ID (optional if set in profile)" },
70
+ { name: "output", short: "o", type: "string", required: false, default: "markdown", description: "Output format: markdown or json" },
71
+ { name: "profile", short: "p", type: "string", required: false, description: "Profile name to use" }
72
+ ],
73
+ examples: [
74
+ "xano knowledge list",
75
+ "xano knowledge list -t skill",
76
+ "xano knowledge list --no-enabled-only -o json"
77
+ ]
78
+ },
79
+ {
80
+ name: "knowledge get",
81
+ description: "Get a knowledge item by name (case-insensitive), or one of its reference files with --file. Errors list the available names on a miss.",
82
+ usage: "xano knowledge get <name> [options]",
83
+ args: [
84
+ { name: "name", required: true, description: "Knowledge item name (matched case-insensitively)" }
85
+ ],
86
+ flags: [
87
+ { name: "branch", short: "b", type: "string", required: false, description: "Branch ID" },
88
+ { name: "file", short: "f", type: "string", required: false, description: "Path of a reference file to fetch instead of the main content" },
89
+ { name: "workspace", short: "w", type: "string", required: false, description: "Workspace ID (optional if set in profile)" },
90
+ { name: "output", short: "o", type: "string", required: false, default: "text", description: "Output format: text or json" },
91
+ { name: "profile", short: "p", type: "string", required: false, description: "Profile name to use" }
92
+ ],
93
+ examples: [
94
+ 'xano knowledge get "API Conventions"',
95
+ 'xano knowledge get deploy_checklist --file references/runbook.md',
96
+ 'xano knowledge get "API Conventions" -o json'
97
+ ]
98
+ }
99
+ ],
100
+ workflows: [
101
+ {
102
+ name: "Load Workspace Knowledge into an AI Context",
103
+ description: "Feed workspace knowledge to an AI agent",
104
+ steps: [
105
+ "List everything enabled: `xano knowledge list`",
106
+ "The markdown output includes always-on items in full and on-demand items as an index",
107
+ "Fetch a specific on-demand item when needed: `xano knowledge get \"<name>\"`"
108
+ ],
109
+ example: `xano knowledge list
110
+ xano knowledge get "API Conventions"`
111
+ },
112
+ {
113
+ name: "Edit Knowledge via Workspace Sync",
114
+ description: "Create or update knowledge files with the push/pull workflow",
115
+ steps: [
116
+ "Pull the workspace: `xano workspace pull -d ./code` (knowledge lands under `knowledge/`)",
117
+ "Edit `knowledge/agents.md`, `knowledge/docs/*.md`, or `knowledge/skills/*/SKILL.md` (keep the `inclusion` frontmatter field: always, on demand, or manual)",
118
+ "Preview: `xano workspace push -d ./code --dry-run`",
119
+ "Push just the knowledge: `xano workspace push -d ./code -i 'knowledge/**'`"
120
+ ],
121
+ example: `xano workspace pull -d ./code
122
+ # edit knowledge/docs/api_conventions.md
123
+ xano workspace push -d ./code --dry-run
124
+ xano workspace push -d ./code -i 'knowledge/**'`
125
+ }
126
+ ]
127
+ };
@@ -30,14 +30,18 @@ export const sandboxDoc = {
30
30
 
31
31
  **Partial push is the default** — only changed files are sent. Use \`--sync\` for a full push, \`--sync --delete\` to also remove remote objects missing locally, and \`--dry-run\` to preview.
32
32
 
33
- **Glob filters** (\`-i\` include, \`-e\` exclude) are repeatable and match relative paths from the push directory.
33
+ **No glob filters on sandbox push:** unlike \`workspace push\`, the \`-i\`/\`-e\` include/exclude flags are intentionally NOT supported — partial pushes can hide deletions during review and cause data loss when promoted to the workspace.
34
+
35
+ **Workspace mismatch prompt:** pushing into a sandbox that currently holds a DIFFERENT workspace than your active profile triggers a warning and confirmation prompt (in non-interactive mode it errors instead). Run \`xano sandbox reset\` first to start clean.
36
+
37
+ **Knowledge sync is automatic:** \`sandbox pull\`/\`push\` sync knowledge and skills markdown under \`knowledge/\` alongside .xs files (see the \`knowledge\` topic). \`sandbox reset\` also clears the sandbox's knowledge files.
34
38
 
35
39
  **Transaction / GUID flags:** push wraps imports in a database transaction by default (\`--no-transaction\` to disable) and writes server-assigned GUIDs back to local files by default (\`--no-guids\` to disable).
36
40
 
37
41
  **Environment variables and tests** are managed per-sandbox via \`sandbox env\` and \`sandbox unit_test\` / \`sandbox workflow_test\` subcommands.
38
42
 
39
43
  **\`sandbox impersonate\` is a hidden alias for \`sandbox review\`** — prefer \`sandbox review\`.`,
40
- related_topics: ["workspace", "tenant", "start", "integration"],
44
+ related_topics: ["workspace", "tenant", "start", "knowledge", "integration"],
41
45
  commands: [
42
46
  {
43
47
  name: "sandbox get",
@@ -50,7 +54,7 @@ export const sandboxDoc = {
50
54
  },
51
55
  {
52
56
  name: "sandbox pull",
53
- description: "Pull sandbox contents to a local directory, splitting multidoc output into individual .xs files organized by type.",
57
+ description: "Pull sandbox contents to a local directory, splitting multidoc output into individual .xs files organized by type. Knowledge/skills markdown is written under knowledge/ automatically.",
54
58
  usage: "xano sandbox pull [options]",
55
59
  flags: [
56
60
  { name: "directory", short: "d", type: "string", required: false, default: ".", description: "Output directory for pulled documents" },
@@ -66,7 +70,7 @@ export const sandboxDoc = {
66
70
  },
67
71
  {
68
72
  name: "sandbox push",
69
- description: "Push local documents to the sandbox via multidoc import. Partial (changed-only) by default; shows a preview unless --force.",
73
+ description: "Push local documents to the sandbox via multidoc import. Partial (changed-only) by default; shows a preview unless --force. Include/exclude glob filters are intentionally NOT supported (unlike workspace push) — partial pushes can hide deletions during review and lead to data loss when promoted to the workspace. Pushing into a sandbox that currently holds a different workspace prompts for confirmation (errors in non-interactive mode); run `xano sandbox reset` first to start clean. Knowledge under knowledge/ is synced automatically.",
70
74
  usage: "xano sandbox push [options]",
71
75
  flags: [
72
76
  { name: "directory", short: "d", type: "string", required: false, default: ".", description: "Directory containing documents to push" },
@@ -79,8 +83,6 @@ export const sandboxDoc = {
79
83
  { name: "truncate", type: "boolean", required: false, description: "Truncate tables before importing records" },
80
84
  { name: "transaction", type: "boolean", required: false, default: "true", description: "Wrap import in a database transaction (--no-transaction to disable)" },
81
85
  { name: "guids", type: "boolean", required: false, default: "true", description: "Write server-assigned GUIDs back to local files after push (--no-guids to disable)" },
82
- { name: "include", short: "i", type: "string", required: false, description: "Glob pattern to include (repeatable)" },
83
- { name: "exclude", short: "e", type: "string", required: false, description: "Glob pattern to exclude (repeatable)" },
84
86
  { name: "review", type: "boolean", required: false, description: "After pushing, open sandbox in the browser to review" }
85
87
  ],
86
88
  examples: [
@@ -89,9 +91,7 @@ export const sandboxDoc = {
89
91
  "xano sandbox push --sync",
90
92
  "xano sandbox push --sync --delete",
91
93
  "xano sandbox push --dry-run",
92
- "xano sandbox push --review",
93
- "xano sandbox push -i 'function/*' -i 'table/*'",
94
- "xano sandbox push -e 'table/*' --records"
94
+ "xano sandbox push --review"
95
95
  ]
96
96
  },
97
97
  {
@@ -113,7 +113,7 @@ export const sandboxDoc = {
113
113
  },
114
114
  {
115
115
  name: "sandbox reset",
116
- description: "Reset the sandbox — clears all workspace data and drafts but keeps the sandbox itself.",
116
+ description: "Reset the sandbox — clears all workspace data, drafts, and knowledge files, but keeps the sandbox itself. Run this before pushing a different workspace into the sandbox.",
117
117
  usage: "xano sandbox reset [--force]",
118
118
  flags: [
119
119
  { name: "force", short: "f", type: "boolean", required: false, description: "Skip confirmation prompt" }
@@ -96,9 +96,10 @@ Examples of where these markers appear:
96
96
  | \`workspace\` | Sync workspaces (pull/push), git integration |
97
97
  | \`sandbox\` | Personal auto-provisioned dev environment (free-tier friendly) |
98
98
  | \`branch\` | Manage workspace branches |
99
- | \`function\` | Manage individual functions |
99
+ | \`function\` | Manage and run individual functions |
100
+ | \`knowledge\` | Read workspace knowledge & skills (AI context docs) |
100
101
  | \`release\` | Create and manage named releases |
101
- | \`tenant\` | Manage tenants, deployments, backups, env vars |
102
+ | \`tenant\` | Manage tenants, deployments, backups, snapshots, env vars |
102
103
  | \`unit_test\` | Run unit tests |
103
104
  | \`workflow_test\` | Run workflow tests |
104
105
  | \`platform\` | View available platform versions |
@@ -17,6 +17,8 @@ export const staticHostDoc = {
17
17
 
18
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
19
 
20
+ **\`.gitignore\` is respected on directory pushes:** files matched by the source directory's root \`.gitignore\` are skipped (and \`.git/\` is always excluded). Use \`--no-gitignore\` to push everything. If every file is ignored, the push errors with a hint to use \`--no-gitignore\`.
21
+
20
22
  **build get/delete/deploy take \`--build_id\` as a flag**, not a positional argument (older CLI versions used positionals).
21
23
 
22
24
  **\`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).
@@ -104,7 +106,7 @@ export const staticHostDoc = {
104
106
  },
105
107
  {
106
108
  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.",
109
+ 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. When pushing a directory, files matched by the root .gitignore are excluded by default (use --no-gitignore to push everything; .git/ is always excluded). For package.json builds, waits for the build to finish unless --no-wait.",
108
110
  usage: "xano static_host build push <static_host> [options]",
109
111
  args: [
110
112
  { name: "static_host", required: true, description: "Static host name" }
@@ -114,6 +116,7 @@ export const staticHostDoc = {
114
116
  { name: "file", short: "f", type: "string", required: false, description: "Path to a zip file to upload (alternative to -d). Mutually exclusive with --directory." },
115
117
  { name: "name", short: "n", type: "string", required: false, description: "Build name (auto-generated from the current timestamp if omitted)" },
116
118
  { name: "description", type: "string", required: false, description: "Build description" },
119
+ { name: "no-gitignore", type: "boolean", required: false, default: "false", description: "Push every file in the directory, including those matched by .gitignore (the .git/ folder is always excluded)" },
117
120
  { name: "no-wait", type: "boolean", required: false, description: "Return immediately after upload instead of waiting for the build to finish" },
118
121
  { name: "workspace", short: "w", type: "string", required: false, description: "Workspace ID (optional if set in profile)" },
119
122
  { name: "output", short: "o", type: "string", required: false, default: "summary", description: "Output format: summary or json" }
@@ -122,6 +125,7 @@ export const staticHostDoc = {
122
125
  "xano static_host build push my-app -d ./dist -n 'v1.0.0'",
123
126
  "xano static_host build push my-app # current dir, auto-named",
124
127
  "xano static_host build push my-app -f ./build.zip -n 'v1.0.0'",
128
+ "xano static_host build push my-app -d ./site --no-gitignore",
125
129
  "xano static_host build push my-app -n 'release' --description 'Production build'"
126
130
  ]
127
131
  },
@@ -10,6 +10,7 @@ export const tenantDoc = {
10
10
  - **Deployments**: Tenants receive updates via named releases or platform versions.
11
11
  - **Environment variables**: Managed per-tenant for configuration isolation.
12
12
  - **Backups**: Per-tenant backup and restore for disaster recovery.
13
+ - **Snapshots**: Instant database clones per tenant. Swap the live database to a snapshot (and back) for fast, reversible rollbacks — e.g. before a risky deployment.
13
14
  - **Pull**: Read-only export of tenant contents (same multidoc format as \`workspace pull\`).
14
15
  - **Push**: Direct tenant push is NOT supported. Use a release deployment or the sandbox workflow instead.
15
16
 
@@ -37,6 +38,7 @@ Tenants are identified by their **name** (not numeric IDs).`,
37
38
  - Deployment: deploy_release, deploy_platform
38
39
  - Configuration: env list, env get, env set, env delete, env get_all, env set_all
39
40
  - Backups: backup create, backup list, backup export, backup import, backup restore, backup delete
41
+ - Snapshots: snapshot create, snapshot list, snapshot swap, snapshot delete (instant DB clones; swap is reversible — swap back to the original name to roll back)
40
42
  - Infrastructure: cluster create, cluster list, cluster get, cluster edit, cluster delete, cluster license get, cluster license set
41
43
  - License: license get, license set
42
44
  - Testing: unit_test list/run/run_all, workflow_test list/run/run_all
@@ -351,6 +353,64 @@ Tenants are identified by their **name** (not numeric IDs).`,
351
353
  ],
352
354
  examples: ["xano tenant backup delete my-tenant --backup_id 123 --force"]
353
355
  },
356
+ // Snapshots
357
+ {
358
+ name: "tenant snapshot list",
359
+ description: "List database snapshots for a tenant. Output marks the [ORIGINAL] database and the currently [LIVE] one.",
360
+ usage: "xano tenant snapshot list <tenant_name> [options]",
361
+ args: [{ name: "tenant_name", required: true, description: "Tenant name to list snapshots for" }],
362
+ flags: [
363
+ { name: "workspace", short: "w", type: "string", required: false, description: "Workspace ID (uses profile workspace if not provided)" },
364
+ { name: "output", short: "o", type: "string", required: false, default: "summary", description: "Output format: summary or json" }
365
+ ],
366
+ examples: ["xano tenant snapshot list my-tenant", "xano tenant snapshot list my-tenant -o json"]
367
+ },
368
+ {
369
+ name: "tenant snapshot create",
370
+ description: "Create a database snapshot for a tenant — an instant clone of the tenant's database (much faster than a full backup).",
371
+ usage: "xano tenant snapshot create <tenant_name> [options]",
372
+ args: [{ name: "tenant_name", required: true, description: "Tenant name to snapshot" }],
373
+ flags: [
374
+ { name: "label", short: "l", type: "string", required: false, description: "Optional label appended to the snapshot description (alphanumeric)" },
375
+ { name: "workspace", short: "w", type: "string", required: false, description: "Workspace ID (uses profile workspace if not provided)" },
376
+ { name: "output", short: "o", type: "string", required: false, default: "summary", description: "Output format: summary or json" }
377
+ ],
378
+ examples: [
379
+ "xano tenant snapshot create my-tenant --label before-v2",
380
+ "xano tenant snapshot create my-tenant -l before-v2 -o json"
381
+ ]
382
+ },
383
+ {
384
+ name: "tenant snapshot swap",
385
+ description: "Swap a tenant's live database to a snapshot. This repoints the tenant; the current live database is left untouched, so you can swap back. To roll back, swap to the original database name. Prompts for confirmation unless --force.",
386
+ usage: "xano tenant snapshot swap <tenant_name> --snapshot <name> [options]",
387
+ args: [{ name: "tenant_name", required: true, description: "Tenant name to swap" }],
388
+ flags: [
389
+ { name: "snapshot", type: "string", required: true, description: "Snapshot database name to swap to (use the original tenant name to roll back)" },
390
+ { name: "force", short: "f", type: "boolean", required: false, description: "Skip confirmation prompt" },
391
+ { name: "workspace", short: "w", type: "string", required: false, description: "Workspace ID (uses profile workspace if not provided)" },
392
+ { name: "output", short: "o", type: "string", required: false, default: "summary", description: "Output format: summary or json" }
393
+ ],
394
+ examples: [
395
+ "xano tenant snapshot swap my-tenant --snapshot my-tenant_bk_20260603_203614",
396
+ "xano tenant snapshot swap my-tenant --snapshot my-tenant --force # roll back to original"
397
+ ]
398
+ },
399
+ {
400
+ name: "tenant snapshot delete",
401
+ description: "Delete a snapshot permanently — this drops the snapshot database and cannot be undone. The live and original databases cannot be deleted. Prompts for confirmation unless --force.",
402
+ usage: "xano tenant snapshot delete <tenant_name> --snapshot <name> [options]",
403
+ args: [{ name: "tenant_name", required: true, description: "Tenant name that owns the snapshot" }],
404
+ flags: [
405
+ { name: "snapshot", type: "string", required: true, description: "Snapshot database name to delete" },
406
+ { name: "force", short: "f", type: "boolean", required: false, description: "[CRITICAL] NEVER run without explicit user confirmation. Skips the confirmation prompt." },
407
+ { name: "workspace", short: "w", type: "string", required: false, description: "Workspace ID (uses profile workspace if not provided)" },
408
+ { name: "output", short: "o", type: "string", required: false, default: "summary", description: "Output format: summary or json" }
409
+ ],
410
+ examples: [
411
+ "xano tenant snapshot delete my-tenant --snapshot my-tenant_bk_20260603_203614"
412
+ ]
413
+ },
354
414
  // License
355
415
  {
356
416
  name: "tenant license get",
@@ -41,17 +41,19 @@ export const unitTestDoc = {
41
41
  },
42
42
  {
43
43
  name: "unit_test run",
44
- description: "Run a single unit test by ID",
44
+ description: "Run a single unit test by ID. The test runs against the resolved branch (--branch, then profile branch, then live). Summary output prints PASS/FAIL with error details and exits 1 on failure.",
45
45
  usage: "xano unit_test run <unit_test_id> [options]",
46
46
  args: [
47
47
  { name: "unit_test_id", required: true, description: "ID of the unit test to run" }
48
48
  ],
49
49
  flags: [
50
+ { name: "branch", short: "b", type: "string", required: false, description: "Branch the unit test belongs to (uses profile branch if not provided, then the live branch)" },
50
51
  { name: "workspace", short: "w", type: "string", required: false, description: "Workspace ID (uses profile workspace if not provided)" },
51
52
  { name: "output", short: "o", type: "string", required: false, default: "summary", description: "Output format: summary or json" }
52
53
  ],
53
54
  examples: [
54
55
  "xano unit_test run 123",
56
+ "xano unit_test run 123 -b dev",
55
57
  "xano unit_test run 123 -o json"
56
58
  ]
57
59
  },
@@ -56,13 +56,25 @@ After \`workspace pull\`, files are organized using snake_case naming:
56
56
  │ │ └── on_connect.xs # MCP server triggers
57
57
  │ └── tool/
58
58
  │ └── my_tool.xs # AI tools
59
- └── realtime/
60
- ├── channel/
61
- │ └── my_channel.xs # Realtime channels
62
- └── trigger/
63
- └── on_connect.xs # Realtime triggers
59
+ ├── realtime/
60
+ │ ├── channel/
61
+ │ │ └── my_channel.xs # Realtime channels
62
+ │ └── trigger/
63
+ │ └── on_connect.xs # Realtime triggers
64
+ └── knowledge/ # Knowledge & skills (markdown, synced automatically)
65
+ ├── agents.md # Workspace AGENTS.md
66
+ ├── docs/
67
+ │ └── api_conventions.md # Knowledge docs
68
+ └── skills/
69
+ └── my_skill/
70
+ ├── SKILL.md
71
+ └── references/
64
72
  \`\`\`
65
73
 
74
+ ## Knowledge Sync
75
+
76
+ \`workspace pull\` and \`workspace push\` automatically sync knowledge and skills (markdown files under \`knowledge/\`) alongside XanoScript — no extra flag. Knowledge participates in push previews, \`--sync\`/\`--delete\`, and \`--include\`/\`--exclude\` globs. See the \`knowledge\` topic for the file layout and frontmatter format.
77
+
66
78
  ## Syntax note
67
79
 
68
80
  Xano CLI commands are SPACE-separated (e.g. \`xano workspace pull\`), not colon-separated.
@@ -105,6 +117,15 @@ For lighter-weight iterative development without pulling the whole workspace, se
105
117
  - \`--include/-i\` and \`--exclude/-e\`: Glob patterns for selective push (repeatable)
106
118
  - \`--no-transaction\` and \`--no-guids\` disable the default transaction wrapping and GUID write-back
107
119
 
120
+ **Knowledge sync (automatic):**
121
+ - \`pull\` writes knowledge/skills markdown under \`knowledge/\`; \`push\` sends it back — no flag needed
122
+ - Knowledge respects \`--include\`/\`--exclude\` (match against \`knowledge/**\`), \`--sync\`, and \`--delete\`
123
+ - A knowledge-only push works with no .xs files: \`xano workspace push -i "knowledge/**"\`
124
+ - Frontmatter uses \`inclusion: always | on demand | manual\` — see the \`knowledge\` topic
125
+
126
+ **Long pushes:**
127
+ - Large multidoc pushes are no longer capped by a hidden 300s fetch timeout; if a request does time out, raise it with the \`XANO_CLI_REQUEST_TIMEOUT_MS\` env var (0 disables)
128
+
108
129
  **Git integration:**
109
130
  - \`workspace git pull\` pulls XanoScript directly from GitHub/GitLab repos
110
131
  - Supports private repos with \`-t/--token\` flag (falls back to GITHUB_TOKEN env var)
@@ -113,7 +134,7 @@ For lighter-weight iterative development without pulling the whole workspace, se
113
134
  **When to use sandbox instead:**
114
135
  - \`sandbox\` is a lighter-weight alternative for ephemeral, isolated iteration
115
136
  - Use workspace pull/push for canonical sync, version control, and CI/CD`,
116
- related_topics: ["start", "branch", "function", "release", "sandbox", "integration"],
137
+ related_topics: ["start", "branch", "function", "release", "sandbox", "knowledge", "integration"],
117
138
  commands: [
118
139
  {
119
140
  name: "workspace list",
@@ -198,7 +219,7 @@ For lighter-weight iterative development without pulling the whole workspace, se
198
219
  },
199
220
  {
200
221
  name: "workspace pull",
201
- description: "Download workspace code to a local directory. Splits the multidoc response into individual .xs files organized by type. The target directory is the -d/--directory flag (default: current directory), not a positional argument.",
222
+ description: "Download workspace code to a local directory. Splits the multidoc response into individual .xs files organized by type, and also writes workspace knowledge/skills markdown under knowledge/. The target directory is the -d/--directory flag (default: current directory), not a positional argument.",
202
223
  usage: "xano workspace pull [options]",
203
224
  flags: [
204
225
  { name: "directory", short: "d", type: "string", required: false, default: ".", description: "Output directory for pulled documents (defaults to current directory)" },
@@ -218,7 +239,7 @@ For lighter-weight iterative development without pulling the whole workspace, se
218
239
  },
219
240
  {
220
241
  name: "workspace push",
221
- description: "Upload local XanoScript files to a workspace. Default mode is partial (only changed files). Use --sync for a full push. The source directory is the -d/--directory flag (default: current directory), not a positional argument. A partial push is additive, not declarative: it adds and updates but makes no destructive changes (it won't drop a removed column or relax a constraint), so local files and the live workspace can diverge. Use --sync for destructive changes; --dry-run to preview.",
242
+ description: "Upload local XanoScript files to a workspace, including knowledge/skills markdown under knowledge/ (synced automatically, shown in the preview). Default mode is partial (only changed files). Use --sync for a full push. The source directory is the -d/--directory flag (default: current directory), not a positional argument. A partial push is additive, not declarative: it adds and updates but makes no destructive changes (it won't drop a removed column or relax a constraint), so local files and the live workspace can diverge. Use --sync for destructive changes; --dry-run to preview.",
222
243
  usage: "xano workspace push [options]",
223
244
  flags: [
224
245
  { name: "directory", short: "d", type: "string", required: false, default: ".", description: "Directory containing documents to push (defaults to current directory)" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xano/developer-mcp",
3
- "version": "2.2.2-beta.6",
3
+ "version": "2.2.3-beta.0",
4
4
  "description": "MCP server and library for Xano development - XanoScript validation, Meta API, Run API, and CLI documentation",
5
5
  "type": "module",
6
6
  "main": "dist/lib.js",
@@ -61,7 +61,7 @@
61
61
  "license": "MIT",
62
62
  "dependencies": {
63
63
  "@modelcontextprotocol/sdk": "^1.26.0",
64
- "@xano/xanoscript-language-server": "^12.6.1",
64
+ "@xano/xanoscript-language-server": "^12.8.0",
65
65
  "minimatch": "^10.1.2",
66
66
  "zod": "^4.0.0"
67
67
  },