git-reverse-cli 1.0.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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +123 -0
  3. package/dist/cli.js +2202 -0
  4. package/package.json +62 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 git-reverse contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,123 @@
1
+ # git-reverse
2
+
3
+ Reverse-engineer any GitHub repository into a structured recreation prompt using LLMs.
4
+
5
+ Paste a GitHub URL. Get back a detailed prompt describing how the project was originally built — architecture, tech stack, dependencies, design decisions, and step-by-step recreation instructions.
6
+
7
+ ---
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ npm install -g git-reverse
13
+ ```
14
+
15
+ ## Quick Start
16
+
17
+ ```bash
18
+ git-reverse
19
+ ```
20
+
21
+ On first launch you'll be asked for:
22
+ 1. Your name (stored locally, used in greeting)
23
+ 2. An OpenRouter API key ([get one free at openrouter.ai/keys](https://openrouter.ai/keys))
24
+ 3. A model to use (list of free-tier models shown automatically)
25
+
26
+ ---
27
+
28
+ ## Usage
29
+
30
+ ```
31
+ git-reverse Launch the CLI
32
+ git-reverse --resume <id> Resume a saved session
33
+ git-reverse --version Show version
34
+ git-reverse --help Show help
35
+ ```
36
+
37
+ ### In the CLI
38
+
39
+ Paste a GitHub URL in the input:
40
+ ```
41
+ https://github.com/sindresorhus/ora
42
+ ```
43
+
44
+ With an optional query:
45
+ ```
46
+ https://github.com/vitejs/vite how does the plugin system work?
47
+ https://github.com/vercel/next.js can I convert this to an Electron app?
48
+ ```
49
+
50
+ ---
51
+
52
+ ## Commands
53
+
54
+ Press `\` to open the command palette, or type directly:
55
+
56
+ | Command | Alias | Description |
57
+ |---|---|---|
58
+ | `\settings` | — | Modify username, API key, or model |
59
+ | `\deepdive` | `\learn` | Deeply analyze with educational output |
60
+ | `\compact` | `\summarize` | Summarize the current session |
61
+ | `\resume <id>` | — | Resume a saved session by ID |
62
+ | `\sessions` | — | List all saved sessions |
63
+ | `\quit` | `\exit` | Save session and exit |
64
+
65
+ ---
66
+
67
+ ## Output Format
68
+
69
+ Every analysis produces a structured prompt containing:
70
+
71
+ - **Project Overview** — what it is, core purpose, target user
72
+ - **Tech Stack** — every confirmed dependency with purpose
73
+ - **Architecture** — component relationships, data flow
74
+ - **Directory Structure** — annotated file tree
75
+ - **Key Design Decisions** — why these choices were made
76
+ - **Build & Dev Process** — scripts, tooling, CI
77
+ - **Recreation Steps** — numbered, from git init to working state
78
+ - **Notable Patterns** — code patterns and conventions
79
+ - **Direct Answer** *(if query provided)* — addressed in context
80
+
81
+ ---
82
+
83
+ ## Sessions
84
+
85
+ Every analysis is saved as a session with a unique 8-character ID:
86
+
87
+ ```
88
+ Session saved
89
+ ID: abc12345
90
+ Resume: git-reverse --resume abc12345
91
+ ```
92
+
93
+ Sessions are stored locally at:
94
+ - **Linux/Mac**: `~/.config/git-reverse/`
95
+ - **Windows**: `%APPDATA%\git-reverse\`
96
+
97
+ ---
98
+
99
+ ## Models
100
+
101
+ git-reverse uses [OpenRouter](https://openrouter.ai) to access LLMs. It automatically lists all **free-tier models** after you validate your key. When new free models appear on OpenRouter, git-reverse notifies you on the dashboard.
102
+
103
+ ---
104
+
105
+ ## Settings
106
+
107
+ Run `\settings` to:
108
+ - Change your username
109
+ - Update your OpenRouter API key
110
+ - Switch the active model
111
+ - Refresh the model list
112
+
113
+ ---
114
+
115
+ ## Privacy
116
+
117
+ Everything is stored locally. No telemetry, no analytics, no external storage. Your API key and sessions never leave your machine (except for the OpenRouter API calls you explicitly trigger).
118
+
119
+ ---
120
+
121
+ ## License
122
+
123
+ MIT