@grunnverk/kilde 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/.github/ISSUE_TEMPLATE/bug_report.md +40 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +31 -0
- package/.github/pull_request_template.md +48 -0
- package/.github/workflows/deploy-docs.yml +59 -0
- package/.github/workflows/npm-publish.yml +48 -0
- package/.github/workflows/test.yml +48 -0
- package/CHANGELOG.md +92 -0
- package/CONTRIBUTING.md +438 -0
- package/LICENSE +190 -0
- package/PROJECT_SUMMARY.md +318 -0
- package/README.md +444 -0
- package/RELEASE_CHECKLIST.md +182 -0
- package/dist/application.js +166 -0
- package/dist/application.js.map +1 -0
- package/dist/commands/release.js +326 -0
- package/dist/commands/release.js.map +1 -0
- package/dist/constants.js +122 -0
- package/dist/constants.js.map +1 -0
- package/dist/logging.js +176 -0
- package/dist/logging.js.map +1 -0
- package/dist/main.js +24 -0
- package/dist/main.js.map +1 -0
- package/dist/mcp-server.js +17467 -0
- package/dist/mcp-server.js.map +7 -0
- package/dist/utils/config.js +89 -0
- package/dist/utils/config.js.map +1 -0
- package/docs/AI_GUIDE.md +618 -0
- package/eslint.config.mjs +85 -0
- package/guide/architecture.md +776 -0
- package/guide/commands.md +580 -0
- package/guide/configuration.md +779 -0
- package/guide/mcp-integration.md +708 -0
- package/guide/overview.md +225 -0
- package/package.json +91 -0
- package/scripts/build-mcp.js +115 -0
- package/scripts/test-mcp-compliance.js +254 -0
- package/src/application.ts +246 -0
- package/src/commands/release.ts +450 -0
- package/src/constants.ts +162 -0
- package/src/logging.ts +210 -0
- package/src/main.ts +25 -0
- package/src/mcp/prompts/index.ts +98 -0
- package/src/mcp/resources.ts +121 -0
- package/src/mcp/server.ts +195 -0
- package/src/mcp/tools.ts +219 -0
- package/src/types.ts +131 -0
- package/src/utils/config.ts +181 -0
- package/tests/application.test.ts +114 -0
- package/tests/commands/commit.test.ts +248 -0
- package/tests/commands/release.test.ts +325 -0
- package/tests/constants.test.ts +118 -0
- package/tests/logging.test.ts +142 -0
- package/tests/mcp/prompts/index.test.ts +202 -0
- package/tests/mcp/resources.test.ts +166 -0
- package/tests/mcp/tools.test.ts +211 -0
- package/tests/utils/config.test.ts +212 -0
- package/tsconfig.json +32 -0
- package/vite.config.ts +107 -0
- package/vitest.config.ts +40 -0
- package/website/index.html +14 -0
- package/website/src/App.css +142 -0
- package/website/src/App.tsx +34 -0
- package/website/src/components/Commands.tsx +182 -0
- package/website/src/components/Configuration.tsx +214 -0
- package/website/src/components/Examples.tsx +234 -0
- package/website/src/components/Footer.css +99 -0
- package/website/src/components/Footer.tsx +93 -0
- package/website/src/components/GettingStarted.tsx +94 -0
- package/website/src/components/Hero.css +95 -0
- package/website/src/components/Hero.tsx +50 -0
- package/website/src/components/Navigation.css +102 -0
- package/website/src/components/Navigation.tsx +57 -0
- package/website/src/index.css +36 -0
- package/website/src/main.tsx +10 -0
- package/website/vite.config.ts +12 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const Commands: React.FC = () => {
|
|
4
|
+
return (
|
|
5
|
+
<div className="section">
|
|
6
|
+
<h2>Commands</h2>
|
|
7
|
+
<p>
|
|
8
|
+
Kilde provides two core commands for git automation: <code className="code-inline">commit</code> and{' '}
|
|
9
|
+
<code className="code-inline">release</code>.
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<h3>kilde commit</h3>
|
|
13
|
+
<p>Generate AI-powered commit messages from staged changes.</p>
|
|
14
|
+
|
|
15
|
+
<h4>Basic Usage</h4>
|
|
16
|
+
<div className="code-block">
|
|
17
|
+
<pre>{`# Generate message for staged changes
|
|
18
|
+
kilde commit
|
|
19
|
+
|
|
20
|
+
# Stage all changes and generate message
|
|
21
|
+
kilde commit --add
|
|
22
|
+
|
|
23
|
+
# Generate and commit immediately
|
|
24
|
+
kilde commit --add --sendit`}</pre>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<h4>Common Flags</h4>
|
|
28
|
+
<div className="grid grid-2">
|
|
29
|
+
<div className="card">
|
|
30
|
+
<h3>--add / -a</h3>
|
|
31
|
+
<p>Stage all modified and deleted files before generating the commit message.</p>
|
|
32
|
+
<div className="code-block">
|
|
33
|
+
<pre>kilde commit --add</pre>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div className="card">
|
|
38
|
+
<h3>--sendit / -s</h3>
|
|
39
|
+
<p>Automatically commit without interactive review.</p>
|
|
40
|
+
<div className="code-block">
|
|
41
|
+
<pre>kilde commit --sendit</pre>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<div className="card">
|
|
46
|
+
<h3>--context / -c</h3>
|
|
47
|
+
<p>Provide additional context to the AI for better commit messages.</p>
|
|
48
|
+
<div className="code-block">
|
|
49
|
+
<pre>kilde commit -c "Fix bug #123"</pre>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
<div className="card">
|
|
54
|
+
<h3>--interactive / -i</h3>
|
|
55
|
+
<p>Enable interactive mode to review and edit the generated message.</p>
|
|
56
|
+
<div className="code-block">
|
|
57
|
+
<pre>kilde commit --interactive</pre>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<div className="card">
|
|
62
|
+
<h3>--amend</h3>
|
|
63
|
+
<p>Amend the previous commit instead of creating a new one.</p>
|
|
64
|
+
<div className="code-block">
|
|
65
|
+
<pre>kilde commit --amend</pre>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<div className="card">
|
|
70
|
+
<h3>--dry-run</h3>
|
|
71
|
+
<p>Preview the generated message without committing.</p>
|
|
72
|
+
<div className="code-block">
|
|
73
|
+
<pre>kilde commit --dry-run</pre>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<h3>kilde release</h3>
|
|
79
|
+
<p>Generate release notes from git history.</p>
|
|
80
|
+
|
|
81
|
+
<h4>Basic Usage</h4>
|
|
82
|
+
<div className="code-block">
|
|
83
|
+
<pre>{`# Generate notes for version 1.0.0
|
|
84
|
+
kilde release 1.0.0
|
|
85
|
+
|
|
86
|
+
# Generate notes between tags
|
|
87
|
+
kilde release --from v0.9.0 --to v1.0.0
|
|
88
|
+
|
|
89
|
+
# Generate notes from last tag to HEAD
|
|
90
|
+
kilde release`}</pre>
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
<h4>Common Flags</h4>
|
|
94
|
+
<div className="grid grid-2">
|
|
95
|
+
<div className="card">
|
|
96
|
+
<h3>--from <ref></h3>
|
|
97
|
+
<p>Starting git reference (tag, commit, branch).</p>
|
|
98
|
+
<div className="code-block">
|
|
99
|
+
<pre>kilde release --from v1.0.0</pre>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
|
|
103
|
+
<div className="card">
|
|
104
|
+
<h3>--to <ref></h3>
|
|
105
|
+
<p>Ending git reference (tag, commit, branch).</p>
|
|
106
|
+
<div className="code-block">
|
|
107
|
+
<pre>kilde release --to HEAD</pre>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
|
|
111
|
+
<div className="card">
|
|
112
|
+
<h3>--output / -o</h3>
|
|
113
|
+
<p>Write release notes to a file instead of stdout.</p>
|
|
114
|
+
<div className="code-block">
|
|
115
|
+
<pre>kilde release -o RELEASE.md</pre>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
|
|
119
|
+
<div className="card">
|
|
120
|
+
<h3>--focus</h3>
|
|
121
|
+
<p>Focus on specific areas (comma-separated).</p>
|
|
122
|
+
<div className="code-block">
|
|
123
|
+
<pre>kilde release --focus security</pre>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
<div className="card">
|
|
128
|
+
<h3>--interactive / -i</h3>
|
|
129
|
+
<p>Review and edit release notes before saving.</p>
|
|
130
|
+
<div className="code-block">
|
|
131
|
+
<pre>kilde release --interactive</pre>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
<div className="card">
|
|
136
|
+
<h3>--dry-run</h3>
|
|
137
|
+
<p>Preview release notes without saving.</p>
|
|
138
|
+
<div className="code-block">
|
|
139
|
+
<pre>kilde release --dry-run</pre>
|
|
140
|
+
</div>
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
<h3>Global Flags</h3>
|
|
145
|
+
<div className="grid grid-2">
|
|
146
|
+
<div className="card">
|
|
147
|
+
<h3>--debug</h3>
|
|
148
|
+
<p>Enable debug logging to see detailed execution information.</p>
|
|
149
|
+
<div className="code-block">
|
|
150
|
+
<pre>kilde commit --debug</pre>
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
|
|
154
|
+
<div className="card">
|
|
155
|
+
<h3>--config <path></h3>
|
|
156
|
+
<p>Specify a custom configuration file location.</p>
|
|
157
|
+
<div className="code-block">
|
|
158
|
+
<pre>kilde commit --config custom.yaml</pre>
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
|
|
162
|
+
<div className="card">
|
|
163
|
+
<h3>--version</h3>
|
|
164
|
+
<p>Display the installed Kilde version.</p>
|
|
165
|
+
<div className="code-block">
|
|
166
|
+
<pre>kilde --version</pre>
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
169
|
+
|
|
170
|
+
<div className="card">
|
|
171
|
+
<h3>--help</h3>
|
|
172
|
+
<p>Display help information for any command.</p>
|
|
173
|
+
<div className="code-block">
|
|
174
|
+
<pre>kilde commit --help</pre>
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
);
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
export default Commands;
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const Configuration: React.FC = () => {
|
|
4
|
+
return (
|
|
5
|
+
<div className="section">
|
|
6
|
+
<h2>Configuration</h2>
|
|
7
|
+
<p>
|
|
8
|
+
Kilde supports flexible configuration via YAML or JSON files in multiple locations.
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<h3>Configuration Locations</h3>
|
|
12
|
+
<p>Kilde searches for configuration files in this order:</p>
|
|
13
|
+
<div className="card">
|
|
14
|
+
<ol style={{ paddingLeft: '1.5rem', color: 'var(--color-text-secondary)' }}>
|
|
15
|
+
<li>CLI <code className="code-inline">--config</code> flag</li>
|
|
16
|
+
<li>Project config: <code className="code-inline">.kilde/config.yaml</code></li>
|
|
17
|
+
<li>Project root: <code className="code-inline">.kilderc.yaml</code></li>
|
|
18
|
+
<li>User home: <code className="code-inline">~/.kilde/config.yaml</code></li>
|
|
19
|
+
</ol>
|
|
20
|
+
<p style={{ marginTop: '1rem' }}>
|
|
21
|
+
Files are merged with later files taking precedence, allowing global defaults with project-specific overrides.
|
|
22
|
+
</p>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<h3>Basic Configuration</h3>
|
|
26
|
+
<div className="code-block">
|
|
27
|
+
<pre>{`# .kilde/config.yaml
|
|
28
|
+
commit:
|
|
29
|
+
type: conventional
|
|
30
|
+
autoStage: false
|
|
31
|
+
ai:
|
|
32
|
+
model: gpt-4
|
|
33
|
+
temperature: 0.7
|
|
34
|
+
|
|
35
|
+
release:
|
|
36
|
+
format: markdown
|
|
37
|
+
includeHashes: true`}</pre>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<h3>Commit Configuration</h3>
|
|
41
|
+
<div className="grid grid-2">
|
|
42
|
+
<div className="card">
|
|
43
|
+
<h3>commit.type</h3>
|
|
44
|
+
<p>Commit message format style.</p>
|
|
45
|
+
<div className="code-block">
|
|
46
|
+
<pre>{`commit:
|
|
47
|
+
type: conventional # or 'simple'`}</pre>
|
|
48
|
+
</div>
|
|
49
|
+
<p>
|
|
50
|
+
<strong>conventional</strong>: Follows Conventional Commits format
|
|
51
|
+
<br />
|
|
52
|
+
<strong>simple</strong>: Plain commit messages
|
|
53
|
+
</p>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<div className="card">
|
|
57
|
+
<h3>commit.autoStage</h3>
|
|
58
|
+
<p>Automatically stage changes before committing.</p>
|
|
59
|
+
<div className="code-block">
|
|
60
|
+
<pre>{`commit:
|
|
61
|
+
autoStage: true`}</pre>
|
|
62
|
+
</div>
|
|
63
|
+
<p>Equivalent to <code className="code-inline">git add -A</code> before generating message.</p>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<div className="card">
|
|
67
|
+
<h3>commit.ai.model</h3>
|
|
68
|
+
<p>AI model to use for commit messages.</p>
|
|
69
|
+
<div className="code-block">
|
|
70
|
+
<pre>{`commit:
|
|
71
|
+
ai:
|
|
72
|
+
model: gpt-4 # or gpt-3.5-turbo`}</pre>
|
|
73
|
+
</div>
|
|
74
|
+
<p>Supports OpenAI and Anthropic models.</p>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<div className="card">
|
|
78
|
+
<h3>commit.ai.temperature</h3>
|
|
79
|
+
<p>Creativity level for AI responses (0.0 to 1.0).</p>
|
|
80
|
+
<div className="code-block">
|
|
81
|
+
<pre>{`commit:
|
|
82
|
+
ai:
|
|
83
|
+
temperature: 0.5 # More focused`}</pre>
|
|
84
|
+
</div>
|
|
85
|
+
<p>Lower values are more deterministic.</p>
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
<div className="card">
|
|
89
|
+
<h3>commit.contextFiles</h3>
|
|
90
|
+
<p>Files to always include for context.</p>
|
|
91
|
+
<div className="code-block">
|
|
92
|
+
<pre>{`commit:
|
|
93
|
+
contextFiles:
|
|
94
|
+
- CHANGELOG.md
|
|
95
|
+
- README.md`}</pre>
|
|
96
|
+
</div>
|
|
97
|
+
<p>Provides consistent context to the AI.</p>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
|
|
101
|
+
<h3>Release Configuration</h3>
|
|
102
|
+
<div className="grid grid-2">
|
|
103
|
+
<div className="card">
|
|
104
|
+
<h3>release.format</h3>
|
|
105
|
+
<p>Output format for release notes.</p>
|
|
106
|
+
<div className="code-block">
|
|
107
|
+
<pre>{`release:
|
|
108
|
+
format: markdown # or 'plain'`}</pre>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
|
|
112
|
+
<div className="card">
|
|
113
|
+
<h3>release.includeHashes</h3>
|
|
114
|
+
<p>Include commit hashes in release notes.</p>
|
|
115
|
+
<div className="code-block">
|
|
116
|
+
<pre>{`release:
|
|
117
|
+
includeHashes: true`}</pre>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
<div className="card">
|
|
122
|
+
<h3>release.groupBy</h3>
|
|
123
|
+
<p>How to group commits in release notes.</p>
|
|
124
|
+
<div className="code-block">
|
|
125
|
+
<pre>{`release:
|
|
126
|
+
groupBy: type # or 'scope', 'none'`}</pre>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
<div className="card">
|
|
131
|
+
<h3>release.focus</h3>
|
|
132
|
+
<p>Default focus areas for release notes.</p>
|
|
133
|
+
<div className="code-block">
|
|
134
|
+
<pre>{`release:
|
|
135
|
+
focus:
|
|
136
|
+
- features
|
|
137
|
+
- security`}</pre>
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
141
|
+
|
|
142
|
+
<h3>Environment Variables</h3>
|
|
143
|
+
<div className="card">
|
|
144
|
+
<h3>API Keys</h3>
|
|
145
|
+
<div className="code-block">
|
|
146
|
+
<pre>{`# OpenAI
|
|
147
|
+
export OPENAI_API_KEY=sk-...
|
|
148
|
+
|
|
149
|
+
# Anthropic
|
|
150
|
+
export ANTHROPIC_API_KEY=sk-ant-...`}</pre>
|
|
151
|
+
</div>
|
|
152
|
+
|
|
153
|
+
<h3>Other Variables</h3>
|
|
154
|
+
<div className="code-block">
|
|
155
|
+
<pre>{`# Override config directory
|
|
156
|
+
export KILDE_CONFIG_DIR=/custom/path
|
|
157
|
+
|
|
158
|
+
# Set log level
|
|
159
|
+
export KILDE_LOG_LEVEL=debug`}</pre>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
|
|
163
|
+
<h3>Complete Example</h3>
|
|
164
|
+
<div className="code-block">
|
|
165
|
+
<pre>{`# .kilde/config.yaml
|
|
166
|
+
commit:
|
|
167
|
+
type: conventional
|
|
168
|
+
autoStage: false
|
|
169
|
+
autoCommit: false
|
|
170
|
+
autoPush: false
|
|
171
|
+
contextFiles:
|
|
172
|
+
- CHANGELOG.md
|
|
173
|
+
- ARCHITECTURE.md
|
|
174
|
+
ai:
|
|
175
|
+
model: gpt-4
|
|
176
|
+
temperature: 0.7
|
|
177
|
+
maxTokens: 500
|
|
178
|
+
format:
|
|
179
|
+
maxLineLength: 72
|
|
180
|
+
scopeRequired: true
|
|
181
|
+
|
|
182
|
+
release:
|
|
183
|
+
format: markdown
|
|
184
|
+
includeHashes: true
|
|
185
|
+
includeAuthors: true
|
|
186
|
+
groupBy: type
|
|
187
|
+
focus:
|
|
188
|
+
- features
|
|
189
|
+
- breaking
|
|
190
|
+
- security
|
|
191
|
+
ai:
|
|
192
|
+
model: gpt-4
|
|
193
|
+
temperature: 0.5
|
|
194
|
+
maxTokens: 2000
|
|
195
|
+
|
|
196
|
+
mcp:
|
|
197
|
+
name: kilde
|
|
198
|
+
version: 0.1.0
|
|
199
|
+
tools:
|
|
200
|
+
- kilde_commit
|
|
201
|
+
- kilde_release
|
|
202
|
+
resources:
|
|
203
|
+
- config
|
|
204
|
+
- status
|
|
205
|
+
- workspace
|
|
206
|
+
prompts:
|
|
207
|
+
- commit-workflow
|
|
208
|
+
- release-workflow`}</pre>
|
|
209
|
+
</div>
|
|
210
|
+
</div>
|
|
211
|
+
);
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
export default Configuration;
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const Examples: React.FC = () => {
|
|
4
|
+
return (
|
|
5
|
+
<div className="section">
|
|
6
|
+
<h2>Examples</h2>
|
|
7
|
+
<p>Real-world examples of using Kilde in different workflows.</p>
|
|
8
|
+
|
|
9
|
+
<h3>Quick Commit Workflow</h3>
|
|
10
|
+
<div className="card">
|
|
11
|
+
<p>Fast iteration with automatic staging and committing:</p>
|
|
12
|
+
<div className="code-block">
|
|
13
|
+
<pre>{`# Make changes
|
|
14
|
+
echo "export const API_URL = 'https://api.example.com';" > config.ts
|
|
15
|
+
|
|
16
|
+
# Quick commit
|
|
17
|
+
kilde commit --add --sendit
|
|
18
|
+
|
|
19
|
+
# Generated commit:
|
|
20
|
+
# feat(config): add API URL configuration
|
|
21
|
+
#
|
|
22
|
+
# Define API_URL constant for external service integration.`}</pre>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<h3>Interactive Review</h3>
|
|
27
|
+
<div className="card">
|
|
28
|
+
<p>Review and edit AI-generated messages:</p>
|
|
29
|
+
<div className="code-block">
|
|
30
|
+
<pre>{`# Stage changes
|
|
31
|
+
git add .
|
|
32
|
+
|
|
33
|
+
# Generate and review
|
|
34
|
+
kilde commit --interactive
|
|
35
|
+
|
|
36
|
+
# Interactive prompt shows:
|
|
37
|
+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
38
|
+
# fix(auth): resolve session timeout issue
|
|
39
|
+
#
|
|
40
|
+
# Update session refresh logic to handle
|
|
41
|
+
# edge cases properly.
|
|
42
|
+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
43
|
+
#
|
|
44
|
+
# [a] Accept [e] Edit [r] Regenerate [c] Cancel`}</pre>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<h3>Commit with Context</h3>
|
|
49
|
+
<div className="card">
|
|
50
|
+
<p>Provide additional context for better messages:</p>
|
|
51
|
+
<div className="code-block">
|
|
52
|
+
<pre>{`# Complex change that needs context
|
|
53
|
+
kilde commit --add --context "Implement rate limiting per issue #456"
|
|
54
|
+
|
|
55
|
+
# Generated commit:
|
|
56
|
+
# feat(api): implement rate limiting
|
|
57
|
+
#
|
|
58
|
+
# Add rate limiting middleware to prevent API abuse.
|
|
59
|
+
# Implements the solution proposed in issue #456 with
|
|
60
|
+
# a token bucket algorithm.`}</pre>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<h3>Release Notes Generation</h3>
|
|
65
|
+
<div className="card">
|
|
66
|
+
<p>Generate release notes for a new version:</p>
|
|
67
|
+
<div className="code-block">
|
|
68
|
+
<pre>{`# Generate notes for v2.0.0
|
|
69
|
+
kilde release 2.0.0 --output RELEASE_NOTES.md
|
|
70
|
+
|
|
71
|
+
# Generated content in RELEASE_NOTES.md:
|
|
72
|
+
# # Release v2.0.0
|
|
73
|
+
#
|
|
74
|
+
# ## Features
|
|
75
|
+
# - Add OAuth2 authentication
|
|
76
|
+
# - Implement user profile management
|
|
77
|
+
# - Add role-based access control
|
|
78
|
+
#
|
|
79
|
+
# ## Bug Fixes
|
|
80
|
+
# - Fix session timeout handling
|
|
81
|
+
# - Resolve memory leak in auth service
|
|
82
|
+
#
|
|
83
|
+
# ## Breaking Changes
|
|
84
|
+
# - API endpoints now require authentication
|
|
85
|
+
# - Update minimum Node.js version to 18`}</pre>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
<h3>Release Notes Between Tags</h3>
|
|
90
|
+
<div className="card">
|
|
91
|
+
<p>Generate notes for a specific range:</p>
|
|
92
|
+
<div className="code-block">
|
|
93
|
+
<pre>{`# Notes between two versions
|
|
94
|
+
kilde release --from v1.9.0 --to v2.0.0 --interactive
|
|
95
|
+
|
|
96
|
+
# Focus on security changes
|
|
97
|
+
kilde release 2.0.0 --focus security,breaking`}</pre>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
|
|
101
|
+
<h3>MCP Integration with Claude</h3>
|
|
102
|
+
<div className="card">
|
|
103
|
+
<p>Use Kilde through Claude Desktop:</p>
|
|
104
|
+
<div className="code-block">
|
|
105
|
+
<pre>{`You: Create a commit for my staged changes
|
|
106
|
+
|
|
107
|
+
Claude: I'll generate a commit message using Kilde.
|
|
108
|
+
|
|
109
|
+
[Uses kilde_commit tool]
|
|
110
|
+
|
|
111
|
+
Generated commit message:
|
|
112
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
113
|
+
feat(auth): add OAuth2 authentication
|
|
114
|
+
|
|
115
|
+
Implement OAuth2 flow with support for
|
|
116
|
+
Google and GitHub providers. Includes
|
|
117
|
+
token refresh and secure storage.
|
|
118
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
119
|
+
|
|
120
|
+
Would you like me to create this commit?
|
|
121
|
+
|
|
122
|
+
You: Yes
|
|
123
|
+
|
|
124
|
+
Claude: Commit created successfully!`}</pre>
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
<h3>Amend Previous Commit</h3>
|
|
129
|
+
<div className="card">
|
|
130
|
+
<p>Fix or update the last commit:</p>
|
|
131
|
+
<div className="code-block">
|
|
132
|
+
<pre>{`# Made a mistake in last commit
|
|
133
|
+
echo "// Fixed typo" >> auth.ts
|
|
134
|
+
|
|
135
|
+
# Amend the commit
|
|
136
|
+
kilde commit --add --amend
|
|
137
|
+
|
|
138
|
+
# The AI will generate an updated message
|
|
139
|
+
# that incorporates both the original and new changes`}</pre>
|
|
140
|
+
</div>
|
|
141
|
+
</div>
|
|
142
|
+
|
|
143
|
+
<h3>Dry Run Testing</h3>
|
|
144
|
+
<div className="card">
|
|
145
|
+
<p>Preview generated messages without committing:</p>
|
|
146
|
+
<div className="code-block">
|
|
147
|
+
<pre>{`# Test commit message generation
|
|
148
|
+
kilde commit --add --dry-run
|
|
149
|
+
|
|
150
|
+
# Output shows:
|
|
151
|
+
# - Generated commit message
|
|
152
|
+
# - Affected files
|
|
153
|
+
# - Diff summary
|
|
154
|
+
# - Configuration used
|
|
155
|
+
#
|
|
156
|
+
# No actual commit is created`}</pre>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
|
|
160
|
+
<h3>Complete Release Workflow</h3>
|
|
161
|
+
<div className="card">
|
|
162
|
+
<p>Full release process with tagging and pushing:</p>
|
|
163
|
+
<div className="code-block">
|
|
164
|
+
<pre>{`# 1. Ensure all changes are committed
|
|
165
|
+
git status
|
|
166
|
+
|
|
167
|
+
# 2. Generate release notes interactively
|
|
168
|
+
kilde release 1.5.0 --interactive --output RELEASE_NOTES.md
|
|
169
|
+
|
|
170
|
+
# 3. Review and commit release notes
|
|
171
|
+
git add RELEASE_NOTES.md
|
|
172
|
+
kilde commit --sendit
|
|
173
|
+
|
|
174
|
+
# 4. Create and push tag
|
|
175
|
+
git tag v1.5.0
|
|
176
|
+
git push origin main --tags
|
|
177
|
+
|
|
178
|
+
# 5. Create GitHub release (optional)
|
|
179
|
+
gh release create v1.5.0 --notes-file RELEASE_NOTES.md`}</pre>
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
182
|
+
|
|
183
|
+
<h3>Language-Agnostic Usage</h3>
|
|
184
|
+
<div className="card">
|
|
185
|
+
<p>Works with any programming language:</p>
|
|
186
|
+
<div className="code-block">
|
|
187
|
+
<pre>{`# Python project
|
|
188
|
+
cd my-python-app
|
|
189
|
+
kilde commit --add
|
|
190
|
+
|
|
191
|
+
# Go project
|
|
192
|
+
cd my-go-service
|
|
193
|
+
kilde commit --add
|
|
194
|
+
|
|
195
|
+
# Rust project
|
|
196
|
+
cd my-rust-lib
|
|
197
|
+
kilde commit --add
|
|
198
|
+
|
|
199
|
+
# Java project
|
|
200
|
+
cd my-java-api
|
|
201
|
+
kilde commit --add
|
|
202
|
+
|
|
203
|
+
# All generate appropriate commit messages
|
|
204
|
+
# based on the actual code changes, regardless
|
|
205
|
+
# of the programming language`}</pre>
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
|
|
209
|
+
<h3>Team Configuration</h3>
|
|
210
|
+
<div className="card">
|
|
211
|
+
<p>Share configuration across your team:</p>
|
|
212
|
+
<div className="code-block">
|
|
213
|
+
<pre>{`# Commit team config to repository
|
|
214
|
+
# .kilde/config.yaml
|
|
215
|
+
commit:
|
|
216
|
+
type: conventional
|
|
217
|
+
format:
|
|
218
|
+
maxLineLength: 72
|
|
219
|
+
scopeRequired: true
|
|
220
|
+
contextFiles:
|
|
221
|
+
- ARCHITECTURE.md
|
|
222
|
+
|
|
223
|
+
# Individual developers can override in ~/.kilde/config.yaml
|
|
224
|
+
commit:
|
|
225
|
+
autoStage: true # Personal preference
|
|
226
|
+
ai:
|
|
227
|
+
model: gpt-3.5-turbo # Faster for dev work`}</pre>
|
|
228
|
+
</div>
|
|
229
|
+
</div>
|
|
230
|
+
</div>
|
|
231
|
+
);
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
export default Examples;
|