@ridit/lens 0.2.1 → 0.2.4
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/LENS.md +62 -19
- package/dist/index.mjs +660 -469
- package/package.json +2 -1
- package/src/components/chat/ChatOverlays.tsx +73 -46
- package/src/components/chat/ChatRunner.tsx +203 -369
- package/src/index.tsx +6 -0
- package/src/prompts/system.ts +79 -102
- package/src/utils/addons/loadAddons.ts +29 -0
- package/src/utils/chat.ts +95 -176
- package/src/utils/memory.ts +7 -12
- package/src/utils/tools/builtins.ts +324 -0
- package/src/utils/tools/registry.ts +63 -0
- package/hello.py +0 -51
package/LENS.md
CHANGED
|
@@ -1,25 +1,68 @@
|
|
|
1
|
-
# Lens
|
|
2
|
-
> Generated: 2026-03-11T17:49:46.564Z
|
|
1
|
+
# Lens - Codebase Intelligence Tool
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
This project is a CLI tool called 'lens' that analyzes a repository and provides insights. It uses React, Ink, and various other libraries to create a text-based interface. The tool has several commands, including 'repo' for analyzing a remote repository, 'init' for initializing the tool, and 'review' for reviewing a local codebase. The project is designed for developers who want to quickly understand a repository's structure and content.
|
|
3
|
+
Lens is a CLI tool that helps developers understand, navigate, and interact with codebases using AI-powered analysis.
|
|
6
4
|
|
|
7
|
-
##
|
|
8
|
-
- src/components: contains various components, including FileReviewer, FileViewer, and ProviderPicker. Each component is used to display specific information about the repository.
|
|
9
|
-
- src/commands: contains the implementation of the 'repo', 'init', and 'review' commands. Each command has its own file and exports a function that handles the command's logic.
|
|
10
|
-
- src/utils: contains utility functions for tasks such as cloning a repository, reading files, and analyzing code. These functions are used throughout the project to perform specific tasks.
|
|
5
|
+
## Core Features
|
|
11
6
|
|
|
12
|
-
|
|
13
|
-
-
|
|
7
|
+
- **Repository Analysis**: Analyze both local and remote repositories
|
|
8
|
+
- **AI-Powered Insights**: Uses LLMs to understand code structure and content
|
|
9
|
+
- **Interactive Chat**: Converse with your codebase using natural language
|
|
10
|
+
- **Code Review**: Automated code reviews with specific suggestions
|
|
11
|
+
- **Timeline Exploration**: Explore commit history and code evolution
|
|
12
|
+
- **Task Automation**: Apply natural language changes to codebases
|
|
14
13
|
|
|
15
|
-
##
|
|
16
|
-
- None detected
|
|
14
|
+
## Supported AI Providers
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
16
|
+
- Anthropic
|
|
17
|
+
- Gemini (Google AI)
|
|
18
|
+
- OpenAI
|
|
19
|
+
- Ollama (local models)
|
|
20
|
+
- Custom endpoints
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
## Technical Architecture
|
|
23
|
+
|
|
24
|
+
- Built with React components rendered in terminal via Ink
|
|
25
|
+
- TypeScript throughout for type safety
|
|
26
|
+
- Bun as build tool and runtime
|
|
27
|
+
- Commander.js for CLI structure
|
|
28
|
+
- Modular command system with separate handlers
|
|
29
|
+
|
|
30
|
+
## Commands
|
|
31
|
+
|
|
32
|
+
- `lens repo <url>` - Analyze a remote repository
|
|
33
|
+
- `lens review [path]` - Review a local codebase
|
|
34
|
+
- `lens task <text>` - Apply natural language changes
|
|
35
|
+
- `lens chat` - Interactive chat with codebase
|
|
36
|
+
- `lens timeline` - Explore commit history
|
|
37
|
+
- `lens provider` - Configure AI providers
|
|
38
|
+
|
|
39
|
+
## Key Components
|
|
40
|
+
|
|
41
|
+
- **Smart File Selection**: AI determines which files are most important
|
|
42
|
+
- **Structured Analysis**: Provides overviews, folder insights, and suggestions
|
|
43
|
+
- **Security Scanning**: Identifies potential security issues
|
|
44
|
+
- **Multi-Model Support**: Flexible AI backend configuration
|
|
45
|
+
|
|
46
|
+
## Installation
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npm install -g @ridit/lens
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Usage
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# Analyze a GitHub repository
|
|
56
|
+
lens repo https://github.com/user/repo
|
|
57
|
+
|
|
58
|
+
# Review local codebase
|
|
59
|
+
lens review .
|
|
60
|
+
|
|
61
|
+
# Chat with your code
|
|
62
|
+
lens chat --path .
|
|
63
|
+
|
|
64
|
+
# Make changes with natural language
|
|
65
|
+
lens task "Add TypeScript types to this component" --path .
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Lens helps developers quickly understand complex codebases through AI-assisted analysis and natural language interaction.
|