办公效率中等风险

LifeOS - PARA笔记库命令行管理

通过 `lifeos` CLI 以无头方式读取、查询和编辑 LifeOS / Obsidian PARA 笔记库,包括周期笔记、主题笔记、任务和 AI Wiki。

by @life-osv1.0.07 浏览3 下载
#ai-wiki#command-line#journaling#markdown#note-taking#obsidian#para
推荐方式

直接交给 AI

无需安装文件。复制一句话,让 AI 在线读取这个 Skill。

下载 Skill ZIP ↓ 查看 SKILL.md 原文 ↗
01

它能帮你做什么

先看懂,再决定要不要交给 AI。

LifeOS 是一项用于操作 LifeOS / Obsidian PARA 笔记库的技能。它通过 `npx -y @life-os/cli` 调用官方命令行工具,无需启动 Obsidian 即可直接在本地 vault 文件夹上工作,输出与用户在 Obsidian 中看到的内容一致。核心能力包括:(1) 周期笔记(日记/周记/月记/季记/年记)的定位、读取、按段落追加与模板化创建;(2) 主题笔记(PARA:项目/领域/资源/归档,或任意 #主题)的创建、读取与编辑,自动注入主题标签;(3) 任务管理 —— 列出待办/已完成、按 tag、关键字、到期时间筛选、按 file:line 引用切换完成状态;(4) vault 全文/标签/文件搜索;(5) AI Wiki(.AI.md 主题合成页)的维护、索引更新与变更日志。CLI 配置感知,会读取用户实际的 PARA 文件夹名、周期笔记格式与段落标题,所有写操作都要求显式 path=/ref= 避免误写。适用于晨间/周度回顾、快速捕获闪念、主题研究、任务跟踪与 AI Wiki 整理等场景。

✓晨间/周度/月度回顾与复盘
✓快速捕获日记与闪念(带时间戳与主题标签)
✓管理 PARA 项目/领域/资源/归档笔记
✓按主题标签跨笔记汇总信息
✓按到期时间筛选并切换任务完成状态
✓维护 LifeOS AI Wiki 主题合成页
✓搜索 vault 中的笔记内容/标签/文件
✓在不带 Obsidian 的环境中无头读写 vault
02

怎么交给 AI

在线读取优先,本地安装作为备选。

◎
在线读取推荐 · 不需要安装

适合能访问网页的 ChatGPT、Agent 或其他 AI。

AI Prompt请访问 https://skills.dhmip.cn/skills/life-os/lifeos/SKILL.md,读取并按照该 Skill 完成任务;如当前环境支持本地安装,也可以下载该 Skill。
↓
下载安装到 Agent适合支持 Skills 的客户端

未登录时可使用公共安装文档;登录后可以按不同 AI 分开管理。

Install Prompt请根据 https://skills.dhmip.cn/install/skillhub.md,安装 @life-os/lifeos。
登录后管理多个 AI →
03

兼容性与要求

安装或使用前,先确认环境是否匹配。

适用客户端

claude-codecursorwindsurfgeneric-cli

使用要求

  • Node.js 与 npx(用于运行 npx -y @life-os/cli)
  • 本地存在 LifeOS / Obsidian PARA vault(可通过 vault= 指定路径或设置 $LIFEOS_VAULT)
  • vault 内已配置 .obsidian/ 或 .lifeos/ 目录以便 CLI 自动识别
  • 首次运行会通过 npx 拉取 @life-os/cli 包
⌘技术详情查看完整 SKILL.md 与原始内容
⌄
SKILL.mdRaw ↗

name: lifeos
description: "Read, query and edit a LifeOS / Obsidian PARA vault (notes, tasks, periodic notes, theme notes, tags, AI Wiki) from the command line via the lifeos CLI — headless, no Obsidian or Aino needed. Use when the user asks about their tasks or 待办; periodic notes — daily/weekly/monthly/quarterly/yearly review or 日记/周记/月记/季记/年记; theme notes / PARA — projects/areas/resources/archives or 项目/领域/资源/归档/主题; tags / theme tags or 标签/主题标签; the LifeOS AI Wiki / .AI.md topic synthesis pages or 整理主题 / 更新 AI Wiki; or wants to find/search notes, capture a thought, or check/update what's on their plate in their LifeOS vault."


LifeOS

Drive a LifeOS vault through the lifeos CLI. It is config-aware — it reads
the user's real PARA folder names, periodic-note formats and section headers from
their own plugin / Aino settings — and headless, working directly on the vault
folder without Obsidian running. Query results match what the user sees in the app.

Core concepts (核心概念)

LifeOS organises a vault as two complementary kinds of note. Knowing which one a
request is about tells you which command to reach for.

Periodic notes (周期笔记) — organised by time. One file per period; resolve
its path with npx -y @life-os/cli <period>. The longer the period the less predictable it is,
so longer periods are for goals and shorter ones for tasks:

  • yearly (年记) / quarterly (季记) — long-term: goal management (目标管理),

set the direction for the year / quarter.

  • monthly (月记) / weekly (周记) — short-term: task management (任务管理),

break those goals into this month's / week's tasks.

  • daily (日记) — daily records: real-time capture of thoughts, tasks and time

tracking. Most capture lands here.

Theme notes (主题笔记) — organised by subject, usually via PARA. These live
in the user's PARA folders (see npx -y @life-os/cli config); reach them with search/read.
The later→earlier order is increasing actionability (archive → resource → area → project):

  • project (项目) — most actionable: a concrete goal with a deadline, e.g. 「完成季度报告」.
  • area (领域) — an ongoing responsibility to maintain, e.g. 「健康」「财务」.
  • resource (资源) — a topic of interest or reference material, e.g. 「读书笔记」.
  • archive (归档) — finished or inactive projects / areas / resources.
  • PARA is just the common shape; a theme can be any subject (e.g. 「#节日」).

The link between them — theme tags (主题标签): each theme note is identified by a
unique tag. Any task / fleeting note / file anywhere — including inside a daily or
other periodic note — that carries that tag is automatically indexed into the
theme note. This is what makes capture stress-free: jot with the right #tag now,
find it under the theme later.

  • Top-down (自上而下): tasks planned in a theme note surface in the daily note on

their planned date, so tasks due=today reflects project/goal plans.

  • Bottom-up (自下而上): a tagged thought or todo in the daily note is collected

back into the matching theme note via its tag.

So: when a user talks about a 项目/领域/资源/主题, work in the theme note; when they
talk about a day/week/month/quarter/year or "what's on my plate today", work in the
periodic note — and reuse the theme's tag so the two stay linked.

AI Wiki (.AI.md) — a third layer that sits beside the topic note as a
sibling {filename}.AI.md file. It is the LifeOS AI Wiki: a synthesised
summary page of what the vault knows about that topic, maintained
incrementally by this skill. Only topic / index notes get one — never
captures, dailies, meeting notes, or other one-off source files. When the
user says "整理一下 X 主题"、"更新 AI Wiki"、"看看 AI Wiki 怎么说", follow the
rules in [references/ai-wiki.md](references/ai-wiki.md): it covers source
scope, page schema, ingest / query / lint flows, and the concrete CLI
recipes that touch 7 索引/7. AI Wiki 索引.md and 7 索引/AI Wiki 变更日志.md.

Invocation

Run the CLI with npx -y @life-os/cli — npx fetches the published package on
first use and -y skips the install prompt; nothing needs to be installed
globally. Every example below is written in that form.

First moves

  1. Run npx -y @life-os/cli config to confirm which vault and settings are in

effect. If it can't find a vault, ask the user for the path and pass
vault=<path>.

  1. npx -y @life-os/cli help is the authoritative command list. For exhaustive

flags, output shapes and error codes, read
[references/commands.md](references/commands.md).

  1. For LifeOS AI Wiki maintenance (.AI.md topic pages, the central index,

the changelog and lint checks), read
[references/ai-wiki.md](references/ai-wiki.md).

Syntax

  • Options are key=value (e.g. tag=work, limit=10). --key=value also works.
  • Flags are bare words after -- (e.g. --json) or plain (overwrite, case).
  • Quote values with spaces: vault="~/My Vault/LifeOS".
  • Add --json whenever you need to parse output programmatically.

Vault selection

This skill is installed inside the user's vault, so you normally run from
within it — the CLI auto-detects the vault from the current directory. Resolution
order (first match wins): vault= → $LIFEOS_VAULT → walk up from cwd for
.obsidian//.lifeos/ → the folder Aino last opened (fallback). Only pass
vault= when the user means a _different_ vault than the one you're in.

Commands at a glance

# every command is invoked as: npx -y @life-os/cli <args>
npx -y @life-os/cli config                          # vault + effective settings (run this first)
npx -y @life-os/cli tasks [todo|done|all]           # tasks; filters: tag= keyword= due=today|week|overdue limit=
npx -y @life-os/cli search query=<text>             # type=file (default) | tag | content ; add `case` for content
npx -y @life-os/cli read file=<name>|path=<p>       # print a note
npx -y @life-os/cli daily|weekly|monthly|quarterly|yearly        # show the period note's path + whether it exists
npx -y @life-os/cli <period>:read                   # print the period note
npx -y @life-os/cli <period>:create                 # create the period note from its configured template
npx -y @life-os/cli <period>:append content=<t>     # append (creates from template if missing)
npx -y @life-os/cli theme:create type=project|area|resource|archive|theme tag=<t> path=<p>   # create a PARA note from its template
npx -y @life-os/cli append path=<p> content=<t>     # append to an existing note
npx -y @life-os/cli create path=<p> [content=]      # create a plain note (no template; add `overwrite` to replace)
npx -y @life-os/cli task done|todo ref=<file>:<n>   # toggle a task by its file:line reference

Template-aware creation: <period>:create, theme:create, and the auto-create
inside <period>:append all render the user's configured template through the
same engine the plugin/Aino use — {{snapshot:Project}}, {{if weekday}},
{{date}} etc. are expanded, and theme notes get their tag injected into
frontmatter. Plain create path=… stays template-free (use it for arbitrary notes).

Recipes (chain commands like this)

Morning review — what's on my plate, then capture the plan:

npx -y @life-os/cli tasks due=today --json          # today's open tasks
npx -y @life-os/cli tasks due=overdue --json        # anything slipping
npx -y @life-os/cli daily:append section="日常记录" content="- 08:30 #计划 今天先做 ..."

Quick capture — "记一下:想法X" (drop a timestamped line into today's record section):

npx -y @life-os/cli daily:append section="日常记录" content="- 14:30 #摘抄 想法X"   # echoes the resolved path

Find then act — never write blind:

npx -y @life-os/cli tasks keyword="季度报告"        # locate the task, note its file:line
npx -y @life-os/cli task done ref="0. 周期笔记/2025/Daily/05/2025-05-30.md:14"

Research a topic across the vault:

npx -y @life-os/cli search query="超线性回报" type=content limit=20   # path:line + matching text
npx -y @life-os/cli read path="-1. 捕获/....md"                       # open the most relevant hit

Weekly review:

npx -y @life-os/cli weekly                          # confirm this week's note path / existence
npx -y @life-os/cli tasks done due=week             # what got done
npx -y @life-os/cli weekly:append content="## 复盘\n..."

Journaling (日记)

The daily note is where most capture lands. Do it precisely:

  1. Locate — npx -y @life-os/cli daily shows today's path and Exists. Pass

date=YYYY-MM-DD for another day, locale= for weekday/month names.

  1. Insert in the right place — append into the record section with

section=<header>, not the file tail. The header is the daily note's main
record heading (commonly 日常记录 / Daily Record); confirm it by reading a
recent daily note. section= lands the line at the end of that section
(e.g. before 习惯打卡 / Habit) and creates the section only if absent.

  1. Format — default to - HH:mm #tag 内容. Use the current time from the

environment; the user is usually in their local timezone. Reuse existing tags —
npx -y @life-os/cli search type=tag keyword=<x> — rather than inventing
fine-grained ones; 1–3 tags unless the entry needs more.

  1. Polish, don't transcribe — lightly smooth the user's words while keeping

their facts, stance, emotion and first-person voice; add no judgments, advice
or conclusions they didn't make. When they say 原文/逐字/原样/摘抄/verbatim,
or paste a quote, keep it exact and only tidy Markdown.

  1. Creating a missing daily note — just use <period>:create (or let

<period>:append auto-create it). The CLI renders the user's configured
template via the shared engine: {{snapshot:Project}} expands to the live PARA
index list, {{if weekday}}/{{date}}/etc. are resolved, and LifeOS query
blocks (ProjectListByTime, TaskDueListByTime) are kept verbatim for the
plugin to render at view time. No manual template rendering needed — the
resulting note matches what the plugin/Aino would create.

The same section= works on weekly|monthly|...:append and on plain
append path=<p> section=<h>, so you can log into any note's heading.

Creating theme notes (项目/领域/资源/归档)

Use theme:create so the note is built from the PARA type's template and gets
its theme tag wired into frontmatter (so the theme index collects it):

# read config first for the real PARA folder names, then place the note yourself
npx -y @life-os/cli config
npx -y @life-os/cli theme:create type=project tag="项目/季度OKR" path="1. 项目/季度OKR/季度OKR.md"
  • type= picks the template (<type>TemplateFilePath → <typeDir>/Template.md → built-in).
  • tag= is the theme tag; it's injected into tags/aliases frontmatter.
  • path= is yours to choose — the convention is <paraDir>/<name>/<name>.md (a

folder + same-named index note, which is what {{snapshot}} lists). Add
overwrite to replace.

Upgrading the skill

The skill files inside .agents/skills/lifeos/ should match your CLI version.
Run this after upgrading @life-os/cli:

npx -y @life-os/cli skill install

It copies the bundled SKILL.md + references into your vault's .agents/skills/lifeos/
from the npm package you just upgraded to — no manual download, no git clone.

Writing safely

  • Writes (append, create, task, <period>:append) take an **explicit

path= / ref=** — they never guess a note from a loose name, so you won't
write to the wrong same-named file. search/tasks first to get the exact
target, then write.

  • create errors with _"A note already exists…"_ unless you pass overwrite.
  • Periodic :append echoes the resolved path and creates the note if missing.

If Exists: no surprises you, the vault's format config may differ from how
existing notes were named — surface the path to the user rather than creating a
stray note.

Interpreting results

  • Tasks print [ ]/[x] <text> (due … !priority #tags) — <file>:<line>.

The <file>:<line> is the stable reference for task done|todo.

  • tasks defaults to open (todo); pass done/all to widen. due= queries also

hide completed tasks by default.

  • PARA folder names are the user's own (e.g. 1. 项目) — see npx -y @life-os/cli config.
  • Errors are human-readable and exit non-zero (e.g. file-not-found, already-exists).

Performance

Index-backed commands (tasks, search type=file|tag) rebuild the index per run
(~1s on a ~5k-note vault); search type=content scans note bodies (~0.5s). Fine
for interactive use; avoid tight loops of many index queries.

Scope

Reading, querying and editing note content (notes, tasks, periodic notes, PARA,
tags). Not in scope: Google Calendar / CalDAV sync, and the plugin's UI —
those live in the LifeOS plugin and Aino app.