mirror of
https://github.com/robcholz/vibebox.git
synced 2026-07-02 12:25:29 +02:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ad8fb139de | |||
| 5e008c9471 | |||
| 935e0cd566 | |||
| c53a6eff51 | |||
| 4dd9c31f74 |
@@ -54,3 +54,15 @@ jobs:
|
|||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
- name: cargo build
|
- name: cargo build
|
||||||
run: cargo build --locked
|
run: cargo build --locked
|
||||||
|
|
||||||
|
test:
|
||||||
|
name: Test
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
- name: Install Rust
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
- name: Cache Rust
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
- name: cargo test
|
||||||
|
run: cargo test --locked
|
||||||
|
|||||||
Generated
+1
-1
@@ -1238,7 +1238,7 @@ checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vibebox"
|
name = "vibebox"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"block2",
|
"block2",
|
||||||
"clap",
|
"clap",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "vibebox"
|
name = "vibebox"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
authors = ["Finn Sheng"]
|
authors = ["Finn Sheng"]
|
||||||
description = "Ultrafast CLI on Apple Silicon macOS for fast, sandboxed development and LLM agents."
|
description = "Ultrafast CLI on Apple Silicon macOS for fast, sandboxed development and LLM agents."
|
||||||
|
|||||||
+4
-1
@@ -67,7 +67,10 @@ fn default_auto_shutdown_ms() -> u64 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn default_mounts() -> Vec<String> {
|
fn default_mounts() -> Vec<String> {
|
||||||
Vec::new()
|
vec![
|
||||||
|
"~/.codex:~/.codex:read-write".into(),
|
||||||
|
"~/.claude:~/.claude:read-write".into(),
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
fn default_disk_gb() -> u64 {
|
fn default_disk_gb() -> u64 {
|
||||||
|
|||||||
@@ -43,6 +43,11 @@ systemctl restart ssh
|
|||||||
# Set this env var so claude doesn't complain about running as root.'
|
# Set this env var so claude doesn't complain about running as root.'
|
||||||
echo "export IS_SANDBOX=1" >> .bashrc
|
echo "export IS_SANDBOX=1" >> .bashrc
|
||||||
|
|
||||||
|
# Ensure cloned instances generate unique machine-id on first boot.
|
||||||
|
truncate -s 0 /etc/machine-id
|
||||||
|
rm -f /var/lib/dbus/machine-id
|
||||||
|
ln -sf /etc/machine-id /var/lib/dbus/machine-id
|
||||||
|
|
||||||
# Shutdown the VM when you logout
|
# Shutdown the VM when you logout
|
||||||
cat > .bash_logout <<EOF
|
cat > .bash_logout <<EOF
|
||||||
systemctl poweroff
|
systemctl poweroff
|
||||||
|
|||||||
+34
-13
@@ -88,16 +88,22 @@ fi
|
|||||||
|
|
||||||
# Install Mise
|
# Install Mise
|
||||||
MISE_BIN="${USER_HOME}/.local/bin/mise"
|
MISE_BIN="${USER_HOME}/.local/bin/mise"
|
||||||
if [ ! -x "$MISE_BIN" ] && ! command -v mise >/dev/null 2>&1; then
|
mise_warn() { echo "[mise] $*" >&2; }
|
||||||
curl https://mise.run | HOME="$USER_HOME" sh
|
mise_ok() { command -v mise >/dev/null 2>&1 || [ -x "$MISE_BIN" ]; }
|
||||||
fi
|
mise_install() {
|
||||||
echo 'eval "$(~/.local/bin/mise activate bash)"' >> "${USER_HOME}/.bashrc"
|
if [ ! -x "$MISE_BIN" ] && ! command -v mise >/dev/null 2>&1; then
|
||||||
|
if ! curl https://mise.run | HOME="$USER_HOME" sh; then
|
||||||
|
mise_warn "mise install script failed (continuing)"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo 'eval "$(~/.local/bin/mise activate bash)"' >> "${USER_HOME}/.bashrc"
|
||||||
|
|
||||||
export PATH="${USER_HOME}/.local/bin:/usr/local/bin:$PATH"
|
export PATH="${USER_HOME}/.local/bin:/usr/local/bin:$PATH"
|
||||||
|
|
||||||
mkdir -p "${USER_HOME}/.config/mise"
|
mkdir -p "${USER_HOME}/.config/mise"
|
||||||
|
|
||||||
cat > "${USER_HOME}/.config/mise/config.toml" <<MISE
|
cat > "${USER_HOME}/.config/mise/config.toml" <<MISE
|
||||||
[settings]
|
[settings]
|
||||||
# Always use the venv created by uv, if available in directory
|
# Always use the venv created by uv, if available in directory
|
||||||
python.uv_venv_auto = true
|
python.uv_venv_auto = true
|
||||||
@@ -111,12 +117,21 @@ cat > "${USER_HOME}/.config/mise/config.toml" <<MISE
|
|||||||
"npm:@anthropic-ai/claude-code" = "latest"
|
"npm:@anthropic-ai/claude-code" = "latest"
|
||||||
MISE
|
MISE
|
||||||
|
|
||||||
touch "${USER_HOME}/.config/mise/mise.lock"
|
touch "${USER_HOME}/.config/mise/mise.lock"
|
||||||
if [ -x "$MISE_BIN" ]; then
|
if [ -x "$MISE_BIN" ]; then
|
||||||
HOME="$USER_HOME" "$MISE_BIN" install
|
if ! HOME="$USER_HOME" "$MISE_BIN" install; then
|
||||||
else
|
mise_warn "mise install failed (continuing)"
|
||||||
HOME="$USER_HOME" mise install
|
return 0
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
if ! HOME="$USER_HOME" mise install; then
|
||||||
|
mise_warn "mise install failed (continuing)"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
mise_install || true
|
||||||
|
|
||||||
# 3) start ssh (don't swallow failures)
|
# 3) start ssh (don't swallow failures)
|
||||||
# If ssh is already active, don't force start/restart.
|
# If ssh is already active, don't force start/restart.
|
||||||
@@ -184,5 +199,11 @@ if ! listens_ok; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ip a
|
||||||
|
ip link
|
||||||
|
curl -s https://api.ipify.org ; echo
|
||||||
|
|
||||||
|
cat /etc/machine-id
|
||||||
|
|
||||||
echo VIBEBOX_SSH_READY
|
echo VIBEBOX_SSH_READY
|
||||||
echo "VIBEBOX_IPV4=$ip"
|
echo "VIBEBOX_IPV4=$ip"
|
||||||
|
|||||||
Reference in New Issue
Block a user