arcvision 0.1.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 +91 -0
- package/arcvision-0.1.0.tgz +0 -0
- package/dist/index.js +56622 -0
- package/jest.config.json +6 -0
- package/package.json +37 -0
- package/src/core/parser.js +73 -0
- package/src/core/scanner.js +86 -0
- package/src/core/watcher.js +18 -0
- package/src/index.js +201 -0
- package/src/plugins/express-plugin.js +48 -0
- package/src/plugins/plugin-manager.js +57 -0
- package/src/plugins/react-plugin.js +54 -0
- package/tests/plugins.test.js +49 -0
- package/tests/scanner.test.js +52 -0
package/README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# ArcVision CLI
|
|
2
|
+
|
|
3
|
+
Architecture scanner for modern codebases. ArcVision analyzes your codebase and creates visual representations of file relationships and dependencies.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g arcvision
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
### Link to a Project
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
arcvision link <upload-token>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Scan a Directory
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# Scan current directory
|
|
23
|
+
arcvision scan
|
|
24
|
+
|
|
25
|
+
# Scan specific directory
|
|
26
|
+
arcvision scan path/to/directory
|
|
27
|
+
|
|
28
|
+
# Scan and upload to dashboard
|
|
29
|
+
arcvision scan --upload
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Commands
|
|
33
|
+
|
|
34
|
+
- `arcvision link <token>` - Link the CLI to a project using an upload token
|
|
35
|
+
- `arcvision scan [directory]` - Scan a directory and generate architecture map
|
|
36
|
+
- `-u, --upload` - Upload the scan results to the dashboard
|
|
37
|
+
|
|
38
|
+
## Features
|
|
39
|
+
|
|
40
|
+
- Scans JavaScript, TypeScript, JSX, and TSX files
|
|
41
|
+
- Detects import/export relationships
|
|
42
|
+
- Supports plugin system for enhanced analysis (React components, Express routes, etc.)
|
|
43
|
+
- Uploads results to ArcVision dashboard
|
|
44
|
+
- Cross-platform support
|
|
45
|
+
|
|
46
|
+
## Plugin System
|
|
47
|
+
|
|
48
|
+
The CLI includes a plugin system that enhances code analysis:
|
|
49
|
+
|
|
50
|
+
- **React Plugin**: Detects React components and hooks
|
|
51
|
+
- **Express Plugin**: Identifies Express routes and endpoints
|
|
52
|
+
- **Custom Plugins**: Extend functionality with your own plugins
|
|
53
|
+
|
|
54
|
+
## Development
|
|
55
|
+
|
|
56
|
+
To build the CLI from source:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Clone the repository
|
|
60
|
+
git clone <repository-url>
|
|
61
|
+
|
|
62
|
+
# Navigate to CLI directory
|
|
63
|
+
cd cli
|
|
64
|
+
|
|
65
|
+
# Install dependencies
|
|
66
|
+
npm install
|
|
67
|
+
|
|
68
|
+
# Build the CLI
|
|
69
|
+
npm run build
|
|
70
|
+
|
|
71
|
+
# Run in development mode
|
|
72
|
+
npm run dev
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Configuration
|
|
76
|
+
|
|
77
|
+
The CLI stores authentication tokens in `~/.arcvisionrc` in your home directory. This file is created automatically when you run `arcvision link <token>`.
|
|
78
|
+
|
|
79
|
+
## API Integration
|
|
80
|
+
|
|
81
|
+
The CLI uploads scan results to the ArcVision dashboard API. You can configure the API endpoint using the `ARCVISION_API_URL` environment variable:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
export ARCVISION_API_URL="https://your-deployment-url.com"
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Troubleshooting
|
|
88
|
+
|
|
89
|
+
- **Permission errors**: Ensure you have write permissions to the scan directory and config file location
|
|
90
|
+
- **Network errors**: Check your internet connection and API endpoint accessibility
|
|
91
|
+
- **Parse errors**: The scanner skips TypeScript declaration files (.d.ts) by default
|
|
Binary file
|