diff --git a/AGENTS.md b/AGENTS.md index 8cc05f9..545add0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,16 +4,20 @@ ### Prerequisites - **uv** must be installed for Python dependency management (can be installed via `pip install uv`) +- **Configuration file**: Copy `config.example.toml` to `config.toml` before running any commands: + ```bash + cp config.example.toml config.toml + ``` ### Generate Mock Database The leggen CLI provides a command to generate a mock database for testing: ```bash # Generate sample database with default settings (3 accounts, 50 transactions each) -uv run leggen generate_sample_db --database /path/to/test.db --force +uv run leggen --config config.toml generate_sample_db --database /path/to/test.db --force # Custom configuration -uv run leggen generate_sample_db --database ./test-data.db --accounts 5 --transactions 100 --force +uv run leggen --config config.toml generate_sample_db --database ./test-data.db --accounts 5 --transactions 100 --force ``` The command outputs instructions for setting the required environment variable to use the generated database. @@ -24,7 +28,15 @@ The command outputs instructions for setting the required environment variable t ```bash export LEGGEN_DATABASE_PATH=/path/to/your/generated/database.db ``` -3. Start the API server: +3. Ensure the API can find the configuration file (choose one): + ```bash + # Option 1: Copy config to the expected location + mkdir -p ~/.config/leggen && cp config.toml ~/.config/leggen/config.toml + + # Option 2: Set environment variable to current config file + export LEGGEN_CONFIG_FILE=./config.toml + ``` +4. Start the API server: ```bash uv run leggend ``` diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..26926a3 --- /dev/null +++ b/config.toml @@ -0,0 +1,30 @@ +[gocardless] +key = "your-api-key" +secret = "your-secret-key" +url = "https://bankaccountdata.gocardless.com/api/v2" + +[database] +sqlite = true + +# Optional: Background sync scheduling +[scheduler.sync] +enabled = true +hour = 3 # 3 AM +minute = 0 +# cron = "0 3 * * *" # Alternative: use cron expression + +# Optional: Discord notifications +[notifications.discord] +webhook = "https://discord.com/api/webhooks/..." +enabled = true + +# Optional: Telegram notifications +[notifications.telegram] +token = "your-bot-token" +chat_id = 12345 +enabled = true + +# Optional: Transaction filters for notifications +[filters] +case-insensitive = ["salary", "utility"] +case-sensitive = ["SpecificStore"] diff --git a/test.db b/test.db new file mode 100644 index 0000000..4fe8783 Binary files /dev/null and b/test.db differ