@tanagram/lore 0.1.53 → 0.1.55
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 +117 -1
- package/dist/index.js +429 -139
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -2,9 +2,117 @@
|
|
|
2
2
|
|
|
3
3
|
The command-line interface for Lore.
|
|
4
4
|
|
|
5
|
+
## Privacy: Lore only uploads from directories you allow
|
|
6
|
+
|
|
7
|
+
By default the Lore daemon does **not** auto-upload any Claude Code
|
|
8
|
+
session. You have to opt in per directory. This is the consent-first
|
|
9
|
+
contract:
|
|
10
|
+
|
|
11
|
+
- Sessions whose cwd is not under one of your upload directories are
|
|
12
|
+
ignored by the daemon — they stay on your machine.
|
|
13
|
+
- The explicit commands (`lore export`, `lore share-codex`,
|
|
14
|
+
`lore share-cowork`) are user-initiated and bypass the upload-dir
|
|
15
|
+
gate. You can always opt-in per session.
|
|
16
|
+
- The allowlist lives in `~/.lore/upload_dirs.json` (`~/.lore-dev/` in
|
|
17
|
+
dev), written with 0600 mode so other users on the same machine can't
|
|
18
|
+
read it.
|
|
19
|
+
|
|
20
|
+
Adding directories takes a single keystroke on first login — the TUI
|
|
21
|
+
shows your most-recent Claude Code project cwds with the top three
|
|
22
|
+
pre-checked, and pressing Enter accepts them. After that, manage the
|
|
23
|
+
list with `lore listen`:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
lore listen create ~/code/projectA # watch ~/code/projectA
|
|
27
|
+
lore listen create ~/work --org acme # route work to a non-default org
|
|
28
|
+
lore listen list # tabular output
|
|
29
|
+
lore listen list --json # for scripts
|
|
30
|
+
lore listen update ~/work --org other-corp # reassign org
|
|
31
|
+
lore listen delete ~/code/projectA # stop uploading from
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Matching uses path-separator-aware **prefix-tree** semantics, so adding
|
|
35
|
+
`~/code` covers `~/code/projectA`, `~/code/projectA/src`, etc., but
|
|
36
|
+
deliberately does **not** cover `~/code-other`. The most-specific
|
|
37
|
+
matching entry wins, so you can have a broad personal `~/` allow plus a
|
|
38
|
+
narrower `~/work` override that routes to a different org.
|
|
39
|
+
|
|
40
|
+
## Interactive TUI
|
|
41
|
+
|
|
42
|
+
Running `lore` with no subcommand drops you into an interactive Ink
|
|
43
|
+
dashboard when stdin and stdout are TTYs:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
┌── lore — matt@tanagram.ai · tanagram ─────────────────── v0.1.50 ──┐
|
|
47
|
+
│ │
|
|
48
|
+
│ ╭─ Daemon ──────────────────╮ ╭─ Workspace ─────────────────────╮ │
|
|
49
|
+
│ │ ● Status running │ │ ● User matt@tanagram.ai │ │
|
|
50
|
+
│ │ ● Enabled yes │ │ ● Display Matt │ │
|
|
51
|
+
│ │ ● Running yes │ │ ● Org tanagram │ │
|
|
52
|
+
│ │ ● Heartbeat 12s ago │ │ ● Skills 8 installed · 3 │ │
|
|
53
|
+
│ │ ● Last upload 3m ago │ │ published │ │
|
|
54
|
+
│ ╰────────────────────────────╯ ╰────────────────────────────────╯ │
|
|
55
|
+
│ │
|
|
56
|
+
│ ╭─ Quick actions ───── ↑/↓ or j/k · Enter to choose · q to quit ─╮ │
|
|
57
|
+
│ │ › Share Codex session lore share-codex --session-file … │ │
|
|
58
|
+
│ │ Share Cowork session lore share-cowork │ │
|
|
59
|
+
│ │ Export latest Claude lore export │ │
|
|
60
|
+
│ │ Inspect background daemon lore status │ │
|
|
61
|
+
│ │ List installed skills lore skills list │ │
|
|
62
|
+
│ │ … │ │
|
|
63
|
+
│ ╰─────────────────────────────────────────────────────────────────╯ │
|
|
64
|
+
└────────────────────────────────────────────────────────────────────┘
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Picking an action exits the dashboard and re-enters the matching
|
|
68
|
+
subcommand exactly as if you had typed it yourself — auth checks,
|
|
69
|
+
metrics, and error formatting all flow through the same path.
|
|
70
|
+
|
|
71
|
+
The interactive flows (`lore login`, `lore enable` / `disable` /
|
|
72
|
+
`restart` / `status`, and the three share/export commands) also render
|
|
73
|
+
through Ink in TTY mode:
|
|
74
|
+
|
|
75
|
+
- **`lore login`** — three labelled steps (negotiating with WorkOS →
|
|
76
|
+
device code panel → polling), then a success box with the resolved
|
|
77
|
+
LaunchAgent paths. Distinct copy for timed-out / denied / expired.
|
|
78
|
+
On first login the device-code flow is followed by a one-screen
|
|
79
|
+
"Configure upload directories" wizard so the daemon has explicit
|
|
80
|
+
consent to upload anything (see Privacy section above).
|
|
81
|
+
- **`lore enable` / `disable` / `restart`** — spinner with mode-specific
|
|
82
|
+
copy while launchctl works, then a success or error MessageBox.
|
|
83
|
+
- **`lore status`** — two-panel view (health on the left, paths on the
|
|
84
|
+
right) with severity dots and a "Not healthy" callout pointing at
|
|
85
|
+
`lore restart` / `lore logs` when something is off.
|
|
86
|
+
- **`lore export` / `share-codex` / `share-cowork`** — four-step pipeline
|
|
87
|
+
display (resolving → uploading → parsing → updating visibility) with
|
|
88
|
+
the resulting URL highlighted in a success box.
|
|
89
|
+
|
|
90
|
+
### Disabling the TUI
|
|
91
|
+
|
|
92
|
+
The TUI is presentation only — every command produces identical
|
|
93
|
+
stdout in non-TTY contexts (scripts, CI, piped output). To force the
|
|
94
|
+
plain rendering even in a TTY:
|
|
95
|
+
|
|
96
|
+
- pass `--no-tui` at the top level: `lore --no-tui status`
|
|
97
|
+
- or set `LORE_NO_TUI=1` in the environment.
|
|
98
|
+
|
|
99
|
+
`lore status --json` always prints JSON and never mounts the TUI.
|
|
100
|
+
|
|
101
|
+
The plain path is also taken automatically whenever:
|
|
102
|
+
|
|
103
|
+
- stdout or stdin is not a TTY (piped, redirected, or scripted)
|
|
104
|
+
- `CI` is set to a truthy value
|
|
105
|
+
- `TERM=dumb`
|
|
106
|
+
|
|
107
|
+
### TUI architecture (for contributors)
|
|
108
|
+
|
|
109
|
+
See [AGENTS.md](./AGENTS.md) for the contributor guide on adding new
|
|
110
|
+
screens, the presentation/handler split, and the TTY-detection contract.
|
|
111
|
+
|
|
5
112
|
## Subcommands
|
|
6
113
|
|
|
7
|
-
- `lore` — prints help text
|
|
114
|
+
- `lore` — opens the interactive dashboard in a TTY; prints help text
|
|
115
|
+
in non-TTY contexts.
|
|
8
116
|
- `lore login` — authorizes the CLI against your Lore workspace using WorkOS
|
|
9
117
|
CLI Auth's device-code flow. On macOS, also auto-runs `lore enable` to
|
|
10
118
|
install and start the background uploader; if that step fails, login still
|
|
@@ -17,6 +125,14 @@ The command-line interface for Lore.
|
|
|
17
125
|
- `lore disable` — stops and removes the macOS background uploader.
|
|
18
126
|
- `lore restart` — restarts the macOS background uploader.
|
|
19
127
|
- `lore status` / `lore status --json` — shows background uploader health.
|
|
128
|
+
- `lore listen create <path> [--org <name>]` — allowlist a directory for
|
|
129
|
+
daemon auto-uploads. Defaults to your active organization; pass
|
|
130
|
+
`--org` to route a directory at a non-default workspace.
|
|
131
|
+
- `lore listen list [--json]` — print the directories the daemon may
|
|
132
|
+
auto-upload from, with their target org.
|
|
133
|
+
- `lore listen update <path> --org <name>` — reassign an existing
|
|
134
|
+
upload directory to a different organization.
|
|
135
|
+
- `lore listen delete <path>` — stop uploading from a directory.
|
|
20
136
|
- `lore organizations list` — calls `/api/whoami` and prints the WorkOS
|
|
21
137
|
organizations the authenticated user currently belongs to.
|
|
22
138
|
- `lore export` — uploads a single Claude Code session on demand and prints a
|