lens-engine 0.1.13 → 0.1.14

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.
Files changed (3) hide show
  1. package/README.md +30 -6
  2. package/cli.js +13 -1
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -46,14 +46,18 @@ Context pack: 12 files, 3.2KB
46
46
 
47
47
  Your code never leaves your machine. No cloud dependency for local usage.
48
48
 
49
- ## Daemon
49
+ ## Daemon & Dashboard
50
50
 
51
- Runs on port 4111. Serves the REST API, MCP stdio, and local dashboard.
51
+ The daemon runs on port 4111 serves the REST API, MCP stdio, and a full local dashboard. Manage repos, watch indexing jobs, build context packs, and browse indexed data from the browser.
52
52
 
53
53
  ```sh
54
54
  lens daemon start
55
- lens dashboard
55
+ lens dashboard # opens http://localhost:4111/dashboard/
56
+ ```
57
+
58
+ Dashboard pages: **Overview** (system stats, repo cards), **Context** (interactive query builder), **Repositories** (status table), **Jobs** (indexing progress), **Requests** (live log), **Data Browser**, **Usage**, **Billing**.
56
59
 
60
+ ```sh
57
61
  # REST API
58
62
  curl http://localhost:4111/context \
59
63
  -H "Content-Type: application/json" \
@@ -62,7 +66,7 @@ curl http://localhost:4111/context \
62
66
 
63
67
  ## MCP Integration
64
68
 
65
- Add `.mcp.json` to your project root. Claude Code, Cursor, and any MCP-compatible agent auto-discovers LENS:
69
+ `lens repo register` writes `.mcp.json` automatically. Claude Code, Cursor, and any MCP-compatible agent auto-discovers LENS. To re-create it manually: `lens repo mcp`.
66
70
 
67
71
  ```json
68
72
  {
@@ -77,14 +81,33 @@ Add `.mcp.json` to your project root. Claude Code, Cursor, and any MCP-compatibl
77
81
 
78
82
  ## Pro
79
83
 
80
- Authenticate to unlock Voyage semantic embeddings, purpose summaries, and vocab clusters. Adds ~100-300ms for semantic vector search on top of the base retrieval.
84
+ LENS is free for local use — TF-IDF, import graph, co-change, and caching all work without an account. Pro unlocks two additional pipeline stages that improve retrieval accuracy for larger or more complex codebases.
85
+
86
+ ### Semantic Embeddings
87
+
88
+ Every file chunk is embedded for semantic search. LENS runs cosine similarity against all vectors to find files that are semantically relevant — even when they share zero keywords with your prompt.
89
+
90
+ > **Example:** Query `"handle expired sessions"` surfaces `tokenRefresh.ts` and `authMiddleware.ts`. Neither contains the word "session".
91
+
92
+ ### Vocab Clusters
93
+
94
+ Export names across your repo are embedded and clustered by cosine similarity (threshold >0.75). When a query matches one term in a cluster, all related terms are pulled in — automatic query expansion tuned to your codebase.
95
+
96
+ > **Example:** Query `"auth"` expands to `verifyToken`, `sessionMiddleware`, `loginHandler`, `requireAuth`.
97
+
98
+ Together they add ~100-300ms per query. After logging in, run `lens index --force` to embed everything immediately, or leave it — LENS embeds new and changed files on each incremental index, so coverage grows automatically as you work.
81
99
 
82
100
  ```sh
83
- lens login
101
+ lens login --github
102
+ # Authenticated as user@example.com
103
+
84
104
  lens status
85
105
  # Pro: active
86
106
  # Embeddings: 847/847 files
87
107
  # Vocab clusters: 42 clusters
108
+
109
+ # Optional: force full re-index to embed everything now
110
+ lens index --force
88
111
  ```
89
112
 
90
113
  ## CLI Reference
@@ -102,6 +125,7 @@ All commands support `--json` for machine-readable output.
102
125
  | `lens repo watch` | Start file watcher for current repo |
103
126
  | `lens repo unwatch` | Stop file watcher for current repo |
104
127
  | `lens repo watch-status` | Show watcher status |
128
+ | `lens repo mcp` | Write .mcp.json for agent integration |
105
129
  | `lens index` | Index the current repo |
106
130
  | `lens context "<goal>"` | Build a context pack for a goal |
107
131
  | `lens status` | Show repo index/embedding status |
package/cli.js CHANGED
@@ -4045,6 +4045,17 @@ async function watchStatusCommand(opts) {
4045
4045
  }
4046
4046
  }
4047
4047
 
4048
+ // packages/cli/src/commands/mcp.ts
4049
+ async function mcpCommand() {
4050
+ const { root_path } = await detectRepo();
4051
+ const result = injectMcp(root_path);
4052
+ if (result === "exists") {
4053
+ output("LENS MCP entry already present in .mcp.json", false);
4054
+ } else {
4055
+ output("Wrote .mcp.json \u2014 agents will auto-discover LENS", false);
4056
+ }
4057
+ }
4058
+
4048
4059
  // packages/cli/src/commands/config.ts
4049
4060
  async function configGetCommand(key) {
4050
4061
  try {
@@ -4368,7 +4379,7 @@ async function logoutCommand() {
4368
4379
  }
4369
4380
 
4370
4381
  // packages/cli/src/index.ts
4371
- var program2 = new Command().name("lens").description("LENS \u2014 Local-first repo context engine").version("0.1.13");
4382
+ var program2 = new Command().name("lens").description("LENS \u2014 Local-first repo context engine").version("0.1.14");
4372
4383
  function trackCommand(name) {
4373
4384
  if (!isTelemetryEnabled()) return;
4374
4385
  const BASE_URL2 = process.env.LENS_HOST ?? "http://127.0.0.1:4111";
@@ -4387,6 +4398,7 @@ repo.command("remove").description("Remove current repo and all its data").optio
4387
4398
  repo.command("watch").description("Start file watcher for current repo").option("--json", "Output as JSON", false).action((opts) => run(() => watchCommand(opts)));
4388
4399
  repo.command("unwatch").description("Stop file watcher for current repo").option("--json", "Output as JSON", false).action((opts) => run(() => unwatchCommand(opts)));
4389
4400
  repo.command("watch-status").description("Show file watcher status for current repo").option("--json", "Output as JSON", false).action((opts) => run(() => watchStatusCommand(opts)));
4401
+ repo.command("mcp").description("Write .mcp.json for MCP agent integration").action(() => run(() => mcpCommand()));
4390
4402
  program2.command("context <goal>").description("Build an intelligent context pack for a goal").option("--json", "Output as JSON", false).action((goal, opts) => run(() => contextCommand(goal, opts), "context"));
4391
4403
  program2.command("index").description("Index the current repo").option("--json", "Output as JSON", false).option("--force", "Full re-scan (default: diff scan, changed files only)", false).option("--status", "Show index status", false).action((opts) => run(() => indexCommand(opts), "index"));
4392
4404
  program2.command("status").description("Show repo index/embedding status").option("--json", "Output as JSON", false).action((opts) => run(() => statusCommand(opts), "status"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lens-engine",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "LENS — Local-first repo context engine for AI agents",
5
5
  "type": "module",
6
6
  "bin": {
@@ -15,5 +15,5 @@
15
15
  "node": ">=20"
16
16
  },
17
17
  "license": "MIT",
18
- "homepage": "https://getlens.dev"
18
+ "homepage": "https://lens-engine.com"
19
19
  }