Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors
Rust
docs(backup): fix status --json flag and widen secret excludes
AkitaOnRailsb46b1d18d7c8
diff --git a/docs/backup.md b/docs/backup.mdindex 55b91f78..3022c5ae 100644--- a/docs/backup.md+++ b/docs/backup.md@@ -123,7 +123,7 @@ The wiki is already a git repository. If your only goal is off-site *wiki*storage, adding a remote and pushing is enough:```bash-data_dir=$(ai-memory status --format=json | jq -r .data_dir)+data_dir=$(ai-memory status --json | jq -r .data_dir)cd "$data_dir/wiki"git remote add origin [email protected]:<you>/ai-memory-wiki.gitgit push -u origin main@@ -163,7 +163,7 @@ cadence):1. `rsync -a --delete` the data dir into the mirror checkout, applying anexclude list for `models/`, `db/`, `logs/`, `.serve.lock`, and any glob- listed in `SECRET_EXCLUDES` (`*.env`, `auth.json`, `.secrets` by default).+ listed in `SECRET_EXCLUDES` (`*.env`, `auth.json`, `.secrets`, `*.pem`, `*.key`, `*.crt` by default).2. `rsync -a --delete` the config dir under the same exclude rules so`config.toml` is captured but env files, OAuth tokens, and private CAbundles are not.@@ -209,7 +209,7 @@ out-of-scope for v1). What that means in practice:fine-grained personal-access token scoped to the mirror repository only.Rotate on the same cadence you rotate other long-lived push credentials.- **Explicit secret exclusion.** The example script rejects any file matching- `SECRET_EXCLUDES` (`*.env`, `auth.json`, `.secrets` by default), and the+ `SECRET_EXCLUDES` (`*.env`, `auth.json`, `.secrets`, `*.pem`, `*.key`, `*.crt` by default), and thesuggested mirror-repo `.gitignore` matches the same set. Add anything elseinstall-specific — private CA bundles, host-side certificates, cloudcredential files — to both lists.diff --git a/docs/examples/backup/README.md b/docs/examples/backup/README.mdindex 5b07e327..f1ba4dac 100644--- a/docs/examples/backup/README.md+++ b/docs/examples/backup/README.md@@ -76,5 +76,5 @@ The remote is your own channel, not ai-memory's. Follow the existingprivate repository, a fine-grained token scoped to that one repo (or an SSHdeploy key), and rotate credentials the same way you rotate any otherlong-lived push credential. The script never commits files matched by-`SECRET_EXCLUDES` (default: `*.env`, `auth.json`, `.secrets`); the mirror+`SECRET_EXCLUDES` (default: `*.env`, `auth.json`, `.secrets`, `*.pem`, `*.key`, `*.crt`); the mirrorrepo's `.gitignore` catches anything the rsync exclude missed.diff --git a/docs/examples/backup/ai-memory-snapshot.sh b/docs/examples/backup/ai-memory-snapshot.shindex db3971cf..f7d7f09b 100644--- a/docs/examples/backup/ai-memory-snapshot.sh+++ b/docs/examples/backup/ai-memory-snapshot.sh@@ -28,7 +28,7 @@: "${LOG_DIR:=$HOME/logs/ai-memory-snapshot}" # rotated per run: "${TARBALL_RETENTION_DAYS:=30}" # how long to keep tarballs: "${LOG_RETENTION_DAYS:=30}" # how long to keep run logs-: "${SECRET_EXCLUDES:=*.env auth.json .secrets}" # glob patterns for files never to sync+: "${SECRET_EXCLUDES:=*.env auth.json .secrets *.pem *.key *.crt}" # glob patterns for files never to syncset -euo pipefail