LifeBase is a git repo that doubles as a personal knowledge base, diary, daily log, therapy notebook, and AI context layer.
The basic idea is simple: keep the important parts of your life in one place, in plain files, with enough structure that an AI assistant can pick up where it left off instead of making you re-explain yourself every day.
In practice, a LifeBase usually grows into:
- evergreen files about who you are, what matters to you, what you are trying to build, and how you want to live
- daily and diary writing
- specialized logs for repetitive low-drama data like meals, symptoms, sex, or health snapshots
- prompt files that turn your repo into a persistent coaching / accountability / reflection system
- a continuity layer for Claude Code, so the AI can read your life context, not just your latest message
If you already keep notes, planning docs, therapy notes, journals, or life admin in scattered places, LifeBase is a way to make them coherent and operational.
Most AI tools are stateless by default. They are good in the moment, then forget the shape of your life.
LifeBase is for people who want more than one-off chat:
- an AI that can remember your long-running goals, habits, fears, and projects
- a place where reflective writing and mundane life tracking can coexist without collapsing into mush
- a repo you can version, back up, search, refactor, and selectively share
- a system that supports gentle life steering: check-ins, therapy continuity, planning, and long-horizon self-observation
It is especially useful if you want AI to help with:
- personal reflection
- accountability
- therapy-adjacent note keeping
- daily planning and review
- keeping continuity across months instead of across one chat session
LifeBase itself is a single Go binary, but it depends on a few other tools:
- Go 1.24.5 or newer, to install
lifebase - Claude Code, because LifeBase uses the local
claudeCLI for all reasoning ffmpegandffprobe, because audio ingestion and format conversion depend on them- an OpenAI API key, because audio transcription uses OpenAI's speech-to-text API
go install github.com/andreyvit/lifebase@latestIf lifebase is not on your PATH, make sure your Go bin directory is:
export PATH="$(go env GOPATH)/bin:$PATH"Follow Anthropic's official quickstart:
The simplest macOS / Linux install is:
curl -fsSL https://claude.ai/install.sh | bashThen start Claude Code once and log in:
claudeAnthropic currently supports logging in with a Claude subscription account such as Pro / Max / Teams / Enterprise, or with a Claude Console account. For LifeBase, a normal Claude subscription is the easiest path.
On macOS:
brew install ffmpegThat gives you both ffmpeg and ffprobe, which LifeBase needs.
The easiest starting point is a fresh Git repo.
lifebase -init will create missing files and merge the required ignore rules into your existing .gitignore.
git clone git@github.com:you/your-lifebase.git
cd your-lifebase
lifebase -initYou can also start in an empty directory:
mkdir my-lifebase
cd my-lifebase
git init
lifebase -initAfter -init, do these first:
- Rewrite
AGENTS.mdso it describes your life, not the fictional starter person. - Replace the example content under
Core/,Diary/,Daily/,Logs/, andTherapy/. - Fill in
lifebase-secrets.yaml. - Commit the initial repo and make sure it has a working upstream remote, because LifeBase auto-pushes.
LifeBase reads secrets from lifebase-secrets.yaml.
Generated by -init:
OPENAI_API_KEY: ""
TELEGRAM_BOT_TOKEN: ""
TELEGRAM_CHAT_ID: ""Create a secret API key here:
That key is only for transcription. Claude reasoning does not use OpenAI.
Claude auth is handled by the claude CLI itself, not by lifebase-secrets.yaml.
There are three main intake paths:
- one-off ingestion from the terminal
- Telegram messages and voice notes
- an automatically watched audio recorder folder
You can ingest an audio file directly:
lifebase -add /path/to/note.m4aOr ingest a plain text / markdown note:
lifebase -add /path/to/note.md
lifebase -add /path/to/note.txtWhat happens:
- Audio is transcribed with OpenAI
gpt-4o-transcribe. - If the format is unsupported, LifeBase converts it with
ffmpeg. - Long audio is chunked automatically before upload.
- The resulting text is sent to Claude Code with
Prompts/system-ingest.md. - Claude updates your repo according to
AGENTS.md. - The final reply is sent to Telegram.
Important: -add still expects Telegram to be configured, because replies are delivered there rather than printed to stdout.
Audio transcriptions are saved under Raw/ by default.
Telegram is the main interactive channel for LifeBase.
- Create a bot via @BotFather.
- Copy the bot token into
TELEGRAM_BOT_TOKEN. - Send at least one message to your bot from the account you want to use.
- Get your numeric chat ID.
- Put that numeric ID into
TELEGRAM_CHAT_ID.
The easiest way to get your personal numeric chat ID is usually @userinfobot.
Example:
TELEGRAM_BOT_TOKEN: "123456:ABCDEF..."
TELEGRAM_CHAT_ID: "123456789"Inbound Telegram intake is intentionally locked to that numeric chat ID. If you set a non-numeric value, outbound messages may work, but inbound intake is disabled for safety.
Once Telegram is configured and the daemon is running, you can:
- send text messages
- send voice notes
- use slash commands like
/morning - use built-ins like
/pause,/resume,/new,/commit, and/health
If you set audio_recorder_dir, running plain lifebase starts a daemon that polls that folder every 5 seconds and ingests new .m4a files.
Example:
audio_recorder_dir: "/absolute/path/to/your/recorder/folder"Behavior:
- only
.m4afiles are watched - files already present on initial startup are marked as seen and not backfilled
- new files are identified by basename
- successful ingestion does not delete the source file
- replies still go to Telegram
This is meant for iPhone / Mac audio recorder workflows where recordings land in a synced folder and LifeBase picks them up automatically.
LifeBase is intentionally simple, but there are a few important moving parts.
LifeBase keeps a persistent Claude Code session in state_file and reuses it across messages.
That session is rotated daily:
- the boundary is controlled by
day_boundary_hour(default:5) - if you interacted recently, the session can survive past the boundary by
agent_session_extend_if_interacted_within(default:1h) - you can force a reset from Telegram with
/new
Whenever a new Claude session starts, LifeBase runs Prompts/init.md first.
That prompt is where you define what Claude should load at session start: usually your core files, recent Diary and Daily notes, therapy notes, AI notes, and optionally generated health context.
Every incoming note goes through:
Prompts/system-ingest.mdAGENTS.md
system-ingest.md is the short operational prompt for message handling.
AGENTS.md is the long-form instruction file describing:
- how your repo is organized
- where different kinds of notes should go
- how much editing to do
- what voice and role the AI should take with you
In practice, AGENTS.md is the heart of personalization.
Before and after every Claude model run, LifeBase stages all changes, commits them, and runs git push.
That means:
- your repo should already be a Git repo
- your current branch should have a working upstream
- you should be comfortable with automatic commits
There is also a manual:
lifebase -commitIf Git is not configured correctly, ingestion can still edit files, but the commit / push step will fail.
LifeBase treats prompt files as named commands.
Rule:
- any markdown file under
Prompts/whose basename does not start withsystembecomes a prompt
In practice that means files like system-ingest.md are reserved system prompts, while everything else becomes a custom command.
Examples:
Prompts/morning.md->lifebase -proactive morningand Telegram/morningPrompts/checkin.md->lifebase -proactive checkinand Telegram/checkin
Prompt names are normalized by lowercasing and removing spaces, dashes, and underscores.
init.md is special:
- it is also used as the session bootstrap prompt
- but it still follows the same prompt-file conventions
Prompt files can include YAML-style frontmatter:
---
schedule: ["08:00", "21:30"]
---When the daemon is running, LifeBase checks prompt schedules every minute and triggers due prompts automatically.
The output of proactive prompts is appended to proactive_history_file, which defaults to:
Generated/proactive-history.md
This file exists so your prompts can read recent proactive messages and avoid repeating themselves.
LifeBase can ingest daily Apple Health exports from the Health Auto Export app.
Relevant docs:
The App Store listing currently shows paid Basic and Premium tiers. If you want to rely on automated exports, verify the current plan requirements in the app before you set this up.
In Health Auto Export:
- Grant the app access to the Apple Health data you care about.
- Open Automated Exports.
- Create a new
iCloud Driveautomation. - Choose
Health Metrics. - Choose
JSON. - Choose
Dayas the date range. - Pick an automation name, for example
LifeBaseExport. - Let it run once manually so the folder is created.
LifeBase expects a directory containing daily files named like:
HealthAutoExport-2026-03-25.json
So apple_health_export_dir should point at the local folder that contains those files.
On macOS, this is often the local iCloud mirror of the app's folder, for example something like:
~/Library/Mobile Documents/iCloud~com~ifunography~HealthExport/Documents/LifeBaseExport/
If that exact path differs on your machine, just find the directory that actually contains the HealthAutoExport-YYYY-MM-DD.json files and use that.
If apple_health_export_dir is configured:
- before a new Claude session starts, LifeBase writes current health context to
health_file health_filedefaults toGenerated/health.mdlifebase -health48prints a recent 48-hour summary for debugging
If you also keep a HealthLog log file, LifeBase can append a daily end-of-day summary there when the day rolls over.
Note: the Health Auto Export docs explicitly call out iOS limitations around background execution and locked devices. If the exports seem stale, check Background App Refresh, iCloud Drive sync, and whether the app had a chance to run while the phone was unlocked.
All paths are resolved relative to the directory containing lifebase.yaml, unless you use an absolute path.
| Key | Default | Meaning |
|---|---|---|
raw_inputs_dir |
Raw |
Where raw transcriptions and reused input notes live. |
prompts_dir |
Prompts |
Directory containing prompt files. |
state_file |
lifebase-state.json |
Persistent daemon state: seen files, prompt runs, Claude session, pending log input, etc. |
secrets_file |
lifebase-secrets.yaml |
YAML file containing the OpenAI and Telegram secrets. |
audio_recorder_dir |
empty | Optional watched folder for .m4a recordings. |
apple_health_export_dir |
empty | Optional folder containing HealthAutoExport-YYYY-MM-DD.json files. |
health_file |
Generated/health.md |
Auto-written health context file used on new Claude sessions. |
proactive_history_file |
Generated/proactive-history.md |
Rolling log of proactive outputs so prompts can avoid repetition. |
write_history |
false |
If true, write raw prompt / assistant transcripts into .history/ for debugging. |
day_boundary_hour |
5 |
Local hour treated as the LifeBase day boundary. |
agent_session_extend_if_interacted_within |
1h |
Keep the Claude session alive across the day boundary if there was recent interaction. |
When enabled, LifeBase writes prompt / reply transcripts into .history/.
This is mainly for debugging prompt behavior, not normal daily use.
lifebase -init
lifebase -add /path/to/file.m4a
lifebase -add /path/to/file.md
lifebase -proactive morning
lifebase -commit
lifebase -health48
lifebaseRunning plain lifebase starts the daemon:
- audio folder watch, if configured
- Telegram polling, if configured
- proactive scheduled prompts
Once you have:
- run
lifebase -init - rewritten
AGENTS.md - replaced the fictional starter content
- filled in
lifebase-secrets.yaml - installed Claude Code
- logged in with
claude - installed
ffmpeg - configured Git remote / upstream
you can start the daemon:
lifebaseThen send your bot a text or voice note, or drop a new .m4a into your watched recorder folder.