dev-env
यह क्या करती है
यह smolvm वर्चुअल मशीन सेट करती है, जो रुकने और दोबारा चालू होने के बाद भी आपके इंस्टॉल किए टूल रखती है। यह उन डेवलपर्स के लिए है जिन्हें हर बार प्रोजेक्ट पर लौटने पर वही काम करने वाला वातावरण चाहिए।
कब इस्तेमाल करें
- ✓जब किसी प्रोजेक्ट को ऐसा डेव सेटअप चाहिए जो काम के सत्रों के बीच एक जैसा रहे।
- ✓जब मशीन में इंस्टॉल किए पैकेज रीस्टार्ट के बाद गायब हो जाएँ।
- ✓जब आपको तय करना हो कि कौन-से कदम सेटअप पर एक बार और कौन-से हर शुरुआत पर चलें।
Skill का लिंक
https://github.com/smol-machines/smolvm/blob/main/docs/dev-env/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे प्रोजेक्ट के लिए डेव मशीन रखिए, ताकि आज इंस्टॉल किए पैकेज कल भी मिलें।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एक Smolfile पहली शुरुआत पर अपने सेटअप कदम चलाती है। बाद की शुरुआतों में वह सेटअप छोड़ दिया जाता है, इसलिए मशीन इंस्टॉल किए पैकेज के साथ जल्दी लौट आती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
A persistent dev machine
Verified on smolvm v1.29.0 on macOS arm64, 2026-10-15, and on v1.18.2 on Linux aarch64, 2026-09-24; the Linux runs used
the Smolfile with memory = 1024, for the host reason in "Platform arms". Done means a second start is fast, skips provisioning, and the packages installed in
the first session are still there.
The Linux runs used the scripts of their date; this version's preflight and cleanup scripts ran
on Linux aarch64 on v1.22.2 on 2026-10-03.
The whole use case turns on one fact: init runs once, not on every start, as
smolfile.md says, and as the docs site (smolmachines.com/docs) says under "When
init runs". smolvm machine create --help reads "Run command on every VM start" at v1.22.2, and
"Run command once, on the machine's first start" from v1.23.7; provisioning that relies on the old
line is missing on the second boot.
Procedure
1. Preflight.
scripts/preflight.sh
Read-only. restart_after_stop=verified on macOS and Linux. The script covers macOS and Linux
only; elsewhere it prints unknown and a note pointing at references/windows.md, where a stopped
machine starts again on v1.14.6 and v1.22.2.
2. Declare the machine. assets/dev.smolfile is a working starting point, and the one
verify-persistence.sh is written against: it asserts the app user and the /app workdir that
file sets. examples/python-app/python.smolfile and examples/node-app/node.smolfile in the
repository are plainer examples without them.
image = "python:3.12-alpine"
net = true
cpus = 2
memory = 2048
volumes = ["./src:/app"]
init = [
"sh -c \"id -un > /init-ran-as.txt\"",
"sh -c \"date +%s >> /init-count.txt\"",
"adduser -D app",
]
user = "app"
workdir = "/app"
3. Create and bring it up. Run this from the project directory: the Smolfile mounts ./src,
which is relative to the working directory, and the script creates ./src there if it is missing.
scripts/create-dev-machine.sh # name defaults to smolskill-dev
scripts/create-dev-machine.sh smolskill-myproj ./my.smolfile
It creates the machine with an explicit long-lived workload command, records the name for cleanup, starts it, waits for the workload container to answer with a value, and then reports what actually happened rather than that nothing errored:
init_ran=yes
machine_running=yes
workload_ready_after_s=0
workload_ready=yes
init_ran_as=root
exec_user=app
workdir=/app
result=up
init_ran_as=root with exec_user=app is the correct outcome, not a bug: init provisions the
machine and runs as root regardless of user, while exec and shell run as user.
4. Work in it.
smolvm machine exec --name smolskill-dev -- pip install --user requests
smolvm machine exec --name smolskill-dev --user root -- sh -c 'mkdir -p /storage/keep'
smolvm machine shell --name smolskill-dev # interactive, lands in workdir as `user`
5. Prove it is worth keeping.
scripts/verify-persistence.sh
It installs a package and records its version, seeds one file per filesystem, stops, starts, and then asserts each value against what it recorded. A version comparison is the point: an import that does not crash can be satisfied by a system copy and says nothing about your install. It leaves the machine running.
When the setup is done, smolvm machine stop --name smolskill-dev and give the user its name; the
next machine start brings it back as it was.
6. Clean up, when the machine is no longer wanted. Not at the end of a setup: the machine is the deliverable, so leave it stopped and tell the user its name.
scripts/cleanup.sh --purge
cleanup.sh waits up to 20 seconds, polling the machine list, and prints waiting=up to 20s
first: an ephemeral machine's entry retires after its run returns.
What init and user actually do, observed on v1.14.2 and again on v1.22.2
Observed, not inferred:
| question | observed |
|---|---|
when does init run? |
on the first start, not on create, and not again |
| second start | prints Init already completed, skipping N command(s) |
which user runs init? |
root, even with user = "app" set |
which user runs exec and shell? |
the Smolfile user |
| override per command | machine exec --user root works |
is there machine start --init? |
no |
What survives a stop and start
| location | surviv
अक्सर पूछे जाने वाले सवाल
रीस्टार्ट के बाद पैकेज क्यों गायब हो गया?
हर शुरुआत पर चलने पर निर्भर सेटअप कदम रीस्टार्ट के बाद छूट सकते हैं, इसलिए स्किल बताती है कि अपना संस्करण कैसे जाँचें।
क्या मुझे कोई खास कॉन्फ़िगरेशन फ़ाइल चाहिए?
हाँ। स्किल एक शुरुआती Smolfile देती है, जिसे आप अपने प्रोजेक्ट के लिए बदल सकते हैं।
क्या यह Windows पर काम करता है?
स्किल की जाँच macOS और Linux पर है। Windows पर वह पुराने संस्करणों में रुकी मशीन के व्यवहार का ज़िक्र करती है।
जानकारी
लेखक का मूल विवरण
Keeps a persistent smolvm machine with its dependencies already installed and re-enters it cheaply across sessions. Use when a project needs an isolated development environment that survives stop and start; when deciding what belongs in a Smolfile's init versus what has to run on every boot; when a package installed in a machine has vanished after a restart; or when exec answers "the container smolvm-<hash> is not running". Do not use it for untrusted code, which needs a machine that leaves nothing behind (see the throwaway-machine packet), or for running a Docker daemon inside the machine (se
repo: smol-machines/smolvm
लोकप्रियता
- GitHub स्टार
- 6.9k
- रैंकिंग में स्थान
- #13717
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
branch-and-checkpoint
6.9kयह आपके एजेंट को चल रही smolvm वर्चुअल मशीन को चेकपॉइंट के रूप में सहेजने, बाद में वापस लाने, रोकने और फिर चालू करने, और उसे कॉपी में बाँटने में मदद करती है।
coding-agent
6.9kयह आपके एजेंट को smolvm की सुरक्षित वर्चुअल मशीन के अंदर Claude Code जैसे कोडिंग एजेंट चलाने में मदद करती है, जिसमें आपका प्रोजेक्ट फ़ोल्डर माउंट होता है।
credentials
6.9kयह आपके एजेंट को आपकी key से API कॉल करने देती है, जबकि key कभी उसकी वर्चुअल मशीन के अंदर नहीं जाती, ताकि भरोसे के बाहर का कोड उसे न पढ़ सके।
docker-in-machine
6.9kयह आपके एजेंट को smolvm वर्चुअल मशीन के अंदर Docker daemon चलाने में मदद करती है, ताकि टेस्ट, बिल्ड और कंटेनर शुरू करने वाले एजेंट वहाँ काम कर सकें।
मिलती-जुलती skills
openclaw-update
394kयह आपके एजेंट को चल रहे OpenClaw Gateway को अपडेट करने में मदद करती है, इंस्टॉल के तरीके के अनुसार सही विधि चुनकर और सेशन बनाए रखकर।
diagnose-gateway
394kयह आपके एजेंट को सेटिंग्स, चैनल और पोर्ट जांचकर पता लगाने देती है कि OpenClaw Gateway क्यों फ़ेल हो रहा है, बिना कुछ बदले।
crabbox-apps
394kयह आपके एजेंट को किसी अस्थायी क्लाउड मशीन पर ऐप खोलने और चलाने देती है, फिर उसका व्यू आपके चैट के साइड पैनल में दिखाती है।