@xano/developer-mcp 1.0.25 → 1.0.26

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.
@@ -0,0 +1,153 @@
1
+ export const profileDoc = {
2
+ topic: "profile",
3
+ title: "Xano CLI - Profile Management",
4
+ description: `Profiles store your Xano credentials and context (workspace, branch, project). Multiple profiles let you switch between instances and environments.
5
+
6
+ ## Storage Location
7
+
8
+ \`~/.xano/credentials.yaml\`
9
+
10
+ ## Profile Structure
11
+
12
+ \`\`\`yaml
13
+ profiles:
14
+ production:
15
+ account_origin: https://app.xano.com
16
+ instance_origin: https://prod-instance.xano.io
17
+ access_token: <token>
18
+ workspace: 1
19
+ branch: 1 # main branch
20
+ project: abc123 # Run project ID
21
+ run_base_url: https://app.dev.xano.com/
22
+ staging:
23
+ instance_origin: https://staging-instance.xano.io
24
+ access_token: <token>
25
+ workspace: 1
26
+ branch: 2 # staging branch
27
+ default: production
28
+ \`\`\``,
29
+ ai_hints: `**Use profiles for:**
30
+ - Different environments (production, staging, development)
31
+ - Multiple Xano instances
32
+ - Team member accounts
33
+
34
+ **Token security:**
35
+ - Tokens are stored in plaintext - ensure proper file permissions
36
+ - Use \`profile:token\` to pipe token to clipboard without exposing in terminal history
37
+
38
+ **Switching contexts:**
39
+ - Use \`-p <profile>\` flag on any command
40
+ - Or set \`XANO_PROFILE\` environment variable
41
+ - Or use \`profile:set-default\` to change default`,
42
+ related_topics: ["start", "integration"],
43
+ commands: [
44
+ {
45
+ name: "profile:wizard",
46
+ description: "Interactive setup wizard for creating a profile",
47
+ usage: "xano profile:wizard",
48
+ examples: ["xano profile:wizard"]
49
+ },
50
+ {
51
+ name: "profile:create",
52
+ description: "Create a new profile with explicit flags",
53
+ usage: "xano profile:create <name> -i <instance_origin> -t <token> [options]",
54
+ args: [
55
+ { name: "name", required: true, description: "Profile name" }
56
+ ],
57
+ flags: [
58
+ { name: "instance_origin", short: "i", type: "string", required: true, description: "Xano instance URL" },
59
+ { name: "access_token", short: "t", type: "string", required: true, description: "Access token" },
60
+ { name: "workspace", short: "w", type: "string", required: false, description: "Default workspace ID" },
61
+ { name: "branch", short: "b", type: "string", required: false, description: "Default branch ID" },
62
+ { name: "project", short: "j", type: "string", required: false, description: "Default Run project ID" }
63
+ ],
64
+ examples: [
65
+ "xano profile:create production -i https://x8ki.xano.io -t mytoken123",
66
+ "xano profile:create staging -i https://x8ki.xano.io -t mytoken -w 1 -b 2"
67
+ ]
68
+ },
69
+ {
70
+ name: "profile:list",
71
+ description: "List all configured profiles",
72
+ usage: "xano profile:list [--details]",
73
+ flags: [
74
+ { name: "details", type: "boolean", required: false, description: "Show masked tokens and full config" }
75
+ ],
76
+ examples: ["xano profile:list", "xano profile:list --details"]
77
+ },
78
+ {
79
+ name: "profile:edit",
80
+ description: "Edit an existing profile",
81
+ usage: "xano profile:edit <name> [options]",
82
+ args: [
83
+ { name: "name", required: true, description: "Profile name to edit" }
84
+ ],
85
+ flags: [
86
+ { name: "workspace", short: "w", type: "string", required: false, description: "Set workspace ID" },
87
+ { name: "branch", short: "b", type: "string", required: false, description: "Set branch ID" },
88
+ { name: "project", short: "j", type: "string", required: false, description: "Set Run project ID" },
89
+ { name: "remove-workspace", type: "boolean", required: false, description: "Remove workspace setting" },
90
+ { name: "remove-branch", type: "boolean", required: false, description: "Remove branch setting" }
91
+ ],
92
+ examples: [
93
+ "xano profile:edit production -w 2",
94
+ "xano profile:edit staging --remove-branch"
95
+ ]
96
+ },
97
+ {
98
+ name: "profile:delete",
99
+ description: "Delete a profile",
100
+ usage: "xano profile:delete <name> [--force]",
101
+ args: [
102
+ { name: "name", required: true, description: "Profile name to delete" }
103
+ ],
104
+ flags: [
105
+ { name: "force", type: "boolean", required: false, description: "Skip confirmation prompt" }
106
+ ],
107
+ examples: ["xano profile:delete old-profile", "xano profile:delete test --force"]
108
+ },
109
+ {
110
+ name: "profile:set-default",
111
+ description: "Set the default profile",
112
+ usage: "xano profile:set-default <name>",
113
+ args: [
114
+ { name: "name", required: true, description: "Profile to set as default" }
115
+ ],
116
+ examples: ["xano profile:set-default production"]
117
+ },
118
+ {
119
+ name: "profile:get-default",
120
+ description: "Show the current default profile name",
121
+ usage: "xano profile:get-default",
122
+ examples: ["xano profile:get-default"]
123
+ },
124
+ {
125
+ name: "profile:me",
126
+ description: "Display current authenticated user info",
127
+ usage: "xano profile:me [-p <profile>]",
128
+ examples: ["xano profile:me", "xano profile:me -p staging"]
129
+ },
130
+ {
131
+ name: "profile:token",
132
+ description: "Print the access token (for piping to clipboard)",
133
+ usage: "xano profile:token [-p <profile>]",
134
+ examples: [
135
+ "xano profile:token",
136
+ "xano profile:token | pbcopy # macOS",
137
+ "xano profile:token | xclip # Linux"
138
+ ]
139
+ }
140
+ ],
141
+ workflows: [
142
+ {
143
+ name: "Multi-environment Setup",
144
+ description: "Configure profiles for production and staging",
145
+ steps: [
146
+ "Create production profile: `xano profile:create prod -i <url> -t <token> -b 1`",
147
+ "Create staging profile: `xano profile:create staging -i <url> -t <token> -b 2`",
148
+ "Set default: `xano profile:set-default prod`",
149
+ "Use staging when needed: `xano workspace:pull ./code -p staging`"
150
+ ]
151
+ }
152
+ ]
153
+ };
@@ -0,0 +1,2 @@
1
+ import type { TopicDoc } from "../types.js";
2
+ export declare const runDoc: TopicDoc;
@@ -0,0 +1,248 @@
1
+ export const runDoc = {
2
+ topic: "run",
3
+ title: "Xano CLI - Run API Commands",
4
+ description: `Run commands let you execute XanoScript code, manage Run projects, sessions, environment variables, and secrets. The Run API enables serverless execution of XanoScript.
5
+
6
+ ## Run API Base URL
7
+
8
+ \`https://app.dev.xano.com/api:run\`
9
+
10
+ This is different from your instance URL used by the Meta API.`,
11
+ ai_hints: `**Run vs Meta API:**
12
+ - Run API: Execute code, manage runtime environment
13
+ - Meta API: Manage workspace resources (tables, APIs, functions)
14
+
15
+ **Project context:**
16
+ - Most run commands require a project
17
+ - Set project in profile or use \`-j\` flag
18
+ - Projects isolate execution environments
19
+
20
+ **Execution modes:**
21
+ - Jobs: One-time execution, returns result
22
+ - Services: Long-running, exposes endpoints
23
+
24
+ **Environment variables:**
25
+ - Stored per-project in Run API
26
+ - Override at runtime with \`--env KEY=value\``,
27
+ related_topics: ["profile", "integration"],
28
+ commands: [
29
+ {
30
+ name: "run:exec",
31
+ description: "Execute XanoScript code",
32
+ usage: "xano run:exec [path] [options]",
33
+ args: [
34
+ { name: "path", required: false, description: "Path to .xs file, directory, or URL" }
35
+ ],
36
+ flags: [
37
+ { name: "project", short: "j", type: "string", required: false, description: "Run project ID" },
38
+ { name: "args", short: "a", type: "string", required: false, description: "JSON file with input arguments" },
39
+ { name: "env", type: "string", required: false, description: "Environment override KEY=value (repeatable)" },
40
+ { name: "stdin", type: "boolean", required: false, description: "Read code from stdin" },
41
+ { name: "edit", type: "boolean", required: false, description: "Open in $EDITOR before execution" }
42
+ ],
43
+ examples: [
44
+ "xano run:exec ./job.xs",
45
+ "xano run:exec ./job.xs -a inputs.json",
46
+ "xano run:exec ./job.xs --env API_KEY=secret --env DEBUG=true",
47
+ "echo 'var:x = 1 + 1' | xano run:exec --stdin",
48
+ "xano run:exec ./scripts/ # executes all .xs files as multidoc"
49
+ ]
50
+ },
51
+ {
52
+ name: "run:info",
53
+ description: "Analyze XanoScript without executing",
54
+ usage: "xano run:info [path] [options]",
55
+ args: [
56
+ { name: "path", required: false, description: "Path to .xs file" }
57
+ ],
58
+ flags: [
59
+ { name: "stdin", type: "boolean", required: false, description: "Read from stdin" }
60
+ ],
61
+ examples: [
62
+ "xano run:info ./job.xs",
63
+ "cat script.xs | xano run:info --stdin"
64
+ ]
65
+ },
66
+ {
67
+ name: "run:projects:list",
68
+ description: "List all Run projects",
69
+ usage: "xano run:projects:list",
70
+ examples: ["xano run:projects:list"]
71
+ },
72
+ {
73
+ name: "run:projects:create",
74
+ description: "Create a new Run project",
75
+ usage: "xano run:projects:create [options]",
76
+ flags: [
77
+ { name: "name", short: "n", type: "string", required: true, description: "Project name" },
78
+ { name: "description", short: "d", type: "string", required: false, description: "Project description" }
79
+ ],
80
+ examples: ["xano run:projects:create -n 'My Project' -d 'Production jobs'"]
81
+ },
82
+ {
83
+ name: "run:projects:update",
84
+ description: "Update a Run project",
85
+ usage: "xano run:projects:update <project_id> [options]",
86
+ args: [
87
+ { name: "project_id", required: true, description: "Project ID to update" }
88
+ ],
89
+ flags: [
90
+ { name: "name", short: "n", type: "string", required: false, description: "New project name" },
91
+ { name: "description", short: "d", type: "string", required: false, description: "New description" }
92
+ ],
93
+ examples: ["xano run:projects:update abc123 -n 'Updated Name'"]
94
+ },
95
+ {
96
+ name: "run:projects:delete",
97
+ description: "Delete a Run project",
98
+ usage: "xano run:projects:delete <project_id> [--force]",
99
+ args: [
100
+ { name: "project_id", required: true, description: "Project ID to delete" }
101
+ ],
102
+ flags: [
103
+ { name: "force", type: "boolean", required: false, description: "Skip confirmation" }
104
+ ],
105
+ examples: ["xano run:projects:delete abc123 --force"]
106
+ },
107
+ {
108
+ name: "run:env:list",
109
+ description: "List environment variables for project",
110
+ usage: "xano run:env:list [-j <project>]",
111
+ examples: ["xano run:env:list"]
112
+ },
113
+ {
114
+ name: "run:env:set",
115
+ description: "Set an environment variable",
116
+ usage: "xano run:env:set <name> <value> [-j <project>]",
117
+ args: [
118
+ { name: "name", required: true, description: "Variable name" },
119
+ { name: "value", required: true, description: "Variable value" }
120
+ ],
121
+ examples: ["xano run:env:set API_KEY sk-123456"]
122
+ },
123
+ {
124
+ name: "run:env:get",
125
+ description: "Get an environment variable value",
126
+ usage: "xano run:env:get <name> [-j <project>]",
127
+ args: [
128
+ { name: "name", required: true, description: "Variable name" }
129
+ ],
130
+ examples: ["xano run:env:get API_KEY"]
131
+ },
132
+ {
133
+ name: "run:env:delete",
134
+ description: "Delete an environment variable",
135
+ usage: "xano run:env:delete <name> [-j <project>]",
136
+ args: [
137
+ { name: "name", required: true, description: "Variable name" }
138
+ ],
139
+ examples: ["xano run:env:delete OLD_KEY"]
140
+ },
141
+ {
142
+ name: "run:sessions:list",
143
+ description: "List execution sessions",
144
+ usage: "xano run:sessions:list [-j <project>]",
145
+ examples: ["xano run:sessions:list"]
146
+ },
147
+ {
148
+ name: "run:sessions:get",
149
+ description: "Get session details",
150
+ usage: "xano run:sessions:get <session_id>",
151
+ args: [
152
+ { name: "session_id", required: true, description: "Session ID" }
153
+ ],
154
+ examples: ["xano run:sessions:get sess_abc123"]
155
+ },
156
+ {
157
+ name: "run:sessions:start",
158
+ description: "Start a session",
159
+ usage: "xano run:sessions:start <session_id>",
160
+ args: [
161
+ { name: "session_id", required: true, description: "Session ID" }
162
+ ],
163
+ examples: ["xano run:sessions:start sess_abc123"]
164
+ },
165
+ {
166
+ name: "run:sessions:stop",
167
+ description: "Stop a session",
168
+ usage: "xano run:sessions:stop <session_id>",
169
+ args: [
170
+ { name: "session_id", required: true, description: "Session ID" }
171
+ ],
172
+ examples: ["xano run:sessions:stop sess_abc123"]
173
+ },
174
+ {
175
+ name: "run:sessions:delete",
176
+ description: "Delete a session",
177
+ usage: "xano run:sessions:delete <session_id>",
178
+ args: [
179
+ { name: "session_id", required: true, description: "Session ID" }
180
+ ],
181
+ examples: ["xano run:sessions:delete sess_abc123"]
182
+ },
183
+ {
184
+ name: "run:secrets:list",
185
+ description: "List secrets",
186
+ usage: "xano run:secrets:list [-j <project>]",
187
+ examples: ["xano run:secrets:list"]
188
+ },
189
+ {
190
+ name: "run:secrets:set",
191
+ description: "Set a secret (docker registry or service account)",
192
+ usage: "xano run:secrets:set <name> [options]",
193
+ args: [
194
+ { name: "name", required: true, description: "Secret name" }
195
+ ],
196
+ flags: [
197
+ { name: "type", short: "t", type: "string", required: true, description: "Secret type: dockerconfigjson, service-account-token" }
198
+ ],
199
+ examples: ["xano run:secrets:set docker-creds -t dockerconfigjson"]
200
+ },
201
+ {
202
+ name: "run:secrets:get",
203
+ description: "Get a secret",
204
+ usage: "xano run:secrets:get <name>",
205
+ args: [
206
+ { name: "name", required: true, description: "Secret name" }
207
+ ],
208
+ examples: ["xano run:secrets:get docker-creds"]
209
+ },
210
+ {
211
+ name: "run:secrets:delete",
212
+ description: "Delete a secret",
213
+ usage: "xano run:secrets:delete <name>",
214
+ args: [
215
+ { name: "name", required: true, description: "Secret name" }
216
+ ],
217
+ examples: ["xano run:secrets:delete old-secret"]
218
+ }
219
+ ],
220
+ workflows: [
221
+ {
222
+ name: "Execute a Job",
223
+ description: "Run XanoScript code and get results",
224
+ steps: [
225
+ "Write your job in a .xs file",
226
+ "Execute: `xano run:exec ./job.xs`",
227
+ "View timing and response in output"
228
+ ],
229
+ example: `# job.xs
230
+ job: my_job
231
+ ---
232
+ var:result = 1 + 1
233
+ return = var:result
234
+
235
+ # Execute
236
+ xano run:exec ./job.xs`
237
+ },
238
+ {
239
+ name: "Configure Environment",
240
+ description: "Set up environment variables for a project",
241
+ steps: [
242
+ "List existing: `xano run:env:list`",
243
+ "Set variables: `xano run:env:set KEY value`",
244
+ "Execute with overrides: `xano run:exec job.xs --env KEY=override`"
245
+ ]
246
+ }
247
+ ]
248
+ };
@@ -0,0 +1,2 @@
1
+ import type { TopicDoc } from "../types.js";
2
+ export declare const startDoc: TopicDoc;
@@ -0,0 +1,111 @@
1
+ export const startDoc = {
2
+ topic: "start",
3
+ title: "Xano CLI - Getting Started",
4
+ description: `The Xano CLI provides command-line access to manage your Xano workspaces, execute XanoScript, and interact with the Run API.
5
+
6
+ > **Note:** The CLI is optional but recommended for local development workflows. Not all Xano users will have it installed. You can accomplish most tasks using the Meta API directly, but the CLI provides a more convenient developer experience for code sync and local editing.
7
+
8
+ ## Installation
9
+
10
+ **Via npm (recommended):**
11
+ \`\`\`bash
12
+ npm install -g @xano/cli
13
+ \`\`\`
14
+
15
+ **Via GitHub:**
16
+ \`\`\`bash
17
+ git clone https://github.com/xano-inc/cli.git
18
+ cd cli
19
+ npm install
20
+ npm link
21
+ \`\`\`
22
+
23
+ **Links:**
24
+ - npm: https://www.npmjs.com/package/@xano/cli
25
+ - GitHub: https://github.com/xano-inc/cli
26
+
27
+ ## Quick Setup
28
+
29
+ Use the interactive wizard to configure your first profile:
30
+
31
+ \`\`\`bash
32
+ xano profile:wizard
33
+ \`\`\`
34
+
35
+ This will prompt you for:
36
+ 1. Your Xano access token (from Settings > Access Tokens in dashboard)
37
+ 2. Select your instance
38
+ 3. Select a workspace
39
+ 4. Select a branch
40
+ 5. Select a Run project (optional)
41
+
42
+ ## Credential Storage
43
+
44
+ Credentials are stored in \`~/.xano/credentials.yaml\`:
45
+
46
+ \`\`\`yaml
47
+ profiles:
48
+ default:
49
+ instance_origin: https://your-instance.xano.io
50
+ access_token: <your-token>
51
+ workspace: 1
52
+ branch: 1
53
+ project: abc123
54
+ default: default
55
+ \`\`\`
56
+
57
+ ## Global Flags
58
+
59
+ All commands support:
60
+ - \`-p, --profile <name>\` - Use a specific profile (overrides default)
61
+ - \`-v, --verbose\` - Show detailed HTTP request/response logs
62
+
63
+ ## Environment Variables
64
+
65
+ - \`XANO_PROFILE\` - Override the default profile
66
+ - \`XANO_VERBOSE\` - Enable verbose logging
67
+
68
+ ## Command Categories
69
+
70
+ | Category | Description |
71
+ |----------|-------------|
72
+ | \`profile:*\` | Manage authentication profiles |
73
+ | \`workspace:*\` | Sync workspaces (pull/push) |
74
+ | \`function:*\` | Manage functions |
75
+ | \`run:*\` | Execute code and manage Run projects |
76
+ | \`static_host:*\` | Deploy static sites |`,
77
+ ai_hints: `**Important:** The CLI is optional - not all users will have it installed. Before suggesting CLI commands, check if the user has it available or ask if they'd like to install it. The Meta API can accomplish the same tasks programmatically.
78
+
79
+ **When to use CLI vs Meta API:**
80
+ - Use CLI for: local development, code sync, quick execution, scripting
81
+ - Use Meta API for: programmatic management, integrations, automation from code
82
+ - If CLI not installed: Use Meta API endpoints directly
83
+
84
+ **Getting started workflow (if CLI is installed):**
85
+ 1. Run \`xano profile:wizard\` to set up authentication
86
+ 2. Use \`xano workspace:pull ./code\` to download workspace code
87
+ 3. Edit .xs files locally
88
+ 4. Use \`xano workspace:push ./code\` to deploy changes
89
+
90
+ **Profile selection priority:**
91
+ 1. \`-p\` flag on command
92
+ 2. \`XANO_PROFILE\` environment variable
93
+ 3. Default profile in credentials.yaml`,
94
+ related_topics: ["profile", "workspace", "integration"],
95
+ workflows: [
96
+ {
97
+ name: "Initial Setup",
98
+ description: "Set up the CLI for first use",
99
+ steps: [
100
+ "Install: `npm install -g @xano/cli`",
101
+ "Run wizard: `xano profile:wizard`",
102
+ "Enter your access token when prompted",
103
+ "Select your instance, workspace, and branch",
104
+ "Verify: `xano profile:me`"
105
+ ],
106
+ example: `npm install -g @xano/cli
107
+ xano profile:wizard
108
+ xano profile:me`
109
+ }
110
+ ]
111
+ };
@@ -0,0 +1,2 @@
1
+ import type { TopicDoc } from "../types.js";
2
+ export declare const staticHostDoc: TopicDoc;
@@ -0,0 +1,77 @@
1
+ export const staticHostDoc = {
2
+ topic: "static_host",
3
+ title: "Xano CLI - Static Hosting",
4
+ description: `Static host commands let you deploy frontend builds to Xano's static hosting infrastructure.`,
5
+ ai_hints: `**Static hosting workflow:**
6
+ 1. Build your frontend (React, Vue, etc.)
7
+ 2. Zip the build output
8
+ 3. Upload with \`static_host:build:create\`
9
+
10
+ **Use cases:**
11
+ - Deploy SPAs built with modern frameworks
12
+ - Host static documentation sites
13
+ - Serve frontend that calls your Xano APIs`,
14
+ related_topics: ["workspace"],
15
+ commands: [
16
+ {
17
+ name: "static_host:list",
18
+ description: "List all static hosts in workspace",
19
+ usage: "xano static_host:list [-w <workspace>]",
20
+ flags: [
21
+ { name: "workspace", short: "w", type: "string", required: false, description: "Workspace ID" }
22
+ ],
23
+ examples: ["xano static_host:list"]
24
+ },
25
+ {
26
+ name: "static_host:build:create",
27
+ description: "Create a new build for a static host",
28
+ usage: "xano static_host:build:create <static_host> [options]",
29
+ args: [
30
+ { name: "static_host", required: true, description: "Static host name or ID" }
31
+ ],
32
+ flags: [
33
+ { name: "file", short: "f", type: "string", required: true, description: "Path to ZIP file" },
34
+ { name: "name", short: "n", type: "string", required: true, description: "Build name/version" },
35
+ { name: "description", short: "d", type: "string", required: false, description: "Build description" },
36
+ { name: "workspace", short: "w", type: "string", required: false, description: "Workspace ID" }
37
+ ],
38
+ examples: [
39
+ "xano static_host:build:create my-app -f ./build.zip -n 'v1.0.0'",
40
+ "xano static_host:build:create my-app -f ./dist.zip -n 'v1.1.0' -d 'Bug fixes'"
41
+ ]
42
+ },
43
+ {
44
+ name: "static_host:build:list",
45
+ description: "List all builds for a static host",
46
+ usage: "xano static_host:build:list <static_host> [-w <workspace>]",
47
+ args: [
48
+ { name: "static_host", required: true, description: "Static host name or ID" }
49
+ ],
50
+ examples: ["xano static_host:build:list my-app"]
51
+ },
52
+ {
53
+ name: "static_host:build:get",
54
+ description: "Get details of a specific build",
55
+ usage: "xano static_host:build:get <static_host> <build_id>",
56
+ args: [
57
+ { name: "static_host", required: true, description: "Static host name or ID" },
58
+ { name: "build_id", required: true, description: "Build ID" }
59
+ ],
60
+ examples: ["xano static_host:build:get my-app 12345"]
61
+ }
62
+ ],
63
+ workflows: [
64
+ {
65
+ name: "Deploy Frontend",
66
+ description: "Build and deploy a frontend application",
67
+ steps: [
68
+ "Build your app: `npm run build`",
69
+ "Create ZIP: `zip -r build.zip dist/`",
70
+ "Deploy: `xano static_host:build:create my-app -f build.zip -n 'v1.0.0'`"
71
+ ],
72
+ example: `npm run build
73
+ zip -r build.zip dist/
74
+ xano static_host:build:create my-frontend -f build.zip -n 'v1.0.0' -d 'Initial release'`
75
+ }
76
+ ]
77
+ };
@@ -0,0 +1,2 @@
1
+ import type { TopicDoc } from "../types.js";
2
+ export declare const workspaceDoc: TopicDoc;