Reference / Directories and data
Application data layout
What AlphaAvatar keeps on a machine sits under three roots: the application home, the application cache and one Avatar workspace per Avatar. Unless configured otherwise, the cache and the workspaces are inside the application home. This page says how each root is chosen, what the application home holds, and which directories are created on demand or reserved; the Avatar workspace and models and cache pages describe the other two roots.
The Linux package's program files are not under any of them: the installer puts them in
~/.local/lib/alphaavatar and the alphaavatar command in ~/.local/bin. Upgrading writes
nothing in the application home, and cleanup never removes the home or its cache
(setup, upgrade, cleanup).
Three roots
| Root | Holds | Set with | Default |
|---|---|---|---|
| Application home | Bundles, profiles, settings and stored credentials; by default the cache and the Avatar workspaces | application.home, or ALPHAAVATAR_HOME | Per platform, below |
| Application cache | Downloaded model files | application.cache_root in YAML | <application-home>/cache/ |
| Avatar workspace | One Avatar's users, memories, sessions, logs and temporary files | avatar.workspace_root in YAML | <application-home>/avatars/<avatar_key>/ |
Every path must be absolute, without ..; a relative path or a literal ~ in YAML is rejected.
application takes only home and cache_root. Changing a root moves nothing: point it at the
existing directory, or copy the data there first. Host rejects the former settings
avatar.work_dir, AVATAR_WORK_DIR and ALPHAAVATAR_MODEL_CACHE.
Choose the application home
The home is, in this order:
application.homegiven as a configuration override on the command line, or set in a configuration file that a command loads;ALPHAAVATAR_HOMEfrom the environment, or from the.envfile thatENV_FILEnames when the environment's is unset or empty;- the service account's platform data directory:
| Platform | Default application home |
|---|---|
| Linux | $XDG_DATA_HOME/alphaavatar/, or ~/.local/share/alphaavatar/ |
| macOS | ~/Library/Application Support/AlphaAvatar/ |
| Windows | %LOCALAPPDATA%/AlphaAvatar/, or ~/AppData/Local/AlphaAvatar/ |
Settings never choose the home. A named bundle belongs to the home that stores it: if the bundle
sets application.home, it must name that same home. See
choosing a configuration.
What the application home holds
<name>, <id> and <avatar_key> stand for real names: a bundle or profile name, a random
identifier, and the filesystem-safe form of the Avatar ID.
- Bundles and profiles are written by
alphaavatar config initandalphaavatar setup, and can be edited by hand; config describes them. - Settings:
settings.yamlnames the default bundle and the stored credentials file;config initand setup write it. A credentials file exists only once you agreed in setup to store what you typed; credentials says where else a command finds them. - The Host (host):
management.jsonholds its identity and the devices paired with it, each with its token's hash;run/holds the lock one running Host takes and the file naming its local socket, removed when it stops. The lock file stays. - The cache keeps model files under
models/; it can be cleared and downloaded again, unlike the rest of the home. Models and cache covers moving, reusing and clearing it. - Avatar workspaces hold private data that cannot be downloaded again; see Avatar workspace.
Created on demand, and reserved
start and dev create every directory in the tree above, and the Avatar workspace's own
directories, before Host starts; config init and setup create what they write. Files appear
only when something writes them: an empty models/ means no model has been downloaded yet, and an
existing directory is no evidence that a feature has run.
Reserved directories are created but not used by this version: downloads/, providers/,
diagnostics/ and avatars/ in the cache. The workspace has its own reserved directories, listed
in its layout. Do not put other files in them.
Back up
Stop Host first. Keep the home's configs/ and settings/ together with the workspaces you
need, and protect the credentials file like any other secret. The cache needs no backup: what it
holds can be downloaded again.
Edits target dev/v0.7.0. Published snapshots do not change.