.env file
at the project root. All persistent data lives in ~/.ollim-bot/, which is
automatically managed as a git repository — ollim-bot auto-commits changes on
each write.
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. |
OLLIM_DATA_DIR | No | ~/.ollim-bot | Override the data directory. Must be set as a shell env var — storage.py is imported before load_dotenv(), so values in .env are ignored. Useful for running a second instance side-by-side. |
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 |
.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.Runtime configuration
In addition to environment variables, ollim-bot has persistent runtime settings you configure via the/config
slash command. ollim-bot stores these in
~/.ollim-bot/state/config.json, and they survive bot restarts.
| Key | Type | Default | Valid values | Description |
|---|---|---|---|---|
model.main | model | SDK default | opus / sonnet / haiku / default | Default model for the main session |
model.fork | model | Inherits from main | opus / sonnet / haiku / default | Default model for interactive forks |
thinking.main | thinking mode | off | off / adaptive / <budget> | Extended thinking for the main session |
thinking.fork | thinking mode | adaptive | off / adaptive / <budget> | Extended thinking for interactive forks |
bg_fork_timeout | integer | 1800 | Any integer | Max background fork runtime (seconds) |
fork_idle_timeout | integer | 10 | Any integer | Interactive fork idle timeout (minutes) |
permission_mode | permission mode | dontAsk | dontAsk / default / acceptEdits / bypassPermissions | Default permission mode |
auto_update | boolean | off | on / off | Auto-pull, upgrade tool install, and restart when a new v* tag is published |
auto_update_interval | integer | 60 | Any integer | Update check interval (minutes) |
auto_update_hour | hour (0-23) | 6 | 0-23 | Hour of day to apply updates |
google_calendars | string | primary | Comma-separated calendar IDs | Calendars queried by ollim-bot cal. First entry is the default for write operations. |
google_task_list | string | @default | Google Tasks list ID | Task list used by ollim-bot tasks |
Update detection is semver-tag based — the bot fetches tags from
origin and compares the current version to the latest v* tag by version sort (git tag -l "v*" --sort=-version:refname). Untagged commits on main do not trigger auto-updates; releases only ship on a new v* tag. Use /version to see the currently running version.Runtime config is separate from environment variables — env vars require a
restart, while
/config changes take effect immediately. Use env vars for
credentials and infrastructure, /config for preferences.The
/config slash command’s dropdown only exposes a subset of keys for
quick edits. google_calendars and google_task_list are not in the
dropdown — edit ~/.ollim-bot/state/config.json directly to change
them. Run /config with no parameters to see every key’s current
value.Tool policy
You can extend or override the default tool sets by creating atool-policy.yaml file in ~/.ollim-bot/. This is useful for granting
the agent access to additional tools without editing source code.
~/.ollim-bot/tool-policy.yaml
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, webhooks, and skills 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 after /google-auth | OAuth refresh and access tokens |
/google-auth again. See
Google integration setup for the full
credential setup process.
Next steps
Data directory
Detailed layout of the ~/.ollim-bot/ directory.
File formats
YAML frontmatter specs for routines, reminders, webhooks, and skills.
Self-host ollim-bot
Running your own instance of ollim-bot.
Quickstart
Install ollim-bot and create a Discord bot.
