@life-os/cli 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -13
- package/dist/lifeos.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @lifeos/cli — `lifeos`
|
|
2
2
|
|
|
3
3
|
Headless, config-aware command-line interface over a LifeOS vault, built for AI
|
|
4
|
-
agents (Claude Code, etc.). Lets an agent read
|
|
5
|
-
|
|
4
|
+
agents (Claude Code, etc.). Lets an agent initialize, migrate, read, query, and
|
|
5
|
+
edit a LifeOS knowledge base **without opening Obsidian or Aino**.
|
|
6
6
|
|
|
7
7
|
## Why it exists
|
|
8
8
|
|
|
@@ -27,22 +27,39 @@ to see exactly what was picked up.
|
|
|
27
27
|
|
|
28
28
|
1. `vault=<path>` option
|
|
29
29
|
2. `$LIFEOS_VAULT` env var
|
|
30
|
-
3. Walk up from the current directory for
|
|
30
|
+
3. Walk up from the current directory for `.obsidian/`, `.lifeos/`, or
|
|
31
|
+
`.agents/skills/lifeos/`
|
|
31
32
|
4. The folder Aino last opened (`userData/bootstrap.json` → `lastOpenedFolder`)
|
|
32
33
|
|
|
33
34
|
The cwd walk comes before the Aino fallback by design: when an agent works inside
|
|
34
35
|
a vault, the cwd is the most reliable signal of which vault the user means.
|
|
35
36
|
Aino's last-opened folder is only used when running outside any vault.
|
|
36
37
|
|
|
38
|
+
`onboard` intentionally uses an empty current directory instead of that Aino
|
|
39
|
+
fallback, so a new local folder is safe to initialize. Pass `vault=<path>` when
|
|
40
|
+
the onboarding target is a different directory.
|
|
41
|
+
|
|
37
42
|
## Commands
|
|
38
43
|
|
|
39
44
|
```bash
|
|
40
45
|
# Read / query
|
|
41
46
|
lifeos config # effective settings + where they came from
|
|
47
|
+
lifeos today [date=YYYY-MM-DD] # source-backed AI Today view
|
|
48
|
+
lifeos board [workflow|para] # source-backed AI board view
|
|
42
49
|
lifeos tasks [todo|done|all] # list tasks (filters: tag=, keyword=, due=today|week|overdue, limit=)
|
|
43
50
|
lifeos search query=<text> # find notes (type=file default | tag | content); add `case` for content
|
|
44
51
|
lifeos read file=<name>|path=<p> # print a note
|
|
45
52
|
|
|
53
|
+
# Onboarding any local Markdown folder (.obsidian is optional)
|
|
54
|
+
lifeos onboard inspect --json
|
|
55
|
+
lifeos onboard templates locale=en
|
|
56
|
+
lifeos onboard plan profile=memos density=full locale=en
|
|
57
|
+
lifeos onboard plan profile=para density=minimal locale=en
|
|
58
|
+
lifeos onboard apply profile=para density=minimal locale=en
|
|
59
|
+
lifeos onboard classify-input profile=para locale=en limit=30 --json
|
|
60
|
+
lifeos onboard classify-plan file=.lifeos/classification-plans/batch.json --json
|
|
61
|
+
lifeos onboard classify-apply file=.lifeos/classification-plans/batch.json --json
|
|
62
|
+
|
|
46
63
|
# Periodic notes — daily|weekly|monthly|quarterly|yearly (path from periodicNotesPath + format)
|
|
47
64
|
lifeos daily [date=YYYY-MM-DD] # show the note path + whether it exists
|
|
48
65
|
lifeos weekly:read [date=] # read the note
|
|
@@ -58,10 +75,23 @@ lifeos help
|
|
|
58
75
|
|
|
59
76
|
Every command accepts `--json` for machine-readable output.
|
|
60
77
|
|
|
78
|
+
Onboarding lists Memos, IPO, GTD, and PARA from easiest to hardest and supports
|
|
79
|
+
all four directly; use the separate `opc` skill
|
|
80
|
+
for OPC. Inventory recognizes `.md`, `.markdown`, and common image, video,
|
|
81
|
+
audio, PDF, document, and presentation attachments without extracting binary
|
|
82
|
+
contents. Template and classification writes are previewed first. Confirmed
|
|
83
|
+
classification batches reject paths outside the workspace, target collisions,
|
|
84
|
+
and moves that could break links. For an existing conflicting file, JSON
|
|
85
|
+
onboarding plans include a `conflictEntries` item with the target content so an
|
|
86
|
+
agent can propose a field-level merge; `onboard apply` still does not overwrite
|
|
87
|
+
the file.
|
|
88
|
+
|
|
61
89
|
### Examples
|
|
62
90
|
|
|
63
91
|
```bash
|
|
64
92
|
lifeos config vault="~/Documents/My Vault"
|
|
93
|
+
lifeos today --json
|
|
94
|
+
lifeos board mode=workflow --json
|
|
65
95
|
lifeos tasks todo due=week limit=20
|
|
66
96
|
lifeos tasks done tag=个人品牌 --json
|
|
67
97
|
lifeos search query=项目 type=file
|
|
@@ -79,17 +109,24 @@ Writes take an explicit `path=` / `ref=` (no name guessing), so the agent should
|
|
|
79
109
|
Options use `key=value` (or `--key=value`); flags are bare `--flag`. This mirrors
|
|
80
110
|
the Obsidian CLI convention so agent prompting transfers.
|
|
81
111
|
|
|
82
|
-
## Agent
|
|
112
|
+
## Agent skills
|
|
83
113
|
|
|
84
|
-
The LifeOS
|
|
85
|
-
Install or update it
|
|
114
|
+
The complete LifeOS Skill bundle is embedded in the CLI from
|
|
115
|
+
`@lifeos/skill-assets`. Install or update it in the current vault after
|
|
116
|
+
upgrading `@life-os/cli`:
|
|
86
117
|
|
|
87
118
|
```bash
|
|
88
|
-
npx -y @life-os/cli skill
|
|
119
|
+
npx -y @life-os/cli@latest skill status
|
|
120
|
+
npx -y @life-os/cli@latest skill install
|
|
89
121
|
```
|
|
90
122
|
|
|
91
|
-
This
|
|
92
|
-
`.agents/skills
|
|
123
|
+
This atomically installs five independently discoverable Skills under
|
|
124
|
+
`.agents/skills/`: `lifeos`, `lifeos-today`, `lifeos-board`,
|
|
125
|
+
`lifeos-onboarding`, and `lifeos-content`. The manifest in
|
|
126
|
+
`.agents/skills/lifeos/` binds their files and fingerprints to the exact CLI
|
|
127
|
+
package version. Legacy or locally modified managed files are backed up before
|
|
128
|
+
replacement, obsolete files from the former single-Skill layout are removed,
|
|
129
|
+
and the installer refuses to downgrade a newer vault copy.
|
|
93
130
|
|
|
94
131
|
## Build & test
|
|
95
132
|
|
|
@@ -100,10 +137,11 @@ pnpm -C apps/lifeos-cli test
|
|
|
100
137
|
|
|
101
138
|
## Scope
|
|
102
139
|
|
|
103
|
-
This CLI is the **
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
those stay in the plugin
|
|
140
|
+
This CLI is the **knowledge-base data layer** of LifeOS: headless AI Today and
|
|
141
|
+
workflow/PARA board views, onboarding, migration, read/query/write of note
|
|
142
|
+
content, tasks, PARA and tags. It deliberately does not wrap background network
|
|
143
|
+
sync (Google Calendar / CalDAV / two-way task sync); those stay in the plugin
|
|
144
|
+
and Aino.
|
|
107
145
|
|
|
108
146
|
### Periodic-note resolution
|
|
109
147
|
|