OptMem/install.sh
victortaelin b5041404c0 correctness pass: every printed command runs, no traceback ever reaches an agent
- the tool names itself in every command it prints. After `curl | sh`
  nothing is on PATH, so `Run: memo nap 0-1 ...` was command-not-found for
  every new user: the whole note -> merge -> nap loop died on the first turn.
- a typo in `config` stopped every command AND the recovery it named
  (`memo config`) read the same file, so nothing could fix it. It now names
  the file and the line.
- a filesystem error (read-only store, MEMORY_DIR at a file) printed a Python
  traceback. One handler reports it in the tool's own voice.
- `nap 1-2` answered 'already settled': an unaligned id read a different
  block's record. nap and forget now share one block-id parser.
- recall held the whole log in memory: 618 MB at a million memories, and a
  vague regex held every match too. One streaming pass, 16 MB.
- install.sh says so when the machine has no python3, instead of installing
  and then failing in env(1).
- anim: package.json was npm-init boilerplate; a comment named deleted blocks.py.
2026-07-26 16:34:25 -03:00

21 lines
624 B
Bash
Executable file

#!/bin/sh
# OptMem installer. Run it again to update: it only replaces the tool, and
# `memo init` never touches memories that already exist.
#
# curl -fsSL https://raw.githubusercontent.com/VictorTaelin/OptMem/main/install.sh | sh
set -e
DIR="$HOME/.optmem"
command -v python3 >/dev/null || {
echo "OptMem is one Python file, and this machine has no python3." >&2
echo "Install python3, then run this line again." >&2
exit 1
}
mkdir -p "$DIR"
curl -fsSL https://raw.githubusercontent.com/VictorTaelin/OptMem/main/memo -o "$DIR/memo.new"
mv "$DIR/memo.new" "$DIR/memo"
chmod +x "$DIR/memo"
exec "$DIR/memo" init