Project
Creating a project
Before adding data, a project must be initialised. This creates the database schema in a new SQLite file.
Re-running project create on an existing project is safe — it raises an
error rather than overwriting data.
Project location
By default, AIMBAT reads and writes a file called aimbat.db in the current
working directory. All four interfaces respect the same configuration, so you
only need to set it once.
Keep the project on local storage
SQLite relies on POSIX file locking, which is not reliably supported over
network filesystems (NFS, SMB, etc.). Placing the project database on a
network share can lead to database corruption. Keep aimbat.db on a local
disk.
Using a different path
Set AIMBAT_PROJECT to any file path:
Or export it for the duration of a shell session:
export AIMBAT_PROJECT=/data/my-study/project.db
aimbat project create
aimbat data add *.sac
aimbat tui
Using a .env file
Place a .env file in the directory where you run AIMBAT. Settings in .env
are loaded automatically and do not require exporting:
This is the recommended approach for persistent, per-project configuration —
commit .env alongside your scripts so the path is always consistent.
Using a full database URL
For advanced use (e.g. a remote or in-memory database), set AIMBAT_DB_URL
to a full SQLAlchemy connection URL.
When set, it takes precedence over AIMBAT_PROJECT:
In-memory databases
AIMBAT_DB_URL=sqlite+pysqlite:///:memory: creates a temporary in-memory
database that is discarded when the process exits. This is used internally
for testing.
Precedence
Configuration is resolved in this order (highest wins):
AIMBAT_DB_URLenvironment variable or.enventryAIMBAT_PROJECTenvironment variable or.enventry- Built-in default:
aimbat.dbin the current directory
To inspect the settings currently in use: