11#! /usr/bin/env bash
22# =============================================================================
3- # Mimir One-Shot Bootstrap
3+ # Perseus Vault One-Shot Bootstrap (build from source)
44# Persistent memory engine for AI agents — MCP JSON-RPC stdio server
55#
66# Usage:
7- # curl -sSL https://raw.githubusercontent.com/Perseus-Computing-LLC/mimir /main/scripts/bootstrap.sh | bash
7+ # curl -sSL https://raw.githubusercontent.com/Perseus-Computing-LLC/perseus-vault /main/scripts/bootstrap.sh | bash
88#
99# What this does:
1010# 1. Installs system dependencies (Rust toolchain via rustup, build tools)
11- # 2. Clones and builds Mimir from source (release binary)
12- # 3. Installs the binary to ~/.local/bin/mimir
11+ # 2. Clones and builds Perseus Vault from source (release binary)
12+ # 3. Installs the binary to ~/.local/bin/perseus-vault (+ mimir/mneme compat symlinks)
1313# 4. Creates the data directory and generates .env defaults
1414# 5. Verifies the installation and prints a success summary
1515#
16- # Idempotent — safe to re-run. Existing binary is only rebuilt if
17- # FORCE=1 or the repo checkout is stale.
16+ # Prefer scripts/install.sh if you just want a prebuilt binary; this script is
17+ # for building from source. Idempotent — safe to re-run. Existing binary is
18+ # only rebuilt if FORCE=1 or the repo checkout is stale.
1819# =============================================================================
1920set -euo pipefail
2021
@@ -33,18 +34,23 @@ info() { printf "${CYAN}→${NC} %s\n" "$*"; }
3334header () { printf " \n${BOLD} ══ %s ══${NC} \n" " $* " ; }
3435
3536FORCE=" ${FORCE:- 0} "
36- MIMIR_REPO=" https://github.com/Perseus-Computing-LLC/mimir.git"
37+ # Repo redirects from the historical mimir/mneme names, but use the canonical
38+ # one so the clone URL matches what users see everywhere else.
39+ VAULT_REPO=" https://github.com/Perseus-Computing-LLC/perseus-vault.git"
40+ # Script-local dirs. NOTE: MIMIR_DB_PATH is the *real* env var the binary reads
41+ # (see default_db_path() in src/main.rs), so it keeps its name for compatibility;
42+ # the default filename is the canonical perseus-vault.db.
3743MIMIR_DIR=" ${MIMIR_DIR:- $HOME / .mimir} "
3844MIMIR_BIN_DIR=" ${MIMIR_BIN_DIR:- $HOME / .local/ bin} "
3945MIMIR_DATA_DIR=" ${MIMIR_DATA_DIR:- $HOME / .mimir/ data} "
40- MIMIR_DB_PATH=" ${MIMIR_DB_PATH:- $MIMIR_DATA_DIR / mimir .db} "
46+ MIMIR_DB_PATH=" ${MIMIR_DB_PATH:- $MIMIR_DATA_DIR / perseus-vault .db} "
4147WORKSPACE=" ${WORKSPACE:- $(pwd)} "
4248
4349echo " "
4450echo " ============================================"
45- echo " Mimir One-Shot Bootstrap"
51+ echo " Perseus Vault One-Shot Bootstrap"
4652echo " Persistent memory engine for AI agents"
47- echo " github.com/Perseus-Computing-LLC/mimir "
53+ echo " github.com/Perseus-Computing-LLC/perseus-vault "
4854echo " ============================================"
4955
5056# ── Step 1: System dependencies ─────────────────────────────────────────────
98104if command -v cc & > /dev/null; then
99105 ok " C compiler: $( cc --version 2>&1 | head -1) "
100106else
101- fail " C compiler is required to build Mimir (rusqlite with bundled SQLite). Install build-essential or equivalent."
107+ fail " C compiler is required to build Perseus Vault (rusqlite with bundled SQLite). Install build-essential or equivalent."
102108fi
103109
104110# Check/install Rust
127133 fi
128134fi
129135
130- # ── Step 2: Clone / update Mimir repo ───────────────────────────────────────
131- header " Step 2: Clone & build Mimir "
136+ # ── Step 2: Clone / update repo ────── ───────────────────────────────────────
137+ header " Step 2: Clone & build Perseus Vault "
132138
133139if [ -d " $MIMIR_DIR /.git" ]; then
134140 info " Updating existing checkout at $MIMIR_DIR ..."
@@ -143,40 +149,46 @@ if [ -d "$MIMIR_DIR/.git" ]; then
143149 ok " Repo is up to date"
144150 fi
145151else
146- info " Cloning Mimir from GitHub..."
152+ info " Cloning Perseus Vault from GitHub..."
147153 rm -rf " $MIMIR_DIR "
148- git clone --depth 1 " $MIMIR_REPO " " $MIMIR_DIR "
154+ git clone --depth 1 " $VAULT_REPO " " $MIMIR_DIR "
149155fi
150156
151- # Build release binary
152- info " Building Mimir (release)..."
157+ # Build release binary. The crate/bin is named perseus-vault, so cargo emits
158+ # target/release/perseus-vault (this path was stale — it used to look for a
159+ # `mimir` binary that no longer exists, #424).
160+ info " Building Perseus Vault (release)..."
153161cd " $MIMIR_DIR "
154162cargo build --release 2>&1 | tail -5
155- BINARY=" $MIMIR_DIR /target/release/mimir "
163+ BINARY=" $MIMIR_DIR /target/release/perseus-vault "
156164
157165if [ ! -f " $BINARY " ]; then
158- fail " Build failed. Check the output above for errors."
166+ fail " Build failed (expected $BINARY ) . Check the output above for errors."
159167fi
160168ok " Binary built: $BINARY ($( du -h " $BINARY " | cut -f1) )"
161169
162170# ── Step 3: Install binary ──────────────────────────────────────────────────
163171header " Step 3: Install binary"
164172
165173mkdir -p " $MIMIR_BIN_DIR "
166- cp " $BINARY " " $MIMIR_BIN_DIR /mimir"
167- chmod +x " $MIMIR_BIN_DIR /mimir"
174+ cp " $BINARY " " $MIMIR_BIN_DIR /perseus-vault"
175+ chmod +x " $MIMIR_BIN_DIR /perseus-vault"
176+ # Backward-compatible names so existing configs referencing mimir/mneme keep
177+ # working (mirrors scripts/install.sh).
178+ ln -sf " $MIMIR_BIN_DIR /perseus-vault" " $MIMIR_BIN_DIR /mimir"
179+ ln -sf " $MIMIR_BIN_DIR /perseus-vault" " $MIMIR_BIN_DIR /mneme"
168180
169181# macOS Apple silicon: a freshly built (unsigned) binary is SIGKILLed on first
170- # run — `mimir --version` prints "Killed: 9" with no other output (#422). Apply
171- # an ad-hoc code signature so it launches. Guarded by Darwin + arm64 so it is a
172- # no-op on Intel macOS and other platforms.
182+ # run — `perseus-vault --version` prints "Killed: 9" with no other output
183+ # (#422). Apply an ad-hoc code signature so it launches. Guarded by Darwin +
184+ # arm64 so it is a no-op on Intel macOS and other platforms.
173185if [ " $( uname -s) " = " Darwin" ] && [ " $( uname -m) " = " arm64" ] && command -v codesign > /dev/null 2>&1 ; then
174186 info " Ad-hoc code-signing binary (macOS Apple silicon, #422)..."
175- if codesign --force --sign - " $MIMIR_BIN_DIR /mimir " 2> /dev/null; then
187+ if codesign --force --sign - " $MIMIR_BIN_DIR /perseus-vault " 2> /dev/null; then
176188 ok " Ad-hoc code-signed"
177189 else
178- warn " Could not code-sign. If 'mimir ' is Killed: 9, run:"
179- warn " codesign --force --sign - $MIMIR_BIN_DIR /mimir "
190+ warn " Could not code-sign. If 'perseus-vault ' is Killed: 9, run:"
191+ warn " codesign --force --sign - $MIMIR_BIN_DIR /perseus-vault "
180192 fi
181193fi
182194
@@ -186,12 +198,12 @@ case ":$PATH:" in
186198 * ) export PATH=" $MIMIR_BIN_DIR :$PATH " ;;
187199esac
188200
189- if command -v mimir & > /dev/null; then
190- MIMIR_VER =$( mimir --version 2>&1 || echo " unknown" )
191- ok " mimir installed to $MIMIR_BIN_DIR /mimir "
192- ok " Version: $MIMIR_VER "
201+ if command -v perseus-vault & > /dev/null; then
202+ VAULT_VER =$( perseus-vault --version 2>&1 || echo " unknown" )
203+ ok " perseus-vault installed to $MIMIR_BIN_DIR /perseus-vault "
204+ ok " Version: $VAULT_VER "
193205else
194- fail " mimir not found on PATH after install. Check $MIMIR_BIN_DIR "
206+ fail " perseus-vault not found on PATH after install. Check $MIMIR_BIN_DIR "
195207fi
196208
197209# ── Step 4: Create data directory ───────────────────────────────────────────
209221if [ ! -f " $MIMIR_DB_PATH " ]; then
210222 info " Warming up database at $MIMIR_DB_PATH ..."
211223 # Brief serve+kill to trigger DB creation
212- timeout 2 mimir --db " $MIMIR_DB_PATH " 2> /dev/null || true
224+ timeout 2 perseus-vault serve --db " $MIMIR_DB_PATH " 2> /dev/null || true
213225 if [ -f " $MIMIR_DB_PATH " ]; then
214226 ok " Database created: $MIMIR_DB_PATH "
215227 else
223235header " Step 5: Environment"
224236
225237ENV_FILE=" $WORKSPACE /.env"
226- MIMIR_ENV_BLOCK=" # ── Mimir ──────── ──────────────────────────────────────────────────────
238+ MIMIR_ENV_BLOCK=" # ── Perseus Vault ──────────────────────────────────────────────────────
227239# Database path (default shown)
228240MIMIR_DB_PATH=$MIMIR_DB_PATH
229241"
240252 BOOTSTRAP_DATE=$( date -u +" %Y-%m-%dT%H:%M:%SZ" 2> /dev/null || date -u)
241253 cat > " $ENV_FILE " << ENVEOF
242254# =============================================================================
243- # Mimir Environment
244- # Generated by Mimir bootstrap — ${BOOTSTRAP_DATE}
255+ # Perseus Vault Environment
256+ # Generated by Perseus Vault bootstrap — ${BOOTSTRAP_DATE}
245257# =============================================================================
246258
247259# Database path
259271header " Step 6: Verify binary"
260272
261273# Quick smoke test: start server directly, check it initializes
262- SMOKE_OUT=$( timeout 2 mimir --db " $MIMIR_DB_PATH " 2>&1 < /dev/null || true)
274+ SMOKE_OUT=$( timeout 2 perseus-vault serve --db " $MIMIR_DB_PATH " 2>&1 < /dev/null || true)
263275if echo " $SMOKE_OUT " | grep -q " MCP server ready" ; then
264276 ok " MCP server initializes correctly"
265- ok " Tools: mimir_recall, mimir_store, mimir_health "
277+ ok " Tools: perseus_vault_recall, perseus_vault_remember, perseus_vault_health "
266278else
267279 warn " MCP smoke test had issues (non-critical). Manual check:"
268- warn " Run: mimir --db $MIMIR_DB_PATH "
280+ warn " Run: perseus-vault serve --db $MIMIR_DB_PATH "
269281fi
270282
271283# ── Step 7: Success summary ─────────────────────────────────────────────────
272284header " Success Summary"
273285
274286echo " "
275- printf " ${BOLD} %-30s${NC} %s\n" " Mimir version:" " $( mimir --version 2>&1 || echo ' unknown' ) "
276- printf " ${BOLD} %-30s${NC} %s\n" " Binary:" " $MIMIR_BIN_DIR /mimir "
287+ printf " ${BOLD} %-30s${NC} %s\n" " Perseus Vault version:" " $( perseus-vault --version 2>&1 || echo ' unknown' ) "
288+ printf " ${BOLD} %-30s${NC} %s\n" " Binary:" " $MIMIR_BIN_DIR /perseus-vault "
277289printf " ${BOLD} %-30s${NC} %s\n" " Database:" " $( [ -f " $MIMIR_DB_PATH " ] && echo " ✓ $MIMIR_DB_PATH " || echo ' created on first serve' ) "
278290printf " ${BOLD} %-30s${NC} %s\n" " Data dir:" " $MIMIR_DATA_DIR "
279- printf " ${BOLD} %-30s${NC} %s\n" " MCP tools:" " mimir_recall, mimir_store, mimir_health "
291+ printf " ${BOLD} %-30s${NC} %s\n" " MCP tools:" " perseus_vault_recall, perseus_vault_remember, perseus_vault_health "
280292printf " ${BOLD} %-30s${NC} %s\n" " Cargo:" " $( cargo --version 2>&1 ) "
281293printf " ${BOLD} %-30s${NC} %s\n" " OS:" " $( uname -s) $( uname -m) "
282294printf " ${BOLD} %-30s${NC} %s\n" " .env:" " $( [ -f " $ENV_FILE " ] && echo ' ✓ exists' || echo ' ✗ missing' ) "
283295
284296echo " "
285297echo " ============================================"
286- echo " ${GREEN} Mimir bootstrap complete!${NC} "
298+ echo " ${GREEN} Perseus Vault bootstrap complete!${NC} "
287299echo " "
288300echo " Quick commands:"
289- echo " mimir --db $MIMIR_DB_PATH # Start MCP server"
290- echo " mimir --version # Show version"
301+ echo " perseus-vault serve --db $MIMIR_DB_PATH # Start MCP server"
302+ echo " perseus-vault --version # Show version"
291303echo " "
292- echo " Standalone MCP server:"
293- echo " mimir --db $MIMIR_DB_PATH "
294- echo " "
295- echo " Docs: https://github.com/Perseus-Computing-LLC/mimir"
304+ echo " Docs: https://github.com/Perseus-Computing-LLC/perseus-vault"
296305echo " ============================================"
0 commit comments