Skip to main content

lifeos-cli

简体中文版

██╗     ██╗███████╗███████╗ ██████╗ ███████╗
██║     ██║██╔════╝██╔════╝██╔═══██╗██╔════╝
██║     ██║█████╗  █████╗  ██║   ██║███████╗
██║     ██║██╔══╝  ██╔══╝  ██║   ██║╚════██║
███████╗██║██║     ███████╗╚██████╔╝███████║
╚══════╝╚═╝╚═╝     ╚══════╝ ╚═════╝ ╚══════╝

lifeos-cli is a terminal-native, local-first LifeOS for quantified-self workflows. It gives one structured system for intentions, plans, execution, relationships, money, reflection, and measured reality.

The product surface is already broad and deep: a typed Python CLI as the primary interface, SQLite and PostgreSQL backends, Alembic migrations, a local FastAPI service, and a first-party React Web UI (in the separate lifeos-web repository) for human browser workflows over the same configured LifeOS database. The CLI is designed to be both human-usable and agent-friendly, with stable command grammar, help-first documentation, identifier-driven flows, and predictable text output.

Why It Exists

Most personal systems fragment life into disconnected tools. Tasks live in one place, calendars in another, notes somewhere else, and actual time spent disappears into scattered logs. That makes it hard to answer practical questions:

  • What did I intend to do?
  • What actually happened?
  • What did I spend time on?
  • Which routines are real versus aspirational?
  • Which people, projects, and priorities am I actually serving?
  • How do my plans, time, habits, notes, relationships, and finances connect?

lifeos-cli treats a personal operating system as both a planning graph and an evidence ledger:

  • intention: areas, visions, tasks, habits, planned events, and finance structures
  • reality: timelogs, habit actions, notes, relationship records, finance snapshots, and aggregate stats

The goal is not just storage. The goal is a coherent command and API surface that humans and agents can use to capture life as it happens, inspect it later, and automate repeatable self-management workflows.

Current Capability Map

The implemented system covers the main quantified-self loop from planning to evidence to review.

Area Current support
Life structure area records for durable life domains, with display ordering, color/icon metadata, active state, and soft deletion.
Direction vision records with status, area ownership, task trees, stats, experience points, task-effort synchronization, and harvest flow.
Execution Hierarchical task records with parent/child structure, planning-cycle fields, status updates, subtree and hierarchy views, reorder/move support, and aggregate stats.
Calendar intent Planned event records with appointment/timeblock/deadline types, all-day support, recurrence rules, instance-scoped recurring updates/deletes, task/area/person/tag links, and bounded expansion.
Daily schedule schedule day and range views that aggregate planned events, planning-cycle tasks, and habit actions, including overdue unfinished task and habit-action roll-forward behavior.
Routines habit records with daily/weekly/monthly/yearly cadence, weekday/weekend controls, task links, stats, and on-demand habit-action materialization.
Time reality timelog records with date and datetime entry modes, quick batch entry, list/search filters, relationship links, batch update/delete, templates, and area-based stats.
Notes and reflection note records with inline/stdin/file capture, search, full-content display, bulk content replacement, soft delete, and associations to tasks, visions, events, people, timelogs, and tags.
Relationships people records with relationship metadata, birthday/anniversary dates, tags, related activities, anniversaries, and links from events, notes, and timelogs.
Taxonomy tag records with category/entity-type metadata and association counts across supported resources.
Finance Assets, reusable finance trees, nodes, instant and period snapshots, exchange-rate snapshots, default tree bootstrapping, and balance-sheet/cashflow style data modeling.
Data portability Canonical JSON/JSONL export/import, full bundle backup/restore, dry-run validation, row-level errors, and machine-oriented batch update/delete.
Configuration Persistent database and preference configuration, including timezone, language, day boundary, week boundary, theme, and default vision experience rate.
Local Web API FastAPI routers for health, tasks, visions, habits, notes, timelogs, timelog templates, people, areas, finance, planned events, stats, tags, and preferences.
Web UI A first-party Vite/React workspace in lifeos-plus/lifeos-web for visions, habits, planning, timelog, finance, insights/stats, schedule/calendar, notes, people, and settings.

Interfaces

The terminal-native CLI is the primary product interface and command reference:

lifeos --help
lifeos <resource> --help
lifeos <resource> <action> --help

The command shape is intentionally stable:

lifeos <resource> <action> [arguments] [options]

This shape is intentionally friendly to both humans and agents. Humans get explicit, discoverable commands; agents get deterministic help, stable identifiers, compact tabular list output, and labeled detail output.

The local Web UI is the human browser interface for the same LifeOS data. It is first-party and intentionally local; it lives in the separate lifeos-web repository and talks to the Web API over the generated OpenAPI contract.

Getting Started

Install or upgrade from PyPI:

uv tool install --upgrade lifeos-cli

Install PostgreSQL support only when you need it:

uv tool install --upgrade "lifeos-cli[postgres]"

Install the optional local Web API runtime dependencies when you want browser or HTTP access backed by the same configured LifeOS database:

uv tool install --upgrade "lifeos-cli[web]"

lifeos-cli supports SQLite and PostgreSQL.

  • SQLite is the low-friction option for local, single-user setups.
  • PostgreSQL remains the schema-capable backend for managed deployments.

Initialize your local setup:

lifeos init

For local-first use, lifeos init can bootstrap SQLite without requiring a separate database service. Use lifeos init --help for backend-specific defaults and examples.

Inspect and adjust runtime preferences:

lifeos config show
lifeos config set preferences.timezone America/Toronto
lifeos config set preferences.language zh-Hans
lifeos config set preferences.day_starts_at 04:00
lifeos config set preferences.week_starts_on monday

