@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 CHANGED
@@ -1,25 +1,68 @@
1
- # Lens Analysis
2
- > Generated: 2026-03-11T17:49:46.564Z
1
+ # Lens - Codebase Intelligence Tool
3
2
 
4
- ## Overview
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
- ## Important Folders
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
- ## Missing Configs
13
- - None detected
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
- ## Security Issues
16
- - None detected
14
+ ## Supported AI Providers
17
15
 
18
- ## Suggestions
19
- - In src/components/FileReviewer.tsx, consider adding a check to ensure that the 'files' prop is not empty before rendering the file list.
20
- - In src/commands/repo.tsx, consider adding error handling for cases where the repository URL is invalid or the repository cannot be cloned.
21
- - In src/utils/llm.ts, consider adding a timeout to the 'runPrompt' function to prevent it from running indefinitely if the model takes too long to respond.
16
+ - Anthropic
17
+ - Gemini (Google AI)
18
+ - OpenAI
19
+ - Ollama (local models)
20
+ - Custom endpoints
22
21
 
23
- <!--lens-json
24
- {"overview":"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.","importantFolders":["src/components: contains various components, including FileReviewer, FileViewer, and ProviderPicker. Each component is used to display specific information about the repository.","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.","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."],"missingConfigs":[],"securityIssues":[],"suggestions":["In src/components/FileReviewer.tsx, consider adding a check to ensure that the 'files' prop is not empty before rendering the file list.","In src/commands/repo.tsx, consider adding error handling for cases where the repository URL is invalid or the repository cannot be cloned.","In src/utils/llm.ts, consider adding a timeout to the 'runPrompt' function to prevent it from running indefinitely if the model takes too long to respond."],"generatedAt":"2026-03-11T17:49:46.564Z"}
25
- lens-json-->
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.