File size: 12,364 Bytes
fadc4bc
 
 
 
 
 
6bebf5c
 
fadc4bc
 
 
6bebf5c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fadc4bc
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
<!doctype html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <link rel="stylesheet" href="style.css" />
    <title>CodeMind - AI-Powered Development Assistant</title>
</head>

<body>
    <!-- Header -->
    <header>
        <div class="container">
            <nav>
                <div class="logo">
                    <span class="logo-icon">πŸ”§</span> CodeMind
                </div>
                <ul class="nav-links">
                    <li><a href="#features">Features</a></li>
                    <li><a href="#why">Why CodeMind</a></li>
                    <li><a href="#how">How It Works</a></li>
                    <li><a href="#usage">Usage</a></li>
                    <li><a href="#setup">Setup</a></li>
                </ul>
            </nav>
        </div>
    </header>

    <!-- Hero Section -->
    <section class="hero">
        <div class="container">
            <h1>AI-Powered Development Assistant</h1>
            <p>CodeMind is an AI-powered development assistant that runs entirely on your local machine for intelligent
                document analysis and commit message generation.</p>
            <a href="#setup" class="btn">Get Started</a>
            <a href="#features" class="btn btn-outline">Learn More</a>
        </div>
    </section>

    <!-- Features Section -->
    <section id="features" class="features">
        <div class="container">
            <h2>Features</h2>
            <div class="features-grid">
                <div class="feature-card">
                    <div class="feature-icon">πŸ“„</div>
                    <h3>Document Embedding</h3>
                    <p>Using EmbeddingGemma-300m to create semantic representations of your documentation and code.</p>
                </div>
                <div class="feature-card">
                    <div class="feature-icon">πŸ”</div>
                    <h3>Semantic Search</h3>
                    <p>Using FAISS for vector similarity search to find relevant content based on meaning, not just
                        keywords.</p>
                </div>
                <div class="feature-card">
                    <div class="feature-icon">πŸ’¬</div>
                    <h3>Commit Message Generation</h3>
                    <p>Automatically generate descriptive commit messages based on your changes using Phi-2 model.</p>
                </div>
                <div class="feature-card">
                    <div class="feature-icon">πŸ€–</div>
                    <h3>Retrieval-Augmented Generation</h3>
                    <p>Answers questions using your indexed document context for accurate, relevant responses.</p>
                </div>
                <div class="feature-card">
                    <div class="feature-icon">πŸ’»</div>
                    <h3>Local Processing</h3>
                    <p>All AI processing happens on your machine with no data sent to cloud services.</p>
                </div>
                <div class="feature-card">
                    <div class="feature-icon">βš™οΈ</div>
                    <h3>Flexible Configuration</h3>
                    <p>Customize models and parameters to suit your specific needs and preferences.</p>
                </div>
            </div>
        </div>
    </section>

    <!-- Why Section -->
    <section id="why" class="why">
        <div class="container">
            <h2>Why CodeMind?</h2>
            <div class="why-content">
                <p>CodeMind brings together document semantic search, retrieval-augmented Q&A, and AI-powered commit
                    message generation to help you work faster and smarter by leveraging your own project context.</p>

                <h3>Efficient Knowledge Retrieval</h3>
                <p>Makes searching and querying documentation more powerful by using semantic embeddings rather than
                    keyword search.</p>

                <h3>Smarter Git Workflow</h3>
                <p>Automates the creation of meaningful commit messages by analyzing git diffs and using an LLM to
                    summarize changes.</p>

                <h3>AI-Powered Documentation</h3>
                <p>Enables you to ask questions about your project, using your own docs/context rather than just generic
                    answers.</p>
            </div>
        </div>
    </section>

    <!-- How It Works -->
    <section id="how" class="how">
        <div class="container">
            <h2>How It Works</h2>
            <div class="how-steps">
                <div class="step">
                    <div class="step-number">1</div>
                    <div class="step-content">
                        <h3>Document Indexing</h3>
                        <p>The app uses EmbeddingGemma-300m via sentence-transformers to embed documents. Embeddings are
                            normalized and stored in a FAISS vector index for efficient similarity search. Metadata
                            (document text and filenames) are stored alongside the index.</p>
                    </div>
                </div>
                <div class="step">
                    <div class="step-number">2</div>
                    <div class="step-content">
                        <h3>Semantic Search</h3>
                        <p>When you search, your query is embedded using the same embedding model. FAISS searches for
                            the most similar documents based on cosine similarity. Results are filtered by a similarity
                            threshold and returned with scores.</p>
                    </div>
                </div>
                <div class="step">
                    <div class="step-number">3</div>
                    <div class="step-content">
                        <h3>Retrieval-Augmented Generation (RAG)</h3>
                        <p>When you ask a question, the system retrieves relevant docs (via semantic search). The
                            retrieved context is fed to the Phi-2 LLM, which generates an answer using both your
                            question and the context.</p>
                    </div>
                </div>
                <div class="step">
                    <div class="step-number">4</div>
                    <div class="step-content">
                        <h3>Commit Message Generation</h3>
                        <p>Analyzes your staged git changes (via a diff analyzer). Summarizes changes and sends them to
                            the Phi-2 LLM, which generates a commit message aligned to your config (tone, style,
                            length).</p>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Usage -->
    <section id="usage" class="usage">
        <div class="container">
            <h2>Usage Examples</h2>

            <h3>Index Your Documentation</h3>
            <div class="code-block">
                <span class="code-comment"># Index documents in the docs directory</span><br>
                python cli.py init ./docs/
            </div>

            <h3>Semantic Search</h3>
            <div class="code-block">
                <span class="code-comment"># Search for relevant documentation</span><br>
                python cli.py search "how to configure the model"
            </div>

            <h3>Ask Questions (RAG)</h3>
            <div class="code-block">
                <span class="code-comment"># Ask questions about your project</span><br>
                python cli.py ask "What are the configuration options?"
            </div>

            <h3>Generate Commit Messages</h3>
            <div class="code-block">
                <span class="code-comment"># Preview a generated commit message</span><br>
                python cli.py commit --preview<br><br>

                <span class="code-comment"># Generate and apply commit message</span><br>
                python cli.py commit --apply
            </div>
        </div>
    </section>

    <!-- Setup -->
    <section id="setup" class="setup">
        <div class="container">
            <h2>Setup & Installation</h2>

            <div class="setup-cards">
                <div class="setup-card">
                    <h3>Prerequisites</h3>
                    <ul>
                        <li>Python 3.8 or higher</li>
                        <li>8GB+ RAM recommended</li>
                        <li>4GB+ disk space for model files</li>
                        <li>Git for repository cloning</li>
                    </ul>
                </div>

                <div class="setup-card">
                    <h3>Installation</h3>
                    <div class="code-block">
                        <span class="code-comment"># Clone the repository</span><br>
                        git clone https://github.com/devjas1/codemind.git<br>
                        cd codemind<br><br>

                        <span class="code-comment"># Create virtual environment</span><br>
                        python -m venv venv<br><br>

                        <span class="code-comment"># Activate on macOS/Linux</span><br>
                        source venv/bin/activate<br><br>

                        <span class="code-comment"># Install dependencies</span><br>
                        pip install -r requirements.txt
                    </div>
                </div>

                <div class="setup-card">
                    <h3>Model Setup</h3>
                    <p>Download these models:</p>
                    <ul>
                        <li>Phi-2 Model for commit message generation</li>
                        <li>EmbeddingGemma-300m for document embedding</li>
                    </ul>
                    <p>Place them in the models/ directory as specified in the configuration.</p>
                </div>
            </div>
        </div>
    </section>

    <!-- FAQ -->
    <section class="faq">
        <div class="container">
            <h2>Frequently Asked Questions</h2>

            <div class="faq-list">
                <div class="faq-item">
                    <div class="faq-question">Can I use different models?</div>
                    <p>Yes, you can use any GGUF-compatible model for generation and any SentenceTransformers-compatible
                        model for embeddings. Update the paths in config.yaml accordingly.</p>
                </div>

                <div class="faq-item">
                    <div class="faq-question">How much RAM do I need?</div>
                    <p>For the Phi-2 Q4_0 model, 8GB RAM is recommended. Larger models will require more memory.</p>
                </div>

                <div class="faq-item">
                    <div class="faq-question">Is my data sent to the cloud?</div>
                    <p>No, all processing happens locally on your machine. No code or data is sent to external services.
                    </p>
                </div>

                <div class="faq-item">
                    <div class="faq-question">How often should I re-index my documents?</div>
                    <p>Re-index whenever your documentation or codebase changes significantly to keep search results
                        relevant.</p>
                </div>
            </div>
        </div>
    </section>

    <!-- Footer -->
    <footer>
        <div class="container">
            <div class="logo">
                <span class="logo-icon">πŸ”§</span> CodeMind
            </div>
            <p>AI-powered development assistant for your local machine</p>

            <ul class="footer-links">
                <li><a href="#features">Features</a></li>
                <li><a href="#why">Why</a></li>
                <li><a href="#how">How It Works</a></li>
                <li><a href="#usage">Usage</a></li>
                <li><a href="#setup">Setup</a></li>
            </ul>

            <p>&copy; 2023 CodeMind. All rights reserved.</p>
        </div>
    </footer>
</body>

</html>