Install
- Python
- TypeScript
Local workspace example
- Python
- TypeScript
quickstart_smolfs.py
Current surface
The SDKs are intentionally thin in this early release. Prefer the lifecycle shown above and expect details to move as SmolFS settles.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
SmolVM is open source. Support the project with a star on GitHub →
Use SmolFS from Python or TypeScript when an agent runner should manage durable workspace folders from code.
uv add smolfs
npm install @celestoai/smolfs
npm install --save-dev tsx typescript @types/node
from pathlib import Path
from smolfs import SmolFS, doctor
report = doctor()
print("SmolFS home:", report["home"])
fs = SmolFS.from_env()
volume = fs.ensure_volume("demo", dev=True)
mount = fs.mount(volume.name, "./workspace")
workspace = Path(mount.mountpoint)
try:
(workspace / "hello.txt").write_text("hello from SmolFS\n")
fs.flush(volume.name)
print((workspace / "hello.txt").read_text().strip())
finally:
fs.unmount(volume.name)
python3 quickstart_smolfs.py
import { SmolFS, doctor } from "@celestoai/smolfs";
import { readFile, writeFile } from "node:fs/promises";
import { join } from "node:path";
async function main() {
const report = doctor();
console.log("SmolFS home:", report.home);
const fs = SmolFS.fromEnv();
const volume = fs.ensureVolume({ name: "demo", dev: true });
const mount = fs.mount({ name: volume.name, path: "./workspace" });
const file = join(mount.mountpoint, "hello.txt");
try {
await writeFile(file, "hello from SmolFS\n");
fs.flush(volume.name);
console.log((await readFile(file, "utf8")).trim());
} finally {
fs.unmount(volume.name);
}
}
main().catch((error) => {
console.error(error);
process.exit(1);
});
npx tsx quickstart-smolfs.ts
hello from SmolFS
| Capability | Python | TypeScript |
|---|---|---|
| Check local setup | doctor() | doctor() |
| Create a client from the environment | SmolFS.from_env() | SmolFS.fromEnv() |
| Create a new volume | init(...) | init(...) |
| Create or reuse a volume | ensure_volume(...) | ensureVolume(...) |
| Open a workspace folder | mount(...) | mount(...) |
| Save recent writes | flush(...) | flush(...) |
| Close a workspace folder | unmount(...) | unmount(...) |
| Inspect volumes | status(...) | status(...) |
Was this page helpful?
