@ridit/lens 0.3.9 → 0.4.1
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 +97 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Lens
|
|
2
|
+
|
|
3
|
+
Lens is an AI-powered CLI tool that lets you explore, understand, and modify any codebase through natural language. Built with React and Ink for a rich terminal UI, Lens connects to multiple LLM providers and gives the AI direct access to your filesystem, shell, and the web.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Chat with your codebase** — ask questions, request changes, scaffold new files
|
|
8
|
+
- **Multi-provider support** — Anthropic, OpenAI, Gemini, Ollama, or any OpenAI-compatible API
|
|
9
|
+
- **Tool system** — AI can read/write files, run shell commands, fetch URLs, search the web, clone repos, generate PDFs, and more
|
|
10
|
+
- **Plugin registry** — extend Lens with custom tools via `@ridit/lens-sdk`
|
|
11
|
+
- **Diff preview** — proposed code changes are shown as a diff before applying
|
|
12
|
+
- **Auto-approve mode** — `/auto` skips confirmation for safe read/search tools
|
|
13
|
+
- **Force-all mode** — `/auto --force-all` approves everything including shell and writes
|
|
14
|
+
- **Persistent memory** — Lens remembers project-specific context across sessions
|
|
15
|
+
- **Chat history** — save, load, rename, and delete chat sessions per repo
|
|
16
|
+
- **Smart commits** — generate conventional commit messages from staged changes
|
|
17
|
+
- **Timeline** — browse and explore commit history
|
|
18
|
+
- **Repo analysis** — deep codebase review from a remote URL or local path
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# using bun
|
|
24
|
+
bun add @ridit/lens -g
|
|
25
|
+
|
|
26
|
+
# using npm
|
|
27
|
+
npm install -g @ridit/lens
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## CLI Commands
|
|
31
|
+
|
|
32
|
+
### Available
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
lens open interactive chat (default)
|
|
36
|
+
lens chat chat with your codebase
|
|
37
|
+
lens chat -p /path/to/repo chat in a specific repo
|
|
38
|
+
lens chat --session <id> resume or create a session by ID
|
|
39
|
+
lens chat --prompt <text> send a single prompt non-interactively
|
|
40
|
+
lens chat --dev output structured JSON (for SDK/tooling use)
|
|
41
|
+
lens chat --single run one message then exit, resumes latest session
|
|
42
|
+
lens chat --force-all auto-approve all tools including writes and shell
|
|
43
|
+
lens chat --dev --prompt <text> headless mode: JSON output, no UI
|
|
44
|
+
|
|
45
|
+
lens provider configure AI providers (interactive)
|
|
46
|
+
lens provider --list list configured providers
|
|
47
|
+
lens provider --provider <name> --model <model> --api-key <key> add/update a provider
|
|
48
|
+
lens provider --switch <name> switch the active provider
|
|
49
|
+
lens provider --remove <name> remove a provider
|
|
50
|
+
lens provider --dev output result as JSON
|
|
51
|
+
|
|
52
|
+
lens task <text> apply a natural language change to the codebase
|
|
53
|
+
lens commit generate a smart commit message from staged changes
|
|
54
|
+
lens commit --auto stage all and commit without confirmation
|
|
55
|
+
lens commit --push push to remote after committing
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Work in progress
|
|
59
|
+
|
|
60
|
+
The following commands existed in a previous version of Lens and are being restored after a core rewrite. They are registered but not fully functional yet:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
lens review AI review of the codebase (coming soon)
|
|
64
|
+
lens repo <url> analyze a remote repository (coming soon)
|
|
65
|
+
lens timeline explore commit history (coming soon)
|
|
66
|
+
lens run <cmd> run dev server, auto-fix errors (coming soon)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Chat Commands
|
|
70
|
+
|
|
71
|
+
Once inside a `lens chat` session, use slash commands:
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
/auto toggle auto-approve for safe tools (read, search, fetch)
|
|
75
|
+
/auto --force-all auto-approve ALL tools including shell and writes ⚠️
|
|
76
|
+
/provider configure AI provider without leaving chat
|
|
77
|
+
/memory list list stored memories for this repo
|
|
78
|
+
/memory add <text> add a memory
|
|
79
|
+
/memory clear clear all memories for this repo
|
|
80
|
+
/clear history wipe session memory for this repo
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Supported Providers
|
|
84
|
+
|
|
85
|
+
- **Anthropic** — Claude models
|
|
86
|
+
- **OpenAI** — GPT models
|
|
87
|
+
- **Gemini** — Google Gemini models
|
|
88
|
+
- **Ollama** — local models (free, fully offline)
|
|
89
|
+
- **Custom** — any OpenAI-compatible API endpoint
|
|
90
|
+
|
|
91
|
+
## Extending Lens
|
|
92
|
+
|
|
93
|
+
Custom tools can be built and registered using [`@ridit/lens-sdk`](https://www.npmjs.com/package/@ridit/lens-sdk).
|
|
94
|
+
|
|
95
|
+
## License
|
|
96
|
+
|
|
97
|
+
MIT
|