Common CLI Workflows

lifeos area add "Health" --color "#16A34A" --icon heart
lifeos vision add "Build a stronger health baseline" --area-id <area-id>
lifeos task add "Train three times this week" --vision-id <vision-id> --planning-cycle-type week --planning-cycle-days 7 --planning-cycle-start-date 2026-04-13
lifeos event add "Strength training" --start-time 2026-04-13T18:00:00 --end-time 2026-04-13T19:00:00 --task-id <task-id>
lifeos schedule show --date 2026-04-13
lifeos timelog add "Workout" --start-time 2026-04-13T18:00:00 --end-time 2026-04-13T19:00:00 --task-id <task-id>
lifeos habit add "Morning mobility" --start-date 2026-04-01 --duration-days 100 --cadence-frequency daily
lifeos habit-action log --habit-id <habit-id> --date 2026-04-13 --status done
lifeos note add "Energy was higher after sleeping earlier." --task-id <task-id>
lifeos finance tree-ensure-default
lifeos data export all --output lifeos-bundle.zip

For complete CLI usage, workflows, and output conventions, see docs/cli.md. Command-specific facts belong in CLI help, not in repository-level docs.

Local Web UI

The first-party React Web UI lives in the separate lifeos-web repository and talks to this project's Web API over the generated OpenAPI contract. This repository keeps the Web API and the web serve command.

Start the local Web API server for browser or HTTP access:

lifeos web serve

lifeos web serve does not install, build, or bundle the frontend from PyPI. Build the frontend from lifeos-web and pass its output directory explicitly:

lifeos web serve --static-dir <path-to>/lifeos-web/dist

If your configured database URL uses PostgreSQL, install or run with both optional extras:

uv tool install --upgrade "lifeos-cli[web,postgres]"
uv run --extra web --extra postgres lifeos web serve

During frontend development, run the Vite app in lifeos-web and proxy API requests to the local Web API:

git clone https://github.com/lifeos-plus/lifeos-web
cd lifeos-web
npm ci
npm run dev

See the lifeos-web README for the frontend workspace and cross-repo contract policy.

Agent Use

Any agent runtime that can execute terminal commands and inspect command output can operate the same CLI. That includes Codex, OpenCode, Swival, Claude Code, Cursor, Gemini CLI, OpenClaw, or your own setup.

  • stable grammar: lifeos <resource> <action> [arguments] [options]
  • help-first command model, with --help as the primary command reference
  • identifier-driven discovery flows built around list and show
  • compact summary output for lists and labeled output for record detail views
  • entity-specific primary-key headers such as task_id, vision_id, and event_id
  • persisted language preference so agents can match human-authored payload language
  • data import/export commands for machine-generated cleanup, migration, and backup flows

Development Validation

For repository changes, run the primary validation entrypoint:

bash ./scripts/doctor.sh

For CLI documentation review, the help audit script executes the parser tree and renders a Markdown report:

uv run python scripts/audit_cli_help.py

Dependency Maintenance

Routine backend dependency version updates are checked weekly. Only semver minor version updates are included in routine automation; patch updates are intentionally excluded and major migrations remain explicit maintenance tasks. Security updates are handled independently. Pull request validation audits every locked Python extra and rejects known vulnerabilities. Frontend dependency maintenance moved to the lifeos-web repository.

See CONTRIBUTING.md for the dependency maintenance commands and workflow boundaries.

Project Policies

License

This project is licensed under the Apache License 2.0. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lifeos_cli-1.0.0.tar.gz (536.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lifeos_cli-1.0.0-py3-none-any.whl (386.9 kB view details)

Uploaded Python 3

File details

Details for the file lifeos_cli-1.0.0.tar.gz.

File metadata

  • Download URL: lifeos_cli-1.0.0.tar.gz
  • Upload date:
  • Size: 536.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for lifeos_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8b1fd32594940355e689074c5dfa604e5ab997876a785685392acda482452c0e
MD5 a1b1346be8c83bd188caf83bc0c90772
BLAKE2b-256 f62a0e8b2c09ff14ae9cd28dc99c1be71b75d9c8abbb1dcf30d5e750f663e404

See more details on using hashes here.

Provenance

The following attestation bundles were made for lifeos_cli-1.0.0.tar.gz:

Publisher: publish.yml on lifeos-plus/lifeos-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lifeos_cli-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: lifeos_cli-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 386.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for lifeos_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b69bc7bb400bc767329a37e3a680357492fb152f8adbfbfbeb836481978e1385
MD5 b485c408e83c62e71206640fe5d16aac
BLAKE2b-256 3af0af2a373445984e2d1e28350230ee8c32ee5b3909c04d06911c4994202e54

See more details on using hashes here.

Provenance

The following attestation bundles were made for lifeos_cli-1.0.0-py3-none-any.whl:

Publisher: publish.yml on lifeos-plus/lifeos-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.3.8

2 files

1.3.7

2 files

1.3.6

2 files

1.3.5

2 files

1.3.4

2 files

1.3.3

2 files

1.3.2

2 files

1.3.1

2 files

1.3.0

2 files

1.2.1

2 files

1.2.0

2 files

1.1.4

2 files

1.1.3

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.2

2 files

1.0.1

2 files

This release

1.0.0 This release

2 files

0.21.1

2 files

0.21.0

2 files

0.20.0

2 files

0.19.0

2 files

0.18.0

2 files

0.17.0

2 files

0.16.0

2 files

0.15.0

2 files

0.14.0

2 files

0.13.0

2 files

0.12.0

2 files

0.11.2

2 files

0.11.0

2 files

0.10.0

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.8.0

2 files

0.7.1

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page