mirror of
https://github.com/elisiariocouto/leggen.git
synced 2025-12-13 14:52:16 +00:00
feat(docs): Add configuration file setup to agent instructions
Co-authored-by: elisiariocouto <818914+elisiariocouto@users.noreply.github.com>
This commit is contained in:
committed by
Elisiário Couto
parent
c6ac4455f8
commit
482f16c77e
18
AGENTS.md
18
AGENTS.md
@@ -4,16 +4,20 @@
|
|||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
- **uv** must be installed for Python dependency management (can be installed via `pip install uv`)
|
- **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
|
### Generate Mock Database
|
||||||
The leggen CLI provides a command to generate a mock database for testing:
|
The leggen CLI provides a command to generate a mock database for testing:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Generate sample database with default settings (3 accounts, 50 transactions each)
|
# 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
|
# 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.
|
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
|
```bash
|
||||||
export LEGGEN_DATABASE_PATH=/path/to/your/generated/database.db
|
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
|
```bash
|
||||||
uv run leggend
|
uv run leggend
|
||||||
```
|
```
|
||||||
|
|||||||
30
config.toml
Normal file
30
config.toml
Normal file
@@ -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"]
|
||||||
Reference in New Issue
Block a user