Skip to content

An always-on second brain you talk to. Voice notes in Telegram → typed, linked knowledge in your Obsidian vault. Runs 24/7 on the Claude subscription you already have.

920 B
Raw Blame
[Unit]
Description=d-brain Telegram bot (drives the persistent Claude session)
After=network-online.target
Wants=network-online.target
StartLimitIntervalSec=300
StartLimitBurst=5
OnFailure=dbrain-notify@%n.service

[Service]
Type=simple
# KillMode=process: stopping/restarting the bot must NOT kill the detached
# tmux brain that lives in this unit's cgroup (the default control-group would
# take it down). The brain outlives bot restarts; ensure_session re-attaches.
KillMode=process
# A clean stop/restart exits 143 (SIGTERM); that is success, not a failure, so
# it must not trigger the OnFailure= alert.
SuccessExitStatus=143 SIGTERM
WorkingDirectory=%h/projects/dbrain
ExecStart=%h/.local/bin/uv run python -m d_brain
Restart=always
RestartSec=10
Environment=PYTHONUNBUFFERED=1
Environment=CLAUDE_CONFIG_DIR=%h/.claude
Environment=PATH=%h/.local/bin:/usr/local/bin:/usr/bin:/bin

[Install]
WantedBy=default.target