@bitsness/grapuco-cli 0.1.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.
Files changed (3) hide show
  1. package/README.md +125 -0
  2. package/dist/index.js +6780 -0
  3. package/package.json +50 -0
package/README.md ADDED
@@ -0,0 +1,125 @@
1
+ # @bitsness/grapuco-cli
2
+
3
+ **Parse your code locally, sync architecture to cloud. Zero source code upload.**
4
+
5
+ Your source code never leaves your machine. Grapuco CLI parses your code locally using AST analysis, then syncs only the architectural metadata (function names, class structures, call relationships) to the Grapuco cloud for visualization and AI-powered analysis.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install -g @bitsness/grapuco-cli
11
+ ```
12
+
13
+ ## Quick Start
14
+
15
+ ```bash
16
+ # 1. Authenticate
17
+ grapuco login --api-key YOUR_API_KEY
18
+
19
+ # 2. Initialize in your project
20
+ cd ~/projects/my-app
21
+ grapuco init
22
+
23
+ # 3. Parse & push
24
+ grapuco ingest
25
+
26
+ # 4. Auto-sync on save
27
+ grapuco watch
28
+ ```
29
+
30
+ ## Commands
31
+
32
+ | Command | Description |
33
+ |---------|-------------|
34
+ | `grapuco login` | Authenticate with your API key |
35
+ | `grapuco init` | Initialize Grapuco in your project directory |
36
+ | `grapuco ingest` | Full parse + push (first time) |
37
+ | `grapuco push` | Delta sync (only changed files) |
38
+ | `grapuco watch` | Auto-sync on file changes |
39
+ | `grapuco status` | Show sync status |
40
+ | `grapuco inspect` | Preview what data will be sent (transparency) |
41
+
42
+ ## Flags
43
+
44
+ ### `grapuco ingest`
45
+ - `--embeddings` / `--no-embeddings` — Toggle AI embeddings for semantic search
46
+ - `--flows` / `--no-flows` — Toggle data flow analysis
47
+ - `--all` — Enable all features
48
+ - `--dry-run` — Parse only, don't push
49
+
50
+ ### `grapuco push`
51
+ - `--force` — Force full re-push (ignore delta cache)
52
+
53
+ ### `grapuco watch`
54
+ - `--debounce <ms>` — Debounce interval (default: 2000ms)
55
+
56
+ ## How It Works
57
+
58
+ ```
59
+ ┌─────────── Your Machine ────────────┐
60
+ │ │
61
+ │ grapuco ingest │
62
+ │ ↓ │
63
+ │ Scan files → Parse AST → Extract │
64
+ │ definitions (functions, classes, │
65
+ │ methods, interfaces) │
66
+ │ ↓ │
67
+ │ Output: nodes + edges │
68
+ │ (NO source code included) │
69
+ │ │
70
+ └──────────────────────────────────────┘
71
+
72
+ │ Only metadata
73
+
74
+ ┌─────────── Grapuco Cloud ───────────┐
75
+ │ │
76
+ │ Graph DB → Visualization │
77
+ │ AI Embeddings → Semantic Search │
78
+ │ Data Flow Analysis → Impact Maps │
79
+ │ │
80
+ └──────────────────────────────────────┘
81
+ ```
82
+
83
+ ## Project Config
84
+
85
+ After `grapuco init`, a `.grapuco/` directory is created:
86
+
87
+ ```
88
+ .grapuco/
89
+ ├── config.json ← Repository link & settings
90
+ ├── ast-cache/ ← Cached file hashes for delta sync
91
+ │ └── hashes.json
92
+ └── .gitignore ← Ignores ast-cache/
93
+ ```
94
+
95
+ ## Enterprise & Custom Servers
96
+
97
+ If you are using Grapuco Enterprise (On-Premise or Private Cloud), you can override the default server URL using any of the following methods:
98
+
99
+ **1. Environment Variables (Recommended for CI/CD)**
100
+ ```bash
101
+ export GRAPUCO_SERVER="https://grapuco.internal.company.com"
102
+ export GRAPUCO_API_KEY="your-secret-key"
103
+ grapuco ingest
104
+ ```
105
+
106
+ **2. Global Configuration**
107
+ ```bash
108
+ grapuco login --api-key your-secret-key --server https://grapuco.internal.company.com
109
+ ```
110
+
111
+ **3. Per-Project Configuration**
112
+ ```bash
113
+ grapuco init --server https://grapuco.internal.company.com
114
+ ```
115
+
116
+ ## Privacy
117
+
118
+ - ✅ Source code is parsed **locally** on your machine
119
+ - ✅ Only architectural metadata (function/class names, relationships) is synced
120
+ - ✅ Run `grapuco inspect` to see exactly what data is sent
121
+ - ✅ No source code content is ever transmitted to the server
122
+
123
+ ## License
124
+
125
+ MIT