.env file
at the project root. All persistent data lives in ~/.ollim-bot/, which is
automatically managed as a git repository.
Environment variables
| Variable | Required | Default | Description |
|---|---|---|---|
DISCORD_TOKEN | Yes | — | Discord bot token for authentication |
OLLIM_USER_NAME | Yes | — | Your display name, used in the system prompt and messages |
OLLIM_BOT_NAME | Yes | — | The bot’s display name |
OLLIM_TIMEZONE | No | System local | IANA timezone name (e.g. America/New_York). Used for timestamps in session history, pending updates, scheduling preambles, and Google Calendar/Gmail. Falls back to system local detection, then UTC. |
WEBHOOK_PORT | No | — | Port for the webhook HTTP server; omit to disable webhooks |
WEBHOOK_SECRET | Conditional | — | Bearer token for webhook authentication; required if WEBHOOK_PORT is set |
OLLIM_USER_NAME and OLLIM_BOT_NAME are validated at import time — the
process exits immediately if either is missing. DISCORD_TOKEN is checked
when the bot subcommand runs.
.env file
Place a .env file at the project root. Both config.py and main.py call load_dotenv() to load it.
.env
CLI subcommands (
routine, reminder, tasks, cal, gmail) do not
require DISCORD_TOKEN — it is only loaded when starting the bot.Data directory
All persistent data lives in~/.ollim-bot/. See
Data directory for the full layout,
file descriptions, and git tracking details.
Storage patterns
ollim-bot uses two storage formats with shared conventions:- Markdown files
- JSONL files
Routines, reminders, and webhooks are stored as
.md files with YAML frontmatter:routines/morning-briefing.md
- Filenames are auto-generated slugs from the message content
- The
idfield in YAML is authoritative — filenames are for human readability - Slug collisions are resolved with numeric suffixes (
-2,-3, etc.) - Writes use atomic temp-file-then-rename to prevent corruption
- Each write triggers a git commit
Google credentials
Google integration uses file-based credentials rather than environment variables.| File | Source | Description |
|---|---|---|
~/.ollim-bot/state/credentials.json | Manual — downloaded from Google Cloud Console | OAuth 2.0 client credentials |
~/.ollim-bot/state/token.json | Auto-generated on first authentication flow | OAuth refresh and access tokens |
