Skip to content

Commit 2382155

Browse files
committed
chore: rename msbox to micro-pi and symlink fd for pi
1 parent 807e0de commit 2382155

5 files changed

Lines changed: 15 additions & 13 deletions

File tree

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# msbox
1+
# micro-pi
22

33
Run [Pi Coding Agent](https://github.com/mariozechner/pi-coding-agent) inside a [microsandbox](https://github.com/superradcompany/microsandbox) VM.
44

@@ -26,14 +26,16 @@ bun run reset
2626
bun run check
2727
```
2828

29-
On first run, msbox:
29+
On first run, micro-pi:
3030

3131
1. Installs the microsandbox runtime (`~/.microsandbox/`)
3232
2. Creates a VM from `node:24-slim` (2 CPUs, 2 GiB RAM)
3333
3. Upgrades glibc from Debian trixie (required by [rtk](https://github.com/rtk-ai/rtk))
34-
4. Generates `en_US.UTF-8` locale
35-
5. Installs git, ripgrep, fd-find, ca-certificates, curl, locales, rtk, and pi coding agent inside the VM
36-
6. Copies your `~/.pi/agent/` config (settings, extensions, skills, themes, etc.) into the VM — symlinks are dereferenced
34+
4. Installs git, ripgrep, fd-find, ca-certificates, curl, locales inside the VM
35+
5. Symlinks `fdfind``/.pi/agent/bin/fd` (so Pi finds `fd` without downloading it)
36+
6. Generates `en_US.UTF-8` locale
37+
7. Installs [rtk](https://github.com/rtk-ai/rtk) and pi coding agent inside the VM
38+
8. Copies your `~/.pi/agent/` config (settings, extensions, skills, themes, etc.) into the VM — symlinks are dereferenced
3739

3840
Subsequent runs reconnect to the existing sandbox (starts it if stopped). Pi config changes on the host require a `bun run reset` to take effect inside the VM.
3941

bun.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"name": "msbox",
2+
"name": "micro-pi",
33
"version": "0.1.0",
44
"description": "Run Pi Coding Agent in microsandbox",
55
"type": "module",
66
"main": "src/index.ts",
77
"bin": {
8-
"msbox": "src/index.ts"
8+
"micro-pi": "src/index.ts"
99
},
1010
"scripts": {
1111
"start": "bun run src/index.ts",

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ async function main(): Promise<void> {
218218

219219
console.info("Installing packages...")
220220
const setupResult = await sb.shell(
221-
"apt-get update && apt-get install -y git ca-certificates curl fd-find ripgrep locales && sed -i 's/^# *en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen en_US.UTF-8 && update-locale LANG=en_US.UTF-8",
221+
"apt-get update && apt-get install -y git ca-certificates curl fd-find ripgrep locales && mkdir -p /.pi/agent/bin && ln -sf /usr/bin/fdfind /.pi/agent/bin/fd && sed -i 's/^# *en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen en_US.UTF-8 && update-locale LANG=en_US.UTF-8",
222222
)
223223
if (!setupResult.success) {
224224
console.error("Failed to install packages:")

test/index.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ describe("buildPiPatches", () => {
119119
})
120120

121121
it("creates guest .pi and .pi/agent dirs", () => {
122-
const tmp = mkdtempSync(join(tmpdir(), "msbox-test-"))
122+
const tmp = mkdtempSync(join(tmpdir(), "micro-pi-test-"))
123123
mkdirSync(join(tmp, ".pi/agent"), { recursive: true })
124124
writeFileSync(join(tmp, ".pi/agent/settings.json"), "{}")
125125
const patches = buildPiPatches(tmp)
@@ -130,7 +130,7 @@ describe("buildPiPatches", () => {
130130
})
131131

132132
it("dereferences symlinks", () => {
133-
const tmp = mkdtempSync(join(tmpdir(), "msbox-test-"))
133+
const tmp = mkdtempSync(join(tmpdir(), "micro-pi-test-"))
134134
mkdirSync(join(tmp, ".pi/agent"), { recursive: true })
135135
mkdirSync(join(tmp, "real-config"), { recursive: true })
136136
writeFileSync(join(tmp, "real-config/settings.json"), '{"key": true}')
@@ -145,7 +145,7 @@ describe("buildPiPatches", () => {
145145
})
146146

147147
it("copies directories", () => {
148-
const tmp = mkdtempSync(join(tmpdir(), "msbox-test-"))
148+
const tmp = mkdtempSync(join(tmpdir(), "micro-pi-test-"))
149149
mkdirSync(join(tmp, ".pi/agent/skills/my-skill"), { recursive: true })
150150
writeFileSync(
151151
join(tmp, ".pi/agent/skills/my-skill/instructions.md"),
@@ -158,7 +158,7 @@ describe("buildPiPatches", () => {
158158
})
159159

160160
it("excludes OS-specific entries", () => {
161-
const tmp = mkdtempSync(join(tmpdir(), "msbox-test-"))
161+
const tmp = mkdtempSync(join(tmpdir(), "micro-pi-test-"))
162162
mkdirSync(join(tmp, ".pi/agent/sessions"), { recursive: true })
163163
mkdirSync(join(tmp, ".pi/agent/git"), { recursive: true })
164164
writeFileSync(join(tmp, ".pi/agent/mcp-cache.json"), "{}")

0 commit comments

Comments
 (0)