The data folder
Alter keeps all of its state in one folder, called the home. It is created readable only by you (mode 0700).
| System | Default location |
|---|---|
| macOS | ~/Library/Application Support/io.nubisco.alter |
| Linux | $XDG_DATA_HOME/io.nubisco.alter, or ~/.local/share/io.nubisco.alter when XDG_DATA_HOME is not set |
Set ALTER_HOME to use a different folder. alter status prints the one in use.
Layout
| Path | What it holds |
|---|---|
vault/ | Your notes, as plain Markdown. See the vault. |
objects/ | Content-addressed versions of your notes, conversation sessions, drafts, crash reports, and the search index (objects/index/search.db). |
ledger.jsonl | The append-only record of every change, with its effects. See Architecture. |
settings.json | Settings: connections, roles, channels. It never holds secrets. |
routines.json | Your routines. |
approvals.json | Actions waiting for your approval. |
usage.jsonl | Model usage, from which cost estimates are computed. |
alter.log | The service log. Credentials are masked. |
alter.sock | The private socket the CLI and the app use. Only you can open it. |
Secrets (model keys, Slack, Telegram and Discord tokens, source tokens) are not in this folder. They are in your system keychain. See Security model.
The vault
The vault is a folder of plain Markdown files. You can open it in any editor, including Obsidian. By default it is vault/ inside the home, and you can move it or point Alter at a folder you already have:
sh
alter vault
alter vault move ~/Documents/Alter
alter vault use ~/notesalter vault move copies every file, checks the copy, and keeps the old folder until you remove it. alter vault use adopts a folder that already holds notes (an Obsidian vault, a clone of a git repository) and brings your current notes into it without replacing anything there. You can also change it in Settings, under Vault.
Notes are never deleted. Alter archives them to archive/, and every version is kept in objects/. If another program edits a note, Alter notices, records it as "edited outside Alter", and keeps that edit revertible. Alter never overwrites an outside edit: a conflict is reported instead.
Only one process per home
Only one process may open a home at a time. That process is the single writer of the vault, the version store and the record of changes (see Architecture). Starting a second process on the same home is not supported, so do not run alter serve while the service is running. Use the CLI and the app as clients of the running process instead.
The local web UI listens on 127.0.0.1, port 7420 by default.
Environment variables
| Variable | Used by | Effect |
|---|---|---|
ALTER_HOME | Alter | The data folder. |
ALTER_UI_PORT | Alter | The port of the local UI. Default 7420. Always loopback only. |
ALTER_PREFIX | Install script | Where the CLI is installed. Default ~/.alter. |
ALTER_BIN_DIR | Install script | Where the alter symlink goes. Default ~/.local/bin. |
NO_COLOR | CLI | Plain output with no color or spinners. |
Backups
Because everything is files, a backup is a copy of the home. Stop the service first so that nothing is written during the copy:
sh
alter status # shows the data folder
alter service uninstall # or stop it with your service manager
cp -R <the folder alter status showed> ~/alter-backupIf you keep the vault outside the home (see alter vault use), back up that folder as well. A git repository works well for the vault, and the git plugin can commit and push it for you.
The keychain items are not part of the copy. After restoring on a new machine you reconnect your models and channels.
Uninstalling
If you installed with the script:
sh
alter service uninstall
rm -rf ~/.alter ~/.local/bin/alterIf you installed with Homebrew, run brew services stop alter and brew uninstall alter. For the desktop app, drag it to the trash.
Uninstalling does not touch your notes or settings. They stay in the data folder until you delete it. Delete the home yourself if you want them gone, and remove Alter's items from your keychain if you want the stored keys gone too.