@magpiecloud/mags 1.8.13 → 1.8.15
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 +95 -378
- package/bin/mags.js +196 -104
- package/index.js +6 -52
- package/package.json +22 -4
- package/API.md +0 -388
- package/Mags-API.postman_collection.json +0 -374
- package/QUICKSTART.md +0 -295
- package/deploy-page.sh +0 -171
- package/mags +0 -0
- package/mags.sh +0 -270
- package/nodejs/README.md +0 -197
- package/nodejs/bin/mags.js +0 -1146
- package/nodejs/index.js +0 -642
- package/nodejs/package.json +0 -42
- package/python/INTEGRATION.md +0 -800
- package/python/README.md +0 -161
- package/python/dist/magpie_mags-1.3.5-py3-none-any.whl +0 -0
- package/python/dist/magpie_mags-1.3.5.tar.gz +0 -0
- package/python/examples/demo.py +0 -181
- package/python/pyproject.toml +0 -39
- package/python/src/magpie_mags.egg-info/PKG-INFO +0 -182
- package/python/src/magpie_mags.egg-info/SOURCES.txt +0 -9
- package/python/src/magpie_mags.egg-info/dependency_links.txt +0 -1
- package/python/src/magpie_mags.egg-info/requires.txt +0 -1
- package/python/src/magpie_mags.egg-info/top_level.txt +0 -1
- package/python/src/mags/__init__.py +0 -6
- package/python/src/mags/client.py +0 -573
- package/python/test_sdk.py +0 -78
- package/skill.md +0 -153
- package/website/api.html +0 -1095
- package/website/claude-skill.html +0 -481
- package/website/cookbook/hn-marketing.html +0 -410
- package/website/cookbook/hn-marketing.sh +0 -42
- package/website/cookbook.html +0 -282
- package/website/env.js +0 -4
- package/website/index.html +0 -801
- package/website/llms.txt +0 -334
- package/website/login.html +0 -108
- package/website/mags.md +0 -210
- package/website/script.js +0 -453
- package/website/styles.css +0 -908
- package/website/tokens.html +0 -169
- package/website/usage.html +0 -185
|
@@ -1,481 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
-
<title>Mags for Claude Code - Skill Integration</title>
|
|
7
|
-
<meta
|
|
8
|
-
name="description"
|
|
9
|
-
content="Integrate the Mags skill into Claude Code for on-demand microVM script execution with persistent workspaces, SSH access, and public URLs."
|
|
10
|
-
/>
|
|
11
|
-
<meta name="api-base" content="https://api.magpiecloud.com" />
|
|
12
|
-
<meta name="auth-base" content="https://api.magpiecloud.com" />
|
|
13
|
-
<link rel="stylesheet" href="styles.css?v=6" />
|
|
14
|
-
<script src="env.js"></script>
|
|
15
|
-
</head>
|
|
16
|
-
<body>
|
|
17
|
-
<div class="backdrop"></div>
|
|
18
|
-
|
|
19
|
-
<header class="site-header">
|
|
20
|
-
<div class="container nav">
|
|
21
|
-
<div class="brand">
|
|
22
|
-
<span class="logo">Mags</span>
|
|
23
|
-
<span class="tag">Claude Code skill</span>
|
|
24
|
-
</div>
|
|
25
|
-
<nav class="nav-links">
|
|
26
|
-
<a href="index.html">Home</a>
|
|
27
|
-
<a href="index.html#quickstart">Docs</a>
|
|
28
|
-
<a href="api.html">API</a>
|
|
29
|
-
<a href="cookbook.html">Cookbook</a>
|
|
30
|
-
<a href="https://discord.gg/3avpC2nS" target="_blank" rel="noreferrer">Discord</a>
|
|
31
|
-
<a href="login.html">Login</a>
|
|
32
|
-
</nav>
|
|
33
|
-
<div class="nav-cta">
|
|
34
|
-
<a class="button ghost" href="#install">Install skill</a>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
</header>
|
|
38
|
-
|
|
39
|
-
<main>
|
|
40
|
-
<section class="hero">
|
|
41
|
-
<div class="container hero-grid">
|
|
42
|
-
<div class="hero-copy">
|
|
43
|
-
<span class="pill">Claude Code</span>
|
|
44
|
-
<h1>Run code in clean microVMs directly from Claude.</h1>
|
|
45
|
-
<p class="lead">
|
|
46
|
-
Install the Mags skill to give Claude Code the ability to execute scripts
|
|
47
|
-
in isolated microVMs. Keep workspaces between runs and use SSH or public
|
|
48
|
-
URLs when you need them.
|
|
49
|
-
</p>
|
|
50
|
-
<div class="hero-actions">
|
|
51
|
-
<a class="button" href="#install">Install skill</a>
|
|
52
|
-
<a class="button ghost" href="#examples">See examples</a>
|
|
53
|
-
</div>
|
|
54
|
-
<div class="hero-meta">
|
|
55
|
-
<span>Isolated environments for repeatable runs.</span>
|
|
56
|
-
<span>Workspaces persist files and packages between sessions.</span>
|
|
57
|
-
</div>
|
|
58
|
-
</div>
|
|
59
|
-
<div class="hero-card">
|
|
60
|
-
<div class="card-header">
|
|
61
|
-
<span>Example prompt</span>
|
|
62
|
-
<span class="chip">Claude</span>
|
|
63
|
-
</div>
|
|
64
|
-
<pre><code>/mags create a python environment
|
|
65
|
-
with numpy and pandas, then run
|
|
66
|
-
a script that generates sample data</code></pre>
|
|
67
|
-
<p class="card-note">Claude handles the API calls and shows you the results.</p>
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
70
|
-
</section>
|
|
71
|
-
|
|
72
|
-
<section class="section" id="install">
|
|
73
|
-
<div class="container">
|
|
74
|
-
<div class="section-title">
|
|
75
|
-
<p>Installation</p>
|
|
76
|
-
<h2>Add the Mags skill to Claude Code.</h2>
|
|
77
|
-
</div>
|
|
78
|
-
<div class="grid cards">
|
|
79
|
-
<article class="card" data-reveal>
|
|
80
|
-
<h3>1. Install the CLI</h3>
|
|
81
|
-
<pre><code>npm install -g @magpiecloud/mags</code></pre>
|
|
82
|
-
</article>
|
|
83
|
-
<article class="card" data-reveal>
|
|
84
|
-
<h3>2. Install the Claude skill</h3>
|
|
85
|
-
<pre><code>mags setup-claude</code></pre>
|
|
86
|
-
<p>Installs the skill to <code>~/.claude/commands/</code></p>
|
|
87
|
-
</article>
|
|
88
|
-
<article class="card" data-reveal>
|
|
89
|
-
<h3>3. Login to Magpie</h3>
|
|
90
|
-
<pre><code>mags login</code></pre>
|
|
91
|
-
<p>Opens your browser to create an API token.</p>
|
|
92
|
-
</article>
|
|
93
|
-
</div>
|
|
94
|
-
<div class="callout" style="margin-top: 1.6rem;">
|
|
95
|
-
<p>That's it! You can now use <code>/mags</code> in Claude Code.</p>
|
|
96
|
-
</div>
|
|
97
|
-
</div>
|
|
98
|
-
</section>
|
|
99
|
-
|
|
100
|
-
<section class="section">
|
|
101
|
-
<div class="container">
|
|
102
|
-
<div class="section-title">
|
|
103
|
-
<p>Features</p>
|
|
104
|
-
<h2>What the Mags skill can do.</h2>
|
|
105
|
-
</div>
|
|
106
|
-
<div class="grid cards">
|
|
107
|
-
<article class="card" data-reveal>
|
|
108
|
-
<h3>Fast execution</h3>
|
|
109
|
-
<p>Runs start in clean microVMs backed by a warm pool.</p>
|
|
110
|
-
</article>
|
|
111
|
-
<article class="card" data-reveal>
|
|
112
|
-
<h3>Persistent workspaces</h3>
|
|
113
|
-
<p>Files in <code>/root</code> persist across sessions so you can reuse packages and configs.</p>
|
|
114
|
-
</article>
|
|
115
|
-
<article class="card" data-reveal>
|
|
116
|
-
<h3>SSH access</h3>
|
|
117
|
-
<p>Get a full shell via SSH proxy. Debug interactively, explore the filesystem, run commands manually.</p>
|
|
118
|
-
</article>
|
|
119
|
-
<article class="card" data-reveal>
|
|
120
|
-
<h3>Public URLs</h3>
|
|
121
|
-
<p>Expose any port with a public URL. Perfect for testing webhooks, APIs, and web apps.</p>
|
|
122
|
-
</article>
|
|
123
|
-
<article class="card" data-reveal>
|
|
124
|
-
<h3>Full isolation</h3>
|
|
125
|
-
<p>Each run is isolated in its own microVM environment.</p>
|
|
126
|
-
</article>
|
|
127
|
-
<article class="card" data-reveal>
|
|
128
|
-
<h3>Auto sleep/wake</h3>
|
|
129
|
-
<p>Persistent VMs can sleep when idle and wake on request.</p>
|
|
130
|
-
</article>
|
|
131
|
-
<article class="card" data-reveal>
|
|
132
|
-
<h3>File upload</h3>
|
|
133
|
-
<p>Upload local files into the VM with <code>-f</code>. They appear in <code>/root/</code> before your script runs.</p>
|
|
134
|
-
</article>
|
|
135
|
-
<article class="card" data-reveal>
|
|
136
|
-
<h3>Ephemeral mode</h3>
|
|
137
|
-
<p>Use <code>-e</code> for the fastest runs — no workspace mount or S3 sync overhead.</p>
|
|
138
|
-
</article>
|
|
139
|
-
<article class="card" data-reveal>
|
|
140
|
-
<h3>Cron scheduling</h3>
|
|
141
|
-
<p>Schedule recurring jobs with standard cron expressions. Managed via <code>mags cron</code>.</p>
|
|
142
|
-
</article>
|
|
143
|
-
</div>
|
|
144
|
-
</div>
|
|
145
|
-
</section>
|
|
146
|
-
|
|
147
|
-
<section class="section" id="examples">
|
|
148
|
-
<div class="container">
|
|
149
|
-
<div class="section-title">
|
|
150
|
-
<p>Examples</p>
|
|
151
|
-
<h2>What you can ask Claude to do.</h2>
|
|
152
|
-
</div>
|
|
153
|
-
|
|
154
|
-
<div class="grid split">
|
|
155
|
-
<article class="panel" data-reveal>
|
|
156
|
-
<h3>Run a simple script</h3>
|
|
157
|
-
<pre><code>/mags echo Hello World</code></pre>
|
|
158
|
-
<p>Claude submits the job, polls for completion, and shows the output.</p>
|
|
159
|
-
</article>
|
|
160
|
-
<article class="panel" data-reveal>
|
|
161
|
-
<h3>Install packages and run code</h3>
|
|
162
|
-
<pre><code>/mags install python with requests
|
|
163
|
-
and fetch https://api.github.com</code></pre>
|
|
164
|
-
<p>Claude installs the package and runs the script in one job.</p>
|
|
165
|
-
</article>
|
|
166
|
-
</div>
|
|
167
|
-
|
|
168
|
-
<div class="grid split">
|
|
169
|
-
<article class="panel" data-reveal>
|
|
170
|
-
<h3>Create a dev environment</h3>
|
|
171
|
-
<pre><code>/mags create a node.js environment
|
|
172
|
-
with express and jest installed</code></pre>
|
|
173
|
-
<p>Claude uses a workspace so packages persist between runs.</p>
|
|
174
|
-
</article>
|
|
175
|
-
<article class="panel" data-reveal>
|
|
176
|
-
<h3>Deploy a web server</h3>
|
|
177
|
-
<pre><code>/mags run a flask server that
|
|
178
|
-
returns JSON on port 5000 and
|
|
179
|
-
give me the public URL</code></pre>
|
|
180
|
-
<p>Claude creates a persistent VM, runs the server, and enables URL access.</p>
|
|
181
|
-
</article>
|
|
182
|
-
</div>
|
|
183
|
-
|
|
184
|
-
<div class="grid split">
|
|
185
|
-
<article class="panel" data-reveal>
|
|
186
|
-
<h3>Get SSH access</h3>
|
|
187
|
-
<pre><code>/mags create a VM I can SSH into
|
|
188
|
-
with python and vim installed</code></pre>
|
|
189
|
-
<p>Claude creates the VM, enables SSH, and gives you the connection command.</p>
|
|
190
|
-
</article>
|
|
191
|
-
<article class="panel" data-reveal>
|
|
192
|
-
<h3>Run tests in isolation</h3>
|
|
193
|
-
<pre><code>/mags run the pytest tests from
|
|
194
|
-
this project in a clean environment</code></pre>
|
|
195
|
-
<p>Claude copies the relevant files and runs tests in an isolated VM.</p>
|
|
196
|
-
</article>
|
|
197
|
-
</div>
|
|
198
|
-
|
|
199
|
-
<div class="grid split">
|
|
200
|
-
<article class="panel" data-reveal>
|
|
201
|
-
<h3>Build and compile code</h3>
|
|
202
|
-
<pre><code>/mags compile this Go program
|
|
203
|
-
and show me the output</code></pre>
|
|
204
|
-
<p>Claude installs Go, compiles the code, and runs the binary.</p>
|
|
205
|
-
</article>
|
|
206
|
-
<article class="panel" data-reveal>
|
|
207
|
-
<h3>Process data files</h3>
|
|
208
|
-
<pre><code>/mags use pandas to analyze
|
|
209
|
-
this CSV and show summary stats</code></pre>
|
|
210
|
-
<p>Claude creates a Python environment, loads the data, and runs the analysis.</p>
|
|
211
|
-
</article>
|
|
212
|
-
</div>
|
|
213
|
-
|
|
214
|
-
<div class="grid split">
|
|
215
|
-
<article class="panel" data-reveal>
|
|
216
|
-
<h3>Upload files and run</h3>
|
|
217
|
-
<pre><code>/mags upload my script.py and data.csv
|
|
218
|
-
and run the analysis</code></pre>
|
|
219
|
-
<p>Claude uploads files with <code>-f</code>, they land in <code>/root/</code> before the script runs.</p>
|
|
220
|
-
</article>
|
|
221
|
-
<article class="panel" data-reveal>
|
|
222
|
-
<h3>Schedule a cron job</h3>
|
|
223
|
-
<pre><code>/mags schedule a daily backup at midnight
|
|
224
|
-
that archives /root/data to S3</code></pre>
|
|
225
|
-
<p>Claude creates a cron job with <code>mags cron add</code> and the right schedule.</p>
|
|
226
|
-
</article>
|
|
227
|
-
</div>
|
|
228
|
-
</div>
|
|
229
|
-
</section>
|
|
230
|
-
|
|
231
|
-
<section class="section">
|
|
232
|
-
<div class="container">
|
|
233
|
-
<div class="section-title">
|
|
234
|
-
<p>Advanced examples</p>
|
|
235
|
-
<h2>More complex workflows.</h2>
|
|
236
|
-
</div>
|
|
237
|
-
|
|
238
|
-
<article class="card wide" data-reveal>
|
|
239
|
-
<h3>Multi-step development workflow</h3>
|
|
240
|
-
<pre><code># Step 1: Create a workspace with dependencies
|
|
241
|
-
/mags create workspace "my-api" with python, flask, and sqlalchemy
|
|
242
|
-
|
|
243
|
-
# Step 2: Add your application code
|
|
244
|
-
/mags in workspace "my-api" create a REST API with user CRUD endpoints
|
|
245
|
-
|
|
246
|
-
# Step 3: Run with a public URL
|
|
247
|
-
/mags run the API in "my-api" on port 5000 and give me the URL
|
|
248
|
-
|
|
249
|
-
# Step 4: SSH in to debug
|
|
250
|
-
/mags give me SSH access to "my-api" so I can check the logs</code></pre>
|
|
251
|
-
<p class="card-note">Each step builds on the previous one. Files persist in the workspace.</p>
|
|
252
|
-
</article>
|
|
253
|
-
|
|
254
|
-
<article class="card wide" data-reveal>
|
|
255
|
-
<h3>Test a webhook endpoint</h3>
|
|
256
|
-
<pre><code>/mags create a server that:
|
|
257
|
-
- Listens on port 8080
|
|
258
|
-
- Logs all incoming POST requests to /webhook
|
|
259
|
-
- Returns {"status": "received"}
|
|
260
|
-
- Give me the public URL so I can test with Stripe</code></pre>
|
|
261
|
-
<p class="card-note">Great for testing webhooks from Stripe, GitHub, Slack, etc.</p>
|
|
262
|
-
</article>
|
|
263
|
-
|
|
264
|
-
<article class="card wide" data-reveal>
|
|
265
|
-
<h3>Prototype with multiple languages</h3>
|
|
266
|
-
<pre><code>/mags create a workspace called "polyglot" with:
|
|
267
|
-
- Python 3 with numpy
|
|
268
|
-
- Node.js with axios
|
|
269
|
-
- Go compiler
|
|
270
|
-
Then show me how to call a Python function from Node</code></pre>
|
|
271
|
-
<p class="card-note">Install multiple runtimes in one workspace for polyglot development.</p>
|
|
272
|
-
</article>
|
|
273
|
-
|
|
274
|
-
<article class="card wide" data-reveal>
|
|
275
|
-
<h3>Complex project: create files, upload, run</h3>
|
|
276
|
-
<pre><code># Step 1: Create your project files locally
|
|
277
|
-
/mags create an Express API server with two routes:
|
|
278
|
-
GET /health and POST /data
|
|
279
|
-
Save it as server.js
|
|
280
|
-
|
|
281
|
-
# Step 2: Upload files and install dependencies in a workspace
|
|
282
|
-
/mags upload server.js to workspace "my-api" and run npm init + npm install express
|
|
283
|
-
|
|
284
|
-
# Step 3: Start the server with a public URL
|
|
285
|
-
/mags in workspace "my-api" run node server.js on port 3000 with a URL</code></pre>
|
|
286
|
-
<p class="card-note">For complex projects, create the files first, then upload with <code>-f</code> and run in a workspace. Files land in <code>/root/</code>.</p>
|
|
287
|
-
</article>
|
|
288
|
-
|
|
289
|
-
<article class="card wide" data-reveal>
|
|
290
|
-
<h3>Cron-based monitoring</h3>
|
|
291
|
-
<pre><code>/mags create a cron job called "uptime-check" that runs every 5 minutes
|
|
292
|
-
and curls https://myapp.com/health — if it fails, write to a log file
|
|
293
|
-
Use workspace "monitors" so the log persists</code></pre>
|
|
294
|
-
<p class="card-note">Cron jobs run on a schedule in persistent workspaces. Manage with <code>mags cron list</code>.</p>
|
|
295
|
-
</article>
|
|
296
|
-
</div>
|
|
297
|
-
</section>
|
|
298
|
-
|
|
299
|
-
<section class="section">
|
|
300
|
-
<div class="container">
|
|
301
|
-
<div class="section-title">
|
|
302
|
-
<p>How it works</p>
|
|
303
|
-
<h2>What happens behind the scenes.</h2>
|
|
304
|
-
</div>
|
|
305
|
-
<div class="grid cards">
|
|
306
|
-
<article class="card" data-reveal>
|
|
307
|
-
<h3>1. Claude parses your request</h3>
|
|
308
|
-
<p>The skill instructs Claude how to translate your natural language into Mags API calls.</p>
|
|
309
|
-
</article>
|
|
310
|
-
<article class="card" data-reveal>
|
|
311
|
-
<h3>2. Job is submitted</h3>
|
|
312
|
-
<p>Claude POSTs to the Mags API with your script, workspace ID, and options.</p>
|
|
313
|
-
</article>
|
|
314
|
-
<article class="card" data-reveal>
|
|
315
|
-
<h3>3. VM boots</h3>
|
|
316
|
-
<p>A microVM is allocated from the warm pool to run your script.</p>
|
|
317
|
-
</article>
|
|
318
|
-
<article class="card" data-reveal>
|
|
319
|
-
<h3>4. Script executes</h3>
|
|
320
|
-
<p>Your code runs in Alpine Linux. The <code>/root</code> directory syncs to S3.</p>
|
|
321
|
-
</article>
|
|
322
|
-
<article class="card" data-reveal>
|
|
323
|
-
<h3>5. Claude polls for results</h3>
|
|
324
|
-
<p>The skill checks job status until completion, then fetches logs.</p>
|
|
325
|
-
</article>
|
|
326
|
-
<article class="card" data-reveal>
|
|
327
|
-
<h3>6. Output is displayed</h3>
|
|
328
|
-
<p>Claude shows you the script output, any errors, and access URLs if enabled.</p>
|
|
329
|
-
</article>
|
|
330
|
-
</div>
|
|
331
|
-
</div>
|
|
332
|
-
</section>
|
|
333
|
-
|
|
334
|
-
<section class="section">
|
|
335
|
-
<div class="container">
|
|
336
|
-
<div class="section-title">
|
|
337
|
-
<p>VM Environment</p>
|
|
338
|
-
<h2>What's available inside the VM.</h2>
|
|
339
|
-
</div>
|
|
340
|
-
<div class="grid split">
|
|
341
|
-
<article class="panel" data-reveal>
|
|
342
|
-
<h3>System details</h3>
|
|
343
|
-
<ul class="list">
|
|
344
|
-
<li><code>Alpine Linux</code><span class="desc">Lightweight base image</span></li>
|
|
345
|
-
<li><code>mags-vm</code><span class="desc">Hostname</span></li>
|
|
346
|
-
<li><code>/root</code><span class="desc">Persistent home directory</span></li>
|
|
347
|
-
<li><code>/jfs</code><span class="desc">Direct JuiceFS mount</span></li>
|
|
348
|
-
<li><code>apk</code><span class="desc">Package manager</span></li>
|
|
349
|
-
</ul>
|
|
350
|
-
</article>
|
|
351
|
-
<article class="panel" data-reveal>
|
|
352
|
-
<h3>Pre-installed tools</h3>
|
|
353
|
-
<ul class="list">
|
|
354
|
-
<li><code>curl, wget</code><span class="desc">HTTP clients</span></li>
|
|
355
|
-
<li><code>git</code><span class="desc">Version control</span></li>
|
|
356
|
-
<li><code>python3</code><span class="desc">Python interpreter</span></li>
|
|
357
|
-
<li><code>node</code><span class="desc">JavaScript runtime</span></li>
|
|
358
|
-
<li><code>vim, nano</code><span class="desc">Text editors</span></li>
|
|
359
|
-
</ul>
|
|
360
|
-
</article>
|
|
361
|
-
</div>
|
|
362
|
-
<div class="callout" style="margin-top: 1.6rem;">
|
|
363
|
-
<p><strong>Tip:</strong> Install additional packages with <code>apk add <package></code>. In a workspace, packages persist between runs.</p>
|
|
364
|
-
</div>
|
|
365
|
-
</div>
|
|
366
|
-
</section>
|
|
367
|
-
|
|
368
|
-
<section class="section">
|
|
369
|
-
<div class="container">
|
|
370
|
-
<div class="section-title">
|
|
371
|
-
<p>Complex projects</p>
|
|
372
|
-
<h2>Create files first, upload, then run.</h2>
|
|
373
|
-
</div>
|
|
374
|
-
<p style="color: var(--text-muted); margin-bottom: 1.6rem; max-width: 640px;">
|
|
375
|
-
For multi-file projects, the best workflow is: create the files locally, upload them with <code>-f</code> into a workspace, then run. This keeps your project organized and lets you iterate.
|
|
376
|
-
</p>
|
|
377
|
-
<div class="grid cards">
|
|
378
|
-
<article class="card" data-reveal>
|
|
379
|
-
<h3>1. Create files locally</h3>
|
|
380
|
-
<p>Write your scripts, configs, and data files on your machine first. Claude can help generate them.</p>
|
|
381
|
-
<pre><code># Claude writes server.js, package.json, etc.
|
|
382
|
-
# to your local project directory</code></pre>
|
|
383
|
-
</article>
|
|
384
|
-
<article class="card" data-reveal>
|
|
385
|
-
<h3>2. Upload and install deps</h3>
|
|
386
|
-
<p>Upload files with <code>-f</code> and install dependencies in a persistent workspace.</p>
|
|
387
|
-
<pre><code>mags run -w my-project \
|
|
388
|
-
-f server.js -f package.json \
|
|
389
|
-
'cp *.js *.json /root/ && \
|
|
390
|
-
cd /root && npm install'</code></pre>
|
|
391
|
-
</article>
|
|
392
|
-
<article class="card" data-reveal>
|
|
393
|
-
<h3>3. Run the project</h3>
|
|
394
|
-
<p>Execute in the same workspace. All your files and packages are still there.</p>
|
|
395
|
-
<pre><code>mags run -w my-project -p --url \
|
|
396
|
-
--port 3000 'cd /root && node server.js'</code></pre>
|
|
397
|
-
</article>
|
|
398
|
-
</div>
|
|
399
|
-
<div class="callout" style="margin-top: 1.6rem;">
|
|
400
|
-
<p><strong>Pattern:</strong> Create locally → upload with <code>-f</code> → install in workspace → run. Use <code>mags cron add</code> to schedule recurring runs.</p>
|
|
401
|
-
</div>
|
|
402
|
-
</div>
|
|
403
|
-
</section>
|
|
404
|
-
|
|
405
|
-
<section class="section">
|
|
406
|
-
<div class="container">
|
|
407
|
-
<div class="section-title">
|
|
408
|
-
<p>Tips</p>
|
|
409
|
-
<h2>Get the most out of the skill.</h2>
|
|
410
|
-
</div>
|
|
411
|
-
<div class="grid cards">
|
|
412
|
-
<article class="card" data-reveal>
|
|
413
|
-
<h3>Use workspaces for projects</h3>
|
|
414
|
-
<p>Ask Claude to use a workspace name so your files and packages persist. "Create workspace my-app with..."</p>
|
|
415
|
-
</article>
|
|
416
|
-
<article class="card" data-reveal>
|
|
417
|
-
<h3>Be specific about ports</h3>
|
|
418
|
-
<p>When running servers, tell Claude which port to use and whether you need a public URL.</p>
|
|
419
|
-
</article>
|
|
420
|
-
<article class="card" data-reveal>
|
|
421
|
-
<h3>Request SSH for debugging</h3>
|
|
422
|
-
<p>If something isn't working, ask for SSH access to investigate interactively.</p>
|
|
423
|
-
</article>
|
|
424
|
-
<article class="card" data-reveal>
|
|
425
|
-
<h3>Check logs on errors</h3>
|
|
426
|
-
<p>If a job fails, ask Claude to show you the full logs to understand what went wrong.</p>
|
|
427
|
-
</article>
|
|
428
|
-
</div>
|
|
429
|
-
</div>
|
|
430
|
-
</section>
|
|
431
|
-
|
|
432
|
-
<section class="section">
|
|
433
|
-
<div class="container">
|
|
434
|
-
<div class="section-title">
|
|
435
|
-
<p>Reference</p>
|
|
436
|
-
<h2>Skill configuration options.</h2>
|
|
437
|
-
</div>
|
|
438
|
-
<div class="grid split">
|
|
439
|
-
<article class="panel" data-reveal>
|
|
440
|
-
<h3>Environment variables</h3>
|
|
441
|
-
<ul class="list">
|
|
442
|
-
<li><code>MAGS_API_TOKEN</code><span class="desc">Your API token (required)</span></li>
|
|
443
|
-
<li><code>MAGS_API_URL</code><span class="desc">API endpoint (optional)</span></li>
|
|
444
|
-
</ul>
|
|
445
|
-
<p style="margin-top: 1rem; color: var(--text-muted);">Default API URL: <code>https://api.magpiecloud.com</code></p>
|
|
446
|
-
</article>
|
|
447
|
-
<article class="panel" data-reveal>
|
|
448
|
-
<h3>Token storage</h3>
|
|
449
|
-
<ul class="list">
|
|
450
|
-
<li><code>~/.mags/config.json</code><span class="desc">CLI config file</span></li>
|
|
451
|
-
<li><code>.env.sh</code><span class="desc">Project env file</span></li>
|
|
452
|
-
<li><code>Environment variable</code><span class="desc">Shell export</span></li>
|
|
453
|
-
</ul>
|
|
454
|
-
</article>
|
|
455
|
-
</div>
|
|
456
|
-
</div>
|
|
457
|
-
</section>
|
|
458
|
-
</main>
|
|
459
|
-
|
|
460
|
-
<footer class="site-footer">
|
|
461
|
-
<div class="container footer-grid">
|
|
462
|
-
<div>
|
|
463
|
-
<div class="brand">
|
|
464
|
-
<span class="logo">Mags</span>
|
|
465
|
-
<span class="tag">Instant sandboxes and runtime environments</span>
|
|
466
|
-
</div>
|
|
467
|
-
<p>Build, test, and run code in isolated microVMs from Claude Code.</p>
|
|
468
|
-
</div>
|
|
469
|
-
<div class="footer-links">
|
|
470
|
-
<a href="index.html">Home</a>
|
|
471
|
-
<a href="api.html">API</a>
|
|
472
|
-
<a href="cookbook.html">Cookbook</a>
|
|
473
|
-
<a href="https://discord.gg/3avpC2nS" target="_blank" rel="noreferrer">Discord</a>
|
|
474
|
-
<a href="login.html">Login</a>
|
|
475
|
-
</div>
|
|
476
|
-
</div>
|
|
477
|
-
</footer>
|
|
478
|
-
|
|
479
|
-
<script src="script.js?v=7"></script>
|
|
480
|
-
</body>
|
|
481
|
-
</html>
|