recallx-headless 1.0.0

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 ADDED
@@ -0,0 +1,148 @@
1
+ # RecallX Headless
2
+
3
+ ## At A Glance
4
+
5
+ - This package is the npm-distributed headless runtime for RecallX.
6
+ - It provides the `recallx` and `recallx-mcp` commands.
7
+ - It can start the local RecallX API directly through `recallx serve`.
8
+ - It does not include the renderer or desktop release artifacts.
9
+
10
+ It defers behavior to the local RecallX API contract in [`docs/api.md`](../../docs/api.md).
11
+
12
+ ## What You Get
13
+
14
+ - `recallx` as the runtime and CLI entrypoint
15
+ - `recallx serve` and subcommands for day-to-day workspace and memory operations
16
+ - `recallx-mcp` as the direct stdio MCP entrypoint for agent clients
17
+
18
+ This distribution is for headless workflows. If you want the packaged renderer too, use the `recallx` npm package described in the root [`README.md`](../../README.md).
19
+
20
+ ## Install
21
+
22
+ ```bash
23
+ npm install -g recallx-headless
24
+ recallx serve
25
+ ```
26
+
27
+ In another shell:
28
+
29
+ ```bash
30
+ recallx health
31
+ recallx-mcp --help
32
+ recallx mcp install
33
+ ```
34
+
35
+ `recallx mcp install` writes the stable launcher path used by Codex and other editor MCP configs:
36
+
37
+ ```text
38
+ ~/.recallx/bin/recallx-mcp
39
+ ```
40
+
41
+ If the API is running in bearer mode, set `RECALLX_API_TOKEN` in the MCP client environment. The launcher intentionally does not persist tokens to disk.
42
+
43
+ Start the local headless runtime with:
44
+
45
+ ```bash
46
+ recallx serve
47
+ ```
48
+
49
+ Useful runtime overrides:
50
+
51
+ ```bash
52
+ recallx serve --port 8787 --bind 127.0.0.1
53
+ recallx serve --workspace-root /Users/name/Documents/RecallX
54
+ recallx serve --workspace-name "Personal Workspace"
55
+ recallx serve --api-token secret-token
56
+ ```
57
+
58
+ The headless package does not ship renderer pages or desktop release artifacts. At `/`, it returns a runtime notice instead of the renderer app.
59
+
60
+ You can also print the direct MCP command or a config snippet:
61
+
62
+ ```bash
63
+ recallx mcp command
64
+ recallx mcp config
65
+ recallx mcp path
66
+ ```
67
+
68
+ ## Common Tasks
69
+
70
+ Quick health and workspace checks:
71
+
72
+ ```bash
73
+ recallx health
74
+ recallx workspace current
75
+ recallx workspace list
76
+ ```
77
+
78
+ Search and inspect memory:
79
+
80
+ ```bash
81
+ recallx search "agent memory" --type project --limit 5
82
+ recallx get node_123
83
+ recallx related node_123 --depth 1
84
+ recallx context node_project_1 --mode compact --preset for-coding --format markdown
85
+ ```
86
+
87
+ Write back new information:
88
+
89
+ ```bash
90
+ recallx create --type note --title "Idea" --body "..."
91
+ recallx append --target node_project_1 --type agent_run_summary --text "Implemented draft"
92
+ recallx link node_a node_b supports --status suggested
93
+ recallx attach --node node_project_1 --path artifacts/report.md
94
+ ```
95
+
96
+ MCP setup helpers:
97
+
98
+ ```bash
99
+ recallx mcp install
100
+ recallx mcp path
101
+ recallx mcp command
102
+ recallx mcp config
103
+ ```
104
+
105
+ ## Commands
106
+
107
+ ```bash
108
+ recallx health
109
+ recallx mcp config
110
+ recallx mcp install
111
+ recallx mcp path
112
+ recallx mcp command
113
+ recallx search "agent memory" --type project --limit 5
114
+ recallx get node_123
115
+ recallx related node_123 --depth 1
116
+ recallx context node_project_1 --mode compact --preset for-coding --format markdown
117
+ recallx create --type note --title "Idea" --body "..."
118
+ recallx append --target node_project_1 --type agent_run_summary --text "Implemented draft"
119
+ recallx link node_a node_b supports --status suggested
120
+ recallx attach --node node_project_1 --path artifacts/report.md
121
+ recallx search activities "implemented draft"
122
+ recallx search workspace "what changed"
123
+ recallx governance issues --states contested,low_confidence
124
+ recallx governance show --entity-type node --entity-id node_123
125
+ recallx governance recompute --entity-type node --entity-ids node_123
126
+ recallx workspace current
127
+ recallx workspace list
128
+ recallx workspace create --root /Users/name/Documents/RecallX-Test --name "Test Workspace"
129
+ recallx workspace open --root /Users/name/Documents/RecallX-Test
130
+ ```
131
+
132
+ ## Environment
133
+
134
+ - `RECALLX_API_URL` to override the local API base URL
135
+ - `RECALLX_TOKEN` to pass a bearer token
136
+ - `RECALLX_PORT`, `RECALLX_BIND`, `RECALLX_WORKSPACE_ROOT`, `RECALLX_WORKSPACE_NAME`, and `RECALLX_API_TOKEN` are respected by `recallx serve`
137
+ - Node 20+ is recommended for the headless package
138
+
139
+ ## Notes
140
+
141
+ - Default API base: `http://127.0.0.1:8787/api/v1`
142
+ - `recallx serve` starts the local RecallX API in-process from the installed package
143
+ - The CLI stays thin for day-to-day API operations and defers behavior to the HTTP API contract
144
+ - `--format json` is useful when scripting, while `--format markdown` is best for `context`
145
+ - `workspace open` switches the active workspace in the running local RecallX service without restarting the server
146
+ - `recallx-mcp` is the direct stdio MCP entrypoint from the npm package
147
+ - See the root [`README.md`](../../README.md) for source-run usage and install paths
148
+ - See [`docs/mcp.md`](../../docs/mcp.md) for editor MCP wiring details
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import "../../mcp/index.js";
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import { runCli } from "../src/cli.js";
3
+
4
+ runCli(process.argv).catch((error) => {
5
+ const message = error instanceof Error ? error.message : String(error);
6
+ process.stderr.write(`${message}\n`);
7
+ process.exitCode = 1;
8
+ });