feat: openclaw-style secrets (env.vars + \) and per-task model routing

- Replace python-dotenv with config.json env.vars block + \ substitution
- Add models section for per-task model routing (heartbeat, subagent, default)
- Heartbeat/subagent tasks can use different models/providers than main chat
- Remove python-dotenv from dependencies
- Update all docs to reflect new config approach
- Reorganize docs into project/ and research/ subdirectories
This commit is contained in:
2026-02-20 23:49:05 -05:00
parent 55c6767e69
commit 82c2640481
35 changed files with 2904 additions and 422 deletions

View File

@@ -1,6 +1,6 @@
<p align="center">
<img src="static/logo.jpeg" alt="Aetheel Logo" width="180" />
<h1 align="center">⚔️ Aetheel</h1>
<h1 align="center">Aetheel</h1>
<p align="center">
<strong>A personal AI assistant that lives in your chat — with persistent memory, dual runtimes, auto-failover, and zero cloud dependencies.</strong>
</p>
@@ -57,8 +57,7 @@ aetheel help # All options
git clone http://10.0.0.59:3051/tanmay/Aetheel.git
cd Aetheel
uv sync # or: pip install -r requirements.txt
cp .env.example .env # edit with your tokens
uv run python main.py # start
uv run python main.py # start (edit ~/.aetheel/config.json for tokens)
```
Everything is config-driven — no flags required. See [Configuration](#configuration).
@@ -71,13 +70,13 @@ Everything is config-driven — no flags required. See [Configuration](#configur
| Channel | Connection | Auth | Setup |
|---------|-----------|------|-------|
| Slack | Socket Mode (no public URL) | Bot + App tokens | [docs/slack-setup.md](docs/slack-setup.md) |
| Discord | Gateway (no public URL) | Bot token | [docs/discord-setup.md](docs/discord-setup.md) |
| Slack | Socket Mode (no public URL) | Bot + App tokens | [docs/project/slack-setup.md](docs/project/slack-setup.md) |
| Discord | Gateway (no public URL) | Bot token | [docs/project/discord-setup.md](docs/project/discord-setup.md) |
| Telegram | Bot API polling | Bot token | @BotFather |
| WebChat | HTTP + WebSocket on localhost | None (localhost only) | Config: `webchat.enabled: true` |
| Webhooks | HTTP POST endpoints | Bearer token | Config: `webhooks.enabled: true` |
All adapters are config-driven. Set a token in `.env` and the adapter auto-enables — no flags needed.
All adapters are config-driven. Set a token in `config.json``env.vars` and the adapter auto-enables — no flags needed.
### 🤖 Dual AI Runtimes with Live Switching
@@ -191,7 +190,7 @@ Type these as regular messages in any channel or DM. No `/` prefix needed.
| `cron list` | List scheduled jobs |
| `cron remove <id>` | Remove a job |
See [docs/commands.md](docs/commands.md) for the full reference including terminal commands.
See [docs/project/commands.md](docs/project/commands.md) for the full reference including terminal commands.
---
@@ -235,7 +234,7 @@ See [docs/commands.md](docs/commands.md) for the full reference including termin
```
aetheel/
├── main.py # Entry point, command routing, failover
├── config.py # Config loading (config.json + .env)
├── config.py # Config loading (config.json with env.vars + ${VAR})
├── cli.py # Click CLI (aetheel command)
├── install.sh # Interactive installer + setup wizard
├── adapters/
@@ -265,16 +264,18 @@ aetheel/
├── static/
│ └── chat.html # WebChat browser UI
├── docs/
│ ├── commands.md # Full command reference
│ ├── setup.md # Detailed setup guide
│ ├── security-audit.md # Security audit findings
│ ├── configuration.md # Config deep dive
│ ├── memory-system.md # Memory architecture
│ ├── features-guide.md # Feature walkthrough
│ ├── slack-setup.md # Slack app creation guide
└── discord-setup.md # Discord bot setup guide
│ ├── project/ # Aetheel documentation
│ ├── commands.md # Full command reference
│ ├── setup.md # Detailed setup guide
│ ├── configuration.md # Config deep dive
│ ├── features-guide.md # Feature walkthrough
│ ├── memory-system.md # Memory architecture
│ ├── security-audit.md # Security audit findings
│ ├── slack-setup.md # Slack app creation guide
│ │ └── discord-setup.md # Discord bot setup guide
│ └── research/ # External project research & comparisons
├── tests/ # Test suite
├── .env.example # Secrets template
├── .env.example # Legacy secrets template (migration notes)
└── pyproject.toml # Dependencies
```
@@ -282,14 +283,23 @@ aetheel/
## Configuration
All settings live in `~/.aetheel/config.json`. Secrets (tokens, API keys) live in `.env`.
All settings and secrets live in `~/.aetheel/config.json`. Secrets go in the `env.vars` block and are referenced via `${VAR}` syntax.
The install script writes both files during setup. You can also edit them from chat using `config set`.
The install script writes the config file during setup. You can also edit from chat using `config set`.
### Config File
```jsonc
{
"env": {
"vars": {
"SLACK_BOT_TOKEN": "xoxb-...",
"SLACK_APP_TOKEN": "xapp-...",
"DISCORD_BOT_TOKEN": "",
"TELEGRAM_BOT_TOKEN": "",
"ANTHROPIC_API_KEY": ""
}
},
"runtime": {
"engine": "opencode", // "opencode" or "claude"
"mode": "cli", // "cli" or "sdk"
@@ -302,39 +312,25 @@ The install script writes both files during setup. You can also edit them from c
"max_turns": 3,
"no_tools": false
},
"slack": { "enabled": true },
"telegram": { "enabled": false },
"discord": { "enabled": false, "listen_channels": [] },
"slack": { "enabled": true, "bot_token": "${SLACK_BOT_TOKEN}", "app_token": "${SLACK_APP_TOKEN}" },
"telegram": { "enabled": false, "bot_token": "${TELEGRAM_BOT_TOKEN}" },
"discord": { "enabled": false, "bot_token": "${DISCORD_BOT_TOKEN}", "listen_channels": [] },
"webchat": { "enabled": false, "port": 8080, "host": "127.0.0.1" },
"webhooks": { "enabled": false, "port": 8090, "token": "" },
"memory": { "workspace": "~/.aetheel/workspace", "db_path": "~/.aetheel/memory.db" },
"heartbeat": { "enabled": true, "default_channel": "slack" },
"models": { "heartbeat": null, "subagent": null, "default": null },
"hooks": { "enabled": true },
"mcp": { "servers": {} }
}
```
Adapters auto-enable when their token is set in `.env`, even without `enabled: true`.
### Secrets (.env)
```bash
# Slack (required for Slack adapter)
SLACK_BOT_TOKEN=xoxb-...
SLACK_APP_TOKEN=xapp-...
# Discord (required for Discord adapter)
DISCORD_BOT_TOKEN=...
# Telegram (required for Telegram adapter)
TELEGRAM_BOT_TOKEN=...
# Anthropic API key (for Claude Code runtime)
ANTHROPIC_API_KEY=sk-ant-...
```
Adapters auto-enable when their token is set in `env.vars`, even without `enabled: true`.
### Environment Variable Overrides
Process env vars override everything. Useful for CI, Docker, or systemd:
| Variable | Overrides |
|----------|-----------|
| `AETHEEL_ENGINE` | `runtime.engine` |
@@ -399,14 +395,14 @@ uv run python cli.py doctor
| Document | Description |
|----------|-------------|
| [commands.md](docs/commands.md) | Full command reference (chat + terminal) |
| [setup.md](docs/setup.md) | Detailed setup guide |
| [configuration.md](docs/configuration.md) | Config deep dive |
| [security-audit.md](docs/security-audit.md) | Security audit findings |
| [memory-system.md](docs/memory-system.md) | Memory architecture |
| [features-guide.md](docs/features-guide.md) | Feature walkthrough |
| [slack-setup.md](docs/slack-setup.md) | Slack app creation |
| [discord-setup.md](docs/discord-setup.md) | Discord bot setup |
| [commands.md](docs/project/commands.md) | Full command reference (chat + terminal) |
| [setup.md](docs/project/setup.md) | Detailed setup guide |
| [configuration.md](docs/project/configuration.md) | Config deep dive |
| [security-audit.md](docs/project/security-audit.md) | Security audit findings |
| [memory-system.md](docs/project/memory-system.md) | Memory architecture |
| [features-guide.md](docs/project/features-guide.md) | Feature walkthrough |
| [slack-setup.md](docs/project/slack-setup.md) | Slack app creation |
| [discord-setup.md](docs/project/discord-setup.md) | Discord bot setup |
---