staticx 0.1.3 → 0.1.6
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/README.md +50 -0
- package/package.json +1 -1
- package/src/index.js +17 -1
- package/src/output.js +62 -0
package/README.md
CHANGED
|
@@ -14,11 +14,13 @@ npm install -g staticx
|
|
|
14
14
|
staticx login --base-url "https://staticx.site/api/v1" --token "STATICX_API_TOKEN"
|
|
15
15
|
staticx whoami
|
|
16
16
|
staticx guide
|
|
17
|
+
staticx mcp
|
|
17
18
|
```
|
|
18
19
|
|
|
19
20
|
`staticx login` stores the credentials locally, verifies them with `GET /user`, and prints the active user, token scope, access level, expiry, and next safe commands.
|
|
20
21
|
|
|
21
22
|
Use `staticx guide` or `staticx commands` when you want the full command map from the terminal.
|
|
23
|
+
Use `staticx mcp` when you want copy-safe MCP snippets for Claude, Cursor, Codex, Cline, Windsurf, Zed, and generic clients.
|
|
22
24
|
|
|
23
25
|
## Core commands
|
|
24
26
|
|
|
@@ -33,6 +35,7 @@ staticx deploy --site-id SITE_ID --dir dist
|
|
|
33
35
|
staticx domain --site-id SITE_ID --domain app.example.com
|
|
34
36
|
staticx domain-status --site-id SITE_ID
|
|
35
37
|
staticx logs --site-id SITE_ID
|
|
38
|
+
staticx mcp
|
|
36
39
|
```
|
|
37
40
|
|
|
38
41
|
## Custom domains
|
|
@@ -51,6 +54,27 @@ Check progress any time:
|
|
|
51
54
|
staticx domain-status --site-id SITE_ID
|
|
52
55
|
```
|
|
53
56
|
|
|
57
|
+
## Machine-readable sources
|
|
58
|
+
|
|
59
|
+
Use these when you want the same contract that the dashboard, CLI, and agents share:
|
|
60
|
+
|
|
61
|
+
- https://staticx.site/llms.txt
|
|
62
|
+
- https://staticx.site/llms-full.txt
|
|
63
|
+
- https://staticx.site/api/v1/openapi.json
|
|
64
|
+
|
|
65
|
+
## Plan limits
|
|
66
|
+
|
|
67
|
+
StaticX enforces the same limits through the dashboard, API, CLI, MCP, URL imports, and hosted forms runtime.
|
|
68
|
+
|
|
69
|
+
| Plan | Sites | Storage | Max upload | Form entries | Team seats | Rollback history |
|
|
70
|
+
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
|
|
71
|
+
| Free | 1 | 500 MB | 500 MB | 1,000 | 1 | Last 5 versions |
|
|
72
|
+
| Plus | 15 | 10 GB | 50 GB | 20,000 | 5 | Last 10 versions |
|
|
73
|
+
| Pro | 100 | 20 GB | 50 GB | 100,000 | 10 | Last 50 versions |
|
|
74
|
+
| Agency | Custom | Custom | 50 GB | Custom | Custom | Custom |
|
|
75
|
+
|
|
76
|
+
If a command receives `PLAN_QUOTA_EXCEEDED`, stop and return the exact message. Clean up files/form entries or upgrade before retrying.
|
|
77
|
+
|
|
54
78
|
## Token scopes
|
|
55
79
|
|
|
56
80
|
- Global token: account-wide access for internal operator tools.
|
|
@@ -63,9 +87,35 @@ Generate those tokens from:
|
|
|
63
87
|
- `Project Settings → Agent deploy` for Site
|
|
64
88
|
- `Workspace → Agent deploy` for Workspace
|
|
65
89
|
|
|
90
|
+
## MCP for AI agents
|
|
91
|
+
|
|
92
|
+
StaticX MCP uses the separate public package `staticx-mcp-server` and the same scoped API tokens as the CLI.
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
{
|
|
96
|
+
"mcpServers": {
|
|
97
|
+
"staticx": {
|
|
98
|
+
"command": "npx",
|
|
99
|
+
"args": ["-y", "staticx-mcp-server"],
|
|
100
|
+
"env": {
|
|
101
|
+
"STATICX_API_TOKEN": "sx_replace_with_your_token",
|
|
102
|
+
"STATICX_API_BASE_URL": "https://staticx.site/api/v1"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
For local HTTP debugging:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
STATICX_API_TOKEN=sx_replace_with_your_token npx staticx-mcp-server http
|
|
113
|
+
```
|
|
114
|
+
|
|
66
115
|
## Notes
|
|
67
116
|
|
|
68
117
|
- `staticx login` stores the base URL and bearer token locally.
|
|
69
118
|
- `staticx whoami` verifies the token with `GET /user`.
|
|
70
119
|
- `staticx deploy` zips the contents of the given build directory, uploads them, and publishes a new release. The directory must contain `index.html` or `index.htm` plus `404.html` at its root.
|
|
71
120
|
- `staticx domain` calls `POST /projects/{project}/domain` and returns the DNS record plus activation status.
|
|
121
|
+
- Golden deploy prompt: “Deploy `dist` to StaticX project `SITE_ID` using `STATICX_API_TOKEN`. Build, validate `index.html` + `404.html`, apply StaticX form rules if forms exist, zip `dist` root, upload, deploy, check logs, then return the live URL or the exact API error. If you receive `PLAN_QUOTA_EXCEEDED`, stop and return the exact quota message. Never expose the token.”
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -14,10 +14,12 @@ import {
|
|
|
14
14
|
printJson,
|
|
15
15
|
printKeyValue,
|
|
16
16
|
printLoginSuccess,
|
|
17
|
+
printMcpGuide,
|
|
17
18
|
printTable,
|
|
19
|
+
mcpGuideJson,
|
|
18
20
|
} from './output.js';
|
|
19
21
|
|
|
20
|
-
const CLI_VERSION = '0.1.
|
|
22
|
+
const CLI_VERSION = '0.1.5';
|
|
21
23
|
|
|
22
24
|
export async function run(argv) {
|
|
23
25
|
const program = new Command();
|
|
@@ -32,6 +34,7 @@ export async function run(argv) {
|
|
|
32
34
|
Common workflow:
|
|
33
35
|
staticx login --base-url "https://staticx.site/api/v1" --token "STATICX_API_TOKEN"
|
|
34
36
|
staticx guide
|
|
37
|
+
staticx mcp
|
|
35
38
|
staticx deploy --site-id SITE_ID --dir dist
|
|
36
39
|
staticx domain --site-id SITE_ID --domain app.example.com
|
|
37
40
|
|
|
@@ -53,6 +56,19 @@ Deploy rule:
|
|
|
53
56
|
printCliGuide();
|
|
54
57
|
});
|
|
55
58
|
|
|
59
|
+
program
|
|
60
|
+
.command('mcp')
|
|
61
|
+
.description('Print MCP setup snippets for Claude, Cursor, Codex, Cline, Windsurf, Zed, and generic clients.')
|
|
62
|
+
.option('--json', 'Print JSON output')
|
|
63
|
+
.action((options) => {
|
|
64
|
+
if (options.json) {
|
|
65
|
+
printJson(mcpGuideJson());
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
printMcpGuide();
|
|
70
|
+
});
|
|
71
|
+
|
|
56
72
|
program
|
|
57
73
|
.command('login')
|
|
58
74
|
.description('Store the base URL and token locally, then verify them with GET /user.')
|
package/src/output.js
CHANGED
|
@@ -104,8 +104,54 @@ export function printCliGuide() {
|
|
|
104
104
|
['staticx logs --site-id SITE_ID --limit 50', 'Read more rows.'],
|
|
105
105
|
]);
|
|
106
106
|
console.log('');
|
|
107
|
+
printCommandGroup('Machine-readable sources', [
|
|
108
|
+
['https://staticx.site/llms.txt', 'Short index for agents and crawlers.'],
|
|
109
|
+
['https://staticx.site/llms-full.txt', 'Expanded agent playbook with prompts and curl examples.'],
|
|
110
|
+
['https://staticx.site/api/v1/openapi.json', 'Canonical OpenAPI schema for the public API.'],
|
|
111
|
+
]);
|
|
112
|
+
console.log('');
|
|
107
113
|
console.log('Token scopes: use Site tokens for one-site deploys, Workspace tokens for client workspaces, and Global tokens only for broad operator workflows.');
|
|
108
114
|
console.log('Build rule: deploy folders must include index.html or index.htm and 404.html at the root.');
|
|
115
|
+
console.log('Plan limits: Free includes 1 site, 500 MB storage, 500 MB uploads, 1,000 form entries, 1 seat, and 5 rollback versions. Plus and Pro raise capacity. Agency uses custom capacity.');
|
|
116
|
+
console.log('Quota rule: stop on PLAN_QUOTA_EXCEEDED and return the exact API message before retrying.');
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function printMcpGuide() {
|
|
120
|
+
printBanner();
|
|
121
|
+
console.log('MCP setup for AI agents');
|
|
122
|
+
console.log('');
|
|
123
|
+
printCommandGroup('Install and test', [
|
|
124
|
+
['npx -y staticx-mcp-server', 'Run the stdio MCP server from any compatible client.'],
|
|
125
|
+
['STATICX_API_TOKEN=sx_xxxxx npx staticx-mcp-server http', 'Start local HTTP mode at http://localhost:3100/mcp for debugging.'],
|
|
126
|
+
]);
|
|
127
|
+
console.log('');
|
|
128
|
+
console.log('Standard MCP config');
|
|
129
|
+
console.log(JSON.stringify(mcpGuideJson().config, null, 2));
|
|
130
|
+
console.log('');
|
|
131
|
+
console.log('Use a site-scoped token for one-site deploys. Rollback and delete tools require explicit confirmation.');
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function mcpGuideJson() {
|
|
135
|
+
return {
|
|
136
|
+
package: 'staticx-mcp-server',
|
|
137
|
+
auth: 'Scoped API token through STATICX_API_TOKEN.',
|
|
138
|
+
config: {
|
|
139
|
+
mcpServers: {
|
|
140
|
+
staticx: {
|
|
141
|
+
command: 'npx',
|
|
142
|
+
args: ['-y', 'staticx-mcp-server'],
|
|
143
|
+
env: {
|
|
144
|
+
STATICX_API_TOKEN: 'sx_replace_with_your_token',
|
|
145
|
+
STATICX_API_BASE_URL: 'https://staticx.site/api/v1',
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
local_http: {
|
|
151
|
+
command: 'STATICX_API_TOKEN=sx_replace_with_your_token npx staticx-mcp-server http',
|
|
152
|
+
url: 'http://localhost:3100/mcp',
|
|
153
|
+
},
|
|
154
|
+
};
|
|
109
155
|
}
|
|
110
156
|
|
|
111
157
|
export function cliGuideJson() {
|
|
@@ -136,9 +182,25 @@ export function cliGuideJson() {
|
|
|
136
182
|
'staticx logs --site-id SITE_ID',
|
|
137
183
|
'staticx logs --site-id SITE_ID --limit 50',
|
|
138
184
|
],
|
|
185
|
+
mcp: [
|
|
186
|
+
'staticx mcp',
|
|
187
|
+
'npx -y staticx-mcp-server',
|
|
188
|
+
],
|
|
139
189
|
},
|
|
190
|
+
machine_readable: [
|
|
191
|
+
'https://staticx.site/llms.txt',
|
|
192
|
+
'https://staticx.site/llms-full.txt',
|
|
193
|
+
'https://staticx.site/api/v1/openapi.json',
|
|
194
|
+
],
|
|
140
195
|
build_rule: 'Deploy folders must include index.html or index.htm and 404.html at the root.',
|
|
141
196
|
token_scopes: 'Use Site tokens for one-site deploys, Workspace tokens for client workspaces, and Global tokens only for broad operator workflows.',
|
|
197
|
+
plan_limits: {
|
|
198
|
+
free: '1 site, 500 MB storage, 500 MB max upload, 1,000 form entries, 1 team seat, last 5 rollback versions.',
|
|
199
|
+
plus: '15 sites, 10 GB storage, 50 GB max upload, 20,000 form entries, 5 team seats, last 10 rollback versions.',
|
|
200
|
+
pro: '100 sites, 20 GB storage, 50 GB max upload, 100,000 form entries, 10 team seats, last 50 rollback versions.',
|
|
201
|
+
agency: 'Custom sites, storage, form entries, seats, and rollback history, with 50 GB max upload.',
|
|
202
|
+
},
|
|
203
|
+
quota_rule: 'Stop on PLAN_QUOTA_EXCEEDED and return the exact API message.',
|
|
142
204
|
};
|
|
143
205
|
}
|
|
144
206
|
|