@eldrforge/kodrdriv 0.0.14 → 0.0.17
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 +1 -9
- package/dist/arguments.js +306 -55
- package/dist/arguments.js.map +1 -1
- package/dist/audio/devices.js +284 -0
- package/dist/audio/devices.js.map +1 -0
- package/dist/audio/index.js +31 -0
- package/dist/audio/index.js.map +1 -0
- package/dist/audio/processor.js +766 -0
- package/dist/audio/processor.js.map +1 -0
- package/dist/audio/types.js +16 -0
- package/dist/audio/types.js.map +1 -0
- package/dist/audio/validation.js +35 -0
- package/dist/audio/validation.js.map +1 -0
- package/dist/commands/audio-commit.js +64 -248
- package/dist/commands/audio-commit.js.map +1 -1
- package/dist/commands/audio-review.js +90 -701
- package/dist/commands/audio-review.js.map +1 -1
- package/dist/commands/commit.js +18 -18
- package/dist/commands/commit.js.map +1 -1
- package/dist/commands/release.js +14 -15
- package/dist/commands/release.js.map +1 -1
- package/dist/commands/review.js +152 -0
- package/dist/commands/review.js.map +1 -0
- package/dist/commands/select-audio.js +265 -0
- package/dist/commands/select-audio.js.map +1 -0
- package/dist/constants.js +86 -68
- package/dist/constants.js.map +1 -1
- package/dist/content/diff.js +155 -1
- package/dist/content/diff.js.map +1 -1
- package/dist/content/issues.js +256 -0
- package/dist/content/issues.js.map +1 -0
- package/dist/content/releaseNotes.js +90 -0
- package/dist/content/releaseNotes.js.map +1 -0
- package/dist/main.js +9 -2
- package/dist/main.js.map +1 -1
- package/dist/prompt/instructions/commit.md +18 -15
- package/dist/prompt/instructions/release.md +6 -5
- package/dist/prompt/instructions/{audio-review.md → review.md} +24 -18
- package/dist/prompt/prompts.js +87 -19
- package/dist/prompt/prompts.js.map +1 -1
- package/dist/types.js +27 -3
- package/dist/types.js.map +1 -1
- package/dist/util/general.js +7 -1
- package/dist/util/general.js.map +1 -1
- package/dist/util/openai.js +34 -3
- package/dist/util/openai.js.map +1 -1
- package/dist/util/stdin.js +61 -0
- package/dist/util/stdin.js.map +1 -0
- package/package.json +6 -6
- package/.kodrdriv/config.yaml +0 -20
- package/.kodrdriv/context/content.md +0 -7
- package/RELEASE_NOTES.md +0 -14
- package/docs/index.html +0 -17
- package/docs/package.json +0 -36
- package/docs/pnpm-lock.yaml +0 -3441
- package/docs/public/README.md +0 -132
- package/docs/public/advanced-usage.md +0 -188
- package/docs/public/code-icon.svg +0 -4
- package/docs/public/commands.md +0 -116
- package/docs/public/configuration.md +0 -274
- package/docs/public/examples.md +0 -352
- package/docs/public/kodrdriv-logo.svg +0 -62
- package/docs/src/App.css +0 -387
- package/docs/src/App.tsx +0 -60
- package/docs/src/components/DocumentPage.tsx +0 -56
- package/docs/src/components/ErrorMessage.tsx +0 -15
- package/docs/src/components/LoadingSpinner.tsx +0 -14
- package/docs/src/components/MarkdownRenderer.tsx +0 -56
- package/docs/src/components/Navigation.css +0 -73
- package/docs/src/components/Navigation.tsx +0 -36
- package/docs/src/index.css +0 -61
- package/docs/src/main.tsx +0 -10
- package/docs/src/test/setup.ts +0 -1
- package/docs/src/vite-env.d.ts +0 -10
- package/docs/tsconfig.node.json +0 -13
- package/docs/vite.config.ts +0 -15
- package/docs/vitest.config.ts +0 -15
- package/eslint.config.mjs +0 -83
- package/nodemon.json +0 -14
- package/output/kodrdriv/250701-1442-release-notes.md +0 -3
- package/pnpm-workspace.yaml +0 -5
- package/tsconfig.tsbuildinfo +0 -1
- package/vite.config.ts +0 -90
- package/vitest.config.ts +0 -24
|
@@ -1,274 +0,0 @@
|
|
|
1
|
-
# Configuration
|
|
2
|
-
|
|
3
|
-
KodrDriv provides flexible configuration options through command-line arguments, configuration files, and environment variables. This section covers all available configuration methods and options.
|
|
4
|
-
|
|
5
|
-
## Configuration File
|
|
6
|
-
|
|
7
|
-
You can create a `config.json` file in your `.kodrdriv` directory to set default options for all commands. This allows you to avoid repeating command-line options and ensures consistent behavior across your project.
|
|
8
|
-
|
|
9
|
-
Example configuration file (`.kodrdriv/config.json`):
|
|
10
|
-
|
|
11
|
-
```json
|
|
12
|
-
{
|
|
13
|
-
"model": "gpt-4o-mini",
|
|
14
|
-
"verbose": true,
|
|
15
|
-
"contextDirectories": ["src", "docs"],
|
|
16
|
-
"publish": {
|
|
17
|
-
"mergeMethod": "merge",
|
|
18
|
-
"dependencyUpdatePatterns": ["@company/*", "@myorg/*"],
|
|
19
|
-
"requiredEnvVars": ["NODE_AUTH_TOKEN", "CUSTOM_TOKEN"],
|
|
20
|
-
"linkWorkspacePackages": true,
|
|
21
|
-
"unlinkWorkspacePackages": true
|
|
22
|
-
},
|
|
23
|
-
"commit": {
|
|
24
|
-
"add": true,
|
|
25
|
-
"messageLimit": 5
|
|
26
|
-
},
|
|
27
|
-
"release": {
|
|
28
|
-
"from": "main",
|
|
29
|
-
"to": "HEAD",
|
|
30
|
-
"messageLimit": 10
|
|
31
|
-
},
|
|
32
|
-
"link": {
|
|
33
|
-
"scopeRoots": {
|
|
34
|
-
"@company": "../",
|
|
35
|
-
"@myorg": "../../org-packages/",
|
|
36
|
-
"@tools": "../shared-tools/"
|
|
37
|
-
},
|
|
38
|
-
"workspaceFile": "pnpm-workspace.yaml"
|
|
39
|
-
},
|
|
40
|
-
"excludedPatterns": [
|
|
41
|
-
"node_modules",
|
|
42
|
-
"dist",
|
|
43
|
-
"*.log"
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Configuration options set in the file can be overridden by command-line arguments. The precedence order is:
|
|
49
|
-
1. Command-line arguments (highest priority)
|
|
50
|
-
2. Configuration file
|
|
51
|
-
3. Default values (lowest priority)
|
|
52
|
-
|
|
53
|
-
## Hierarchical Configuration
|
|
54
|
-
|
|
55
|
-
KodrDriv supports hierarchical configuration, which means it will automatically search for and merge configuration files from parent directories. This allows you to set global defaults at higher directory levels while still being able to override them for specific projects.
|
|
56
|
-
|
|
57
|
-
**How it works:**
|
|
58
|
-
|
|
59
|
-
1. **Directory Traversal**: Starting from your current working directory, KodrDriv searches upward through parent directories looking for `.kodrdriv/config.json` or `.kodrdriv/config.yaml` files.
|
|
60
|
-
|
|
61
|
-
2. **Automatic Merging**: Configuration files found in parent directories are merged together, with configurations closer to your current directory taking precedence over those higher up.
|
|
62
|
-
|
|
63
|
-
3. **Final Override**: Command-line arguments have the highest precedence and will override any configuration file settings.
|
|
64
|
-
|
|
65
|
-
**Example Hierarchy:**
|
|
66
|
-
|
|
67
|
-
```
|
|
68
|
-
/home/user/
|
|
69
|
-
├── .kodrdriv/
|
|
70
|
-
│ └── config.json # Global user defaults
|
|
71
|
-
└── projects/
|
|
72
|
-
├── .kodrdriv/
|
|
73
|
-
│ └── config.json # Project-specific defaults
|
|
74
|
-
└── my-app/
|
|
75
|
-
├── .kodrdriv/
|
|
76
|
-
│ └── config.json # App-specific overrides
|
|
77
|
-
└── src/ # Your working directory
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
When running KodrDriv from `/home/user/projects/my-app/src/`, the configuration hierarchy would be:
|
|
81
|
-
|
|
82
|
-
1. **Base defaults** (built into KodrDriv)
|
|
83
|
-
2. **Global config** (`/home/user/.kodrdriv/config.json`)
|
|
84
|
-
3. **Project config** (`/home/user/projects/.kodrdriv/config.json`)
|
|
85
|
-
4. **App config** (`/home/user/projects/my-app/.kodrdriv/config.json`)
|
|
86
|
-
5. **Command-line arguments** (highest priority)
|
|
87
|
-
|
|
88
|
-
**Use Cases:**
|
|
89
|
-
|
|
90
|
-
- **Team Standards**: Store team-wide configuration defaults in your repository root
|
|
91
|
-
- **Personal Preferences**: Keep personal defaults in your home directory
|
|
92
|
-
- **Project-Specific Settings**: Override settings for specific projects or environments
|
|
93
|
-
- **Monorepo Management**: Different packages in a monorepo can have their own settings while inheriting common defaults
|
|
94
|
-
|
|
95
|
-
**Debugging Configuration:**
|
|
96
|
-
|
|
97
|
-
Use the `--check-config` flag to see exactly how your configuration is being merged:
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
kodrdriv --check-config
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
This will show you which configuration files are being loaded and how the final configuration values are determined.
|
|
104
|
-
|
|
105
|
-
## Configuration Directory
|
|
106
|
-
|
|
107
|
-
KodrDriv uses a configuration directory to store custom settings, instructions, and other configuration files. You can specify a custom location using the `--config-dir` option:
|
|
108
|
-
|
|
109
|
-
```bash
|
|
110
|
-
kodrdriv --config-dir ~/custom-kodrdriv-config
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
By default, the configuration directory is set to `.kodrdriv` in your current working directory. This directory is created automatically if it doesn't exist.
|
|
114
|
-
|
|
115
|
-
The configuration directory structure is as follows:
|
|
116
|
-
|
|
117
|
-
```
|
|
118
|
-
.kodrdriv/
|
|
119
|
-
├── instructions/
|
|
120
|
-
│ ├── commit.md # Override for commit instructions
|
|
121
|
-
│ ├── commit-pre.md # Content prepended to default commit instructions
|
|
122
|
-
│ ├── commit-post.md # Content appended to default commit instructions
|
|
123
|
-
│ ├── release.md # Override for release instructions
|
|
124
|
-
│ ├── release-pre.md # Content prepended to default release instructions
|
|
125
|
-
│ └── release-post.md # Content appended to default release instructions
|
|
126
|
-
├── config.json # Main configuration file
|
|
127
|
-
└── ... # Other configuration files
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
## Environment Variables
|
|
131
|
-
|
|
132
|
-
### OpenAI Configuration
|
|
133
|
-
|
|
134
|
-
KodrDriv requires OpenAI API credentials for AI-powered features:
|
|
135
|
-
|
|
136
|
-
- `OPENAI_API_KEY`: OpenAI API key (required)
|
|
137
|
-
|
|
138
|
-
You can also set these via command line:
|
|
139
|
-
|
|
140
|
-
- `--openai-api-key <key>`: OpenAI API key
|
|
141
|
-
- `--model <model>`: OpenAI model to use (default: 'gpt-4o-mini')
|
|
142
|
-
|
|
143
|
-
> [!NOTE]
|
|
144
|
-
> ### Security Considerations
|
|
145
|
-
>
|
|
146
|
-
> The OpenAI API key should be handled securely. While the `--openai-api-key` option is available, it's recommended to use environment variables instead. KodrDriv automatically loads environment variables from a `.env` file in your current working directory.
|
|
147
|
-
>
|
|
148
|
-
> While environment variables are a common approach for configuration, they can still pose security risks if not properly managed. We strongly encourage users to utilize secure credential management solutions like 1Password, HashiCorp Vault, or other keystores to protect sensitive information. This helps prevent accidental exposure of API keys and other credentials in logs, process listings, or environment dumps.
|
|
149
|
-
|
|
150
|
-
### GitHub Configuration
|
|
151
|
-
|
|
152
|
-
For publish command functionality:
|
|
153
|
-
|
|
154
|
-
- `GITHUB_TOKEN`: Required for GitHub API operations (creating pull requests, releases, etc.)
|
|
155
|
-
|
|
156
|
-
### Additional Environment Variables
|
|
157
|
-
|
|
158
|
-
The publish command supports configurable additional environment variables specific to your project:
|
|
159
|
-
|
|
160
|
-
```json
|
|
161
|
-
{
|
|
162
|
-
"publish": {
|
|
163
|
-
"requiredEnvVars": [
|
|
164
|
-
"NODE_AUTH_TOKEN",
|
|
165
|
-
"DEPLOY_KEY",
|
|
166
|
-
"CUSTOM_API_TOKEN",
|
|
167
|
-
"CODECOV_TOKEN"
|
|
168
|
-
]
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
## Content Configuration
|
|
174
|
-
|
|
175
|
-
Control what content is included in analysis:
|
|
176
|
-
|
|
177
|
-
- `-c, --content-types [types...]`: Content types to include in the summary (default: ['diff'])
|
|
178
|
-
- Available types: 'log', 'diff'
|
|
179
|
-
- Can specify multiple types: `--content-types log diff`
|
|
180
|
-
|
|
181
|
-
## Excluded Patterns
|
|
182
|
-
|
|
183
|
-
Filter out specific files or directories from analysis:
|
|
184
|
-
|
|
185
|
-
- `--excluded-paths [excludedPatterns...]`: Paths to exclude from the diff (can specify multiple patterns)
|
|
186
|
-
|
|
187
|
-
Examples:
|
|
188
|
-
```bash
|
|
189
|
-
# Exclude specific files or directories from diff analysis
|
|
190
|
-
kodrdriv commit --excluded-paths "*.lock" "dist/" "node_modules/"
|
|
191
|
-
|
|
192
|
-
# Exclude patterns from release notes
|
|
193
|
-
kodrdriv release --excluded-paths "package-lock.json" "pnpm-lock.yaml"
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
You can also configure excluded patterns in your configuration file:
|
|
197
|
-
|
|
198
|
-
```json
|
|
199
|
-
{
|
|
200
|
-
"excludedPatterns": [
|
|
201
|
-
"node_modules",
|
|
202
|
-
"dist",
|
|
203
|
-
"*.log",
|
|
204
|
-
"*.lock"
|
|
205
|
-
]
|
|
206
|
-
}
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
## Command-Specific Configuration
|
|
210
|
-
|
|
211
|
-
### Commit Configuration
|
|
212
|
-
|
|
213
|
-
```json
|
|
214
|
-
{
|
|
215
|
-
"commit": {
|
|
216
|
-
"add": true,
|
|
217
|
-
"messageLimit": 5,
|
|
218
|
-
"cached": false,
|
|
219
|
-
"sendit": false
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
### Release Configuration
|
|
225
|
-
|
|
226
|
-
```json
|
|
227
|
-
{
|
|
228
|
-
"release": {
|
|
229
|
-
"from": "main",
|
|
230
|
-
"to": "HEAD",
|
|
231
|
-
"messageLimit": 10
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
### Publish Configuration
|
|
237
|
-
|
|
238
|
-
```json
|
|
239
|
-
{
|
|
240
|
-
"publish": {
|
|
241
|
-
"mergeMethod": "squash",
|
|
242
|
-
"dependencyUpdatePatterns": ["@company/*"],
|
|
243
|
-
"requiredEnvVars": ["NODE_AUTH_TOKEN"],
|
|
244
|
-
"linkWorkspacePackages": true,
|
|
245
|
-
"unlinkWorkspacePackages": true
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
### Link Configuration
|
|
251
|
-
|
|
252
|
-
```json
|
|
253
|
-
{
|
|
254
|
-
"link": {
|
|
255
|
-
"scopeRoots": {
|
|
256
|
-
"@company": "../",
|
|
257
|
-
"@myorg": "../../org-packages/"
|
|
258
|
-
},
|
|
259
|
-
"workspaceFile": "pnpm-workspace.yaml"
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
## Basic Options
|
|
265
|
-
|
|
266
|
-
Global options that apply to all commands:
|
|
267
|
-
|
|
268
|
-
- `--dry-run`: Perform a dry run without saving files (default: false)
|
|
269
|
-
- `--verbose`: Enable verbose logging (default: false)
|
|
270
|
-
- `--debug`: Enable debug logging (default: false)
|
|
271
|
-
- `--overrides`: Enable instruction overrides (allows custom instruction files to override defaults)
|
|
272
|
-
- `--config-dir <configDir>`: Specify a custom configuration directory (default: '.kodrdriv')
|
|
273
|
-
- `--check-config`: Display the current configuration hierarchy showing how values are merged from defaults, config files, and CLI arguments. This is useful for debugging configuration issues and understanding which settings are active.
|
|
274
|
-
- `--version`: Display version information
|
package/docs/public/examples.md
DELETED
|
@@ -1,352 +0,0 @@
|
|
|
1
|
-
# Examples
|
|
2
|
-
|
|
3
|
-
This section provides practical examples of using KodrDriv commands in various scenarios.
|
|
4
|
-
|
|
5
|
-
## Basic Usage Examples
|
|
6
|
-
|
|
7
|
-
### Commit Examples
|
|
8
|
-
|
|
9
|
-
Basic commit message generation:
|
|
10
|
-
```bash
|
|
11
|
-
kodrdriv commit
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
Generate a commit message and automatically commit it:
|
|
15
|
-
```bash
|
|
16
|
-
kodrdriv commit --sendit
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Use custom context and message limit:
|
|
20
|
-
```bash
|
|
21
|
-
kodrdriv commit --context "Refactoring for performance" --message-limit 5
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
Work with staged changes only:
|
|
25
|
-
```bash
|
|
26
|
-
git add src/components/
|
|
27
|
-
kodrdriv commit --cached
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### Release Examples
|
|
31
|
-
|
|
32
|
-
Basic release notes generation:
|
|
33
|
-
```bash
|
|
34
|
-
kodrdriv release
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Generate release notes for a specific range:
|
|
38
|
-
```bash
|
|
39
|
-
kodrdriv release --from v1.0.0 --to v1.1.0
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Include both git log and diff information:
|
|
43
|
-
```bash
|
|
44
|
-
kodrdriv release --content-types log diff
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Use custom context for quarterly release:
|
|
48
|
-
```bash
|
|
49
|
-
kodrdriv release --context "Quarterly release, focus on stability" --message-limit 20
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### Publish Examples
|
|
53
|
-
|
|
54
|
-
Basic publish with default settings:
|
|
55
|
-
```bash
|
|
56
|
-
kodrdriv publish
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Publish with different merge methods:
|
|
60
|
-
```bash
|
|
61
|
-
# Use merge commit (preserves individual commits)
|
|
62
|
-
kodrdriv publish --merge-method merge
|
|
63
|
-
|
|
64
|
-
# Use rebase (clean linear history)
|
|
65
|
-
kodrdriv publish --merge-method rebase
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### Link Examples
|
|
69
|
-
|
|
70
|
-
Basic linking with single scope:
|
|
71
|
-
```bash
|
|
72
|
-
kodrdriv link --scope-roots '{"@company": "../"}'
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Multiple scopes with different root directories:
|
|
76
|
-
```bash
|
|
77
|
-
kodrdriv link --scope-roots '{"@company": "../", "@tools": "../../tools/"}'
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
Dry run to preview changes:
|
|
81
|
-
```bash
|
|
82
|
-
kodrdriv link --scope-roots '{"@company": "../"}' --dry-run --verbose
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
Custom workspace file:
|
|
86
|
-
```bash
|
|
87
|
-
kodrdriv link --scope-roots '{"@company": "../"}' --workspace-file "workspace.yaml"
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Real-world example: linking @company packages from company directory:
|
|
91
|
-
```bash
|
|
92
|
-
kodrdriv link --scope-roots '{"@company": "../../company/"}'
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
## Advanced Examples
|
|
96
|
-
|
|
97
|
-
### Using Custom Instructions
|
|
98
|
-
|
|
99
|
-
Use custom instructions from a file:
|
|
100
|
-
```bash
|
|
101
|
-
kodrdriv release --instructions ./my-custom-instructions.md
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
Enable instruction overrides (requires custom instruction files in `.kodrdriv/instructions/`):
|
|
105
|
-
```bash
|
|
106
|
-
kodrdriv commit --overrides
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
Use custom config directory with overrides:
|
|
110
|
-
```bash
|
|
111
|
-
kodrdriv release --config-dir ~/my-kodrdriv-config --overrides
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
### Excluding Patterns
|
|
115
|
-
|
|
116
|
-
Exclude specific files or directories from diff analysis:
|
|
117
|
-
```bash
|
|
118
|
-
kodrdriv commit --excluded-paths "*.lock" "dist/" "node_modules/"
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
Exclude patterns from release notes:
|
|
122
|
-
```bash
|
|
123
|
-
kodrdriv release --excluded-paths "package-lock.json" "pnpm-lock.yaml"
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
### Verbose and Debug Mode
|
|
127
|
-
|
|
128
|
-
Run in verbose mode with a custom OpenAI model:
|
|
129
|
-
```bash
|
|
130
|
-
kodrdriv commit --verbose --model gpt-4
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
Enable debug logging:
|
|
134
|
-
```bash
|
|
135
|
-
kodrdriv release --debug
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
### Configuration Debugging
|
|
139
|
-
|
|
140
|
-
Check current configuration (useful for debugging):
|
|
141
|
-
```bash
|
|
142
|
-
kodrdriv --check-config
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
## Workflow Examples
|
|
146
|
-
|
|
147
|
-
### Development Workflow
|
|
148
|
-
|
|
149
|
-
1. Make changes to your code
|
|
150
|
-
2. Stage the changes you want to commit:
|
|
151
|
-
```bash
|
|
152
|
-
git add src/components/Button.tsx
|
|
153
|
-
```
|
|
154
|
-
3. Generate and commit with a message:
|
|
155
|
-
```bash
|
|
156
|
-
kodrdriv commit --cached --sendit
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
### Release Workflow
|
|
160
|
-
|
|
161
|
-
1. Generate release notes for review:
|
|
162
|
-
```bash
|
|
163
|
-
kodrdriv release --dry-run
|
|
164
|
-
```
|
|
165
|
-
2. Generate and save release notes:
|
|
166
|
-
```bash
|
|
167
|
-
kodrdriv release
|
|
168
|
-
```
|
|
169
|
-
3. Automated publish process:
|
|
170
|
-
```bash
|
|
171
|
-
kodrdriv publish
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
### Monorepo Development Workflow
|
|
175
|
-
|
|
176
|
-
1. Link local packages for development:
|
|
177
|
-
```bash
|
|
178
|
-
kodrdriv link --scope-roots '{"@company": "../", "@tools": "../../tools/"}'
|
|
179
|
-
```
|
|
180
|
-
2. Make changes across packages
|
|
181
|
-
3. Generate commit messages for each package:
|
|
182
|
-
```bash
|
|
183
|
-
cd package-a
|
|
184
|
-
kodrdriv commit --context "Cross-package refactoring"
|
|
185
|
-
cd ../package-b
|
|
186
|
-
kodrdriv commit --context "Cross-package refactoring"
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
## Environment-Specific Examples
|
|
190
|
-
|
|
191
|
-
### CI/CD Pipeline
|
|
192
|
-
|
|
193
|
-
```bash
|
|
194
|
-
# Set required environment variables
|
|
195
|
-
export GITHUB_TOKEN="your-token"
|
|
196
|
-
export OPENAI_API_KEY="your-key"
|
|
197
|
-
export NODE_AUTH_TOKEN="your-npm-token"
|
|
198
|
-
|
|
199
|
-
# Run publish command in CI
|
|
200
|
-
kodrdriv publish --verbose
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
### Local Development
|
|
204
|
-
|
|
205
|
-
```bash
|
|
206
|
-
# Load environment from .env file
|
|
207
|
-
# (KodrDriv automatically loads .env files)
|
|
208
|
-
|
|
209
|
-
# Use specific model for local development
|
|
210
|
-
kodrdriv commit --model gpt-4o-mini --verbose
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
### Team Collaboration
|
|
214
|
-
|
|
215
|
-
```bash
|
|
216
|
-
# Use team-specific configuration
|
|
217
|
-
kodrdriv commit --config-dir ./.team-kodrdriv
|
|
218
|
-
|
|
219
|
-
# Generate release notes with team context
|
|
220
|
-
kodrdriv release --context ./team-context.md
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
## Real-World Scenarios
|
|
224
|
-
|
|
225
|
-
### Feature Development
|
|
226
|
-
|
|
227
|
-
```bash
|
|
228
|
-
# Start working on a feature
|
|
229
|
-
git checkout -b feature/user-authentication
|
|
230
|
-
|
|
231
|
-
# Make incremental commits with context
|
|
232
|
-
kodrdriv commit --context "Implementing user authentication system"
|
|
233
|
-
kodrdriv commit --context "Adding password validation"
|
|
234
|
-
kodrdriv commit --context "Integrating with OAuth provider"
|
|
235
|
-
|
|
236
|
-
# Generate comprehensive release notes
|
|
237
|
-
kodrdriv release --from main --to feature/user-authentication
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
### Bug Fix
|
|
241
|
-
|
|
242
|
-
```bash
|
|
243
|
-
# Quick bug fix with automatic commit
|
|
244
|
-
git add src/utils/validation.ts
|
|
245
|
-
kodrdriv commit --sendit --context "Fixing validation bug #123"
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
### Dependency Updates
|
|
249
|
-
|
|
250
|
-
```bash
|
|
251
|
-
# Update dependencies and commit
|
|
252
|
-
pnpm update
|
|
253
|
-
kodrdriv commit --context "Routine dependency updates"
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
### Documentation Updates
|
|
257
|
-
|
|
258
|
-
```bash
|
|
259
|
-
# Update documentation
|
|
260
|
-
git add docs/
|
|
261
|
-
kodrdriv commit --context "Updating API documentation"
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
## Configuration Examples
|
|
265
|
-
|
|
266
|
-
### Personal Configuration
|
|
267
|
-
|
|
268
|
-
`.kodrdriv/config.json`:
|
|
269
|
-
```json
|
|
270
|
-
{
|
|
271
|
-
"model": "gpt-4o-mini",
|
|
272
|
-
"verbose": true,
|
|
273
|
-
"commit": {
|
|
274
|
-
"messageLimit": 5
|
|
275
|
-
},
|
|
276
|
-
"excludedPatterns": [
|
|
277
|
-
"*.lock",
|
|
278
|
-
"dist/",
|
|
279
|
-
".DS_Store"
|
|
280
|
-
]
|
|
281
|
-
}
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
### Team Configuration
|
|
285
|
-
|
|
286
|
-
`.kodrdriv/config.json`:
|
|
287
|
-
```json
|
|
288
|
-
{
|
|
289
|
-
"model": "gpt-4o-mini",
|
|
290
|
-
"publish": {
|
|
291
|
-
"mergeMethod": "squash",
|
|
292
|
-
"dependencyUpdatePatterns": ["@company/*"],
|
|
293
|
-
"requiredEnvVars": ["NODE_AUTH_TOKEN", "CODECOV_TOKEN"]
|
|
294
|
-
},
|
|
295
|
-
"link": {
|
|
296
|
-
"scopeRoots": {
|
|
297
|
-
"@company": "../",
|
|
298
|
-
"@shared": "../../shared-packages/"
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
### Project-Specific Configuration
|
|
305
|
-
|
|
306
|
-
```json
|
|
307
|
-
{
|
|
308
|
-
"contextDirectories": ["src", "docs", "tests"],
|
|
309
|
-
"release": {
|
|
310
|
-
"messageLimit": 15
|
|
311
|
-
},
|
|
312
|
-
"excludedPatterns": [
|
|
313
|
-
"coverage/",
|
|
314
|
-
"*.generated.ts",
|
|
315
|
-
"build/"
|
|
316
|
-
]
|
|
317
|
-
}
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
## Error Handling Examples
|
|
321
|
-
|
|
322
|
-
### Missing Environment Variables
|
|
323
|
-
|
|
324
|
-
```bash
|
|
325
|
-
# This will fail with helpful error message
|
|
326
|
-
kodrdriv publish
|
|
327
|
-
# Error: Missing required environment variables: GITHUB_TOKEN, OPENAI_API_KEY
|
|
328
|
-
|
|
329
|
-
# Set the variables and retry
|
|
330
|
-
export GITHUB_TOKEN="your-token"
|
|
331
|
-
export OPENAI_API_KEY="your-key"
|
|
332
|
-
kodrdriv publish
|
|
333
|
-
```
|
|
334
|
-
|
|
335
|
-
### Missing prepublishOnly Script
|
|
336
|
-
|
|
337
|
-
```bash
|
|
338
|
-
# This will fail if package.json doesn't have prepublishOnly script
|
|
339
|
-
kodrdriv publish
|
|
340
|
-
# Error: prepublishOnly script is required in package.json
|
|
341
|
-
|
|
342
|
-
# Add script to package.json and retry
|
|
343
|
-
# "prepublishOnly": "pnpm run lint && pnpm run build && pnpm run test"
|
|
344
|
-
```
|
|
345
|
-
|
|
346
|
-
### Dry Run for Safety
|
|
347
|
-
|
|
348
|
-
```bash
|
|
349
|
-
# Always test with dry run first
|
|
350
|
-
kodrdriv publish --dry-run
|
|
351
|
-
kodrdriv link --scope-roots '{"@company": "../"}' --dry-run
|
|
352
|
-
```
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
<svg width="128" height="128" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<!-- Background circle -->
|
|
3
|
-
<circle cx="64" cy="64" r="62" fill="#000000" stroke="#333333" stroke-width="2"/>
|
|
4
|
-
|
|
5
|
-
<!-- Thor's hammer handle (vertical shaft) -->
|
|
6
|
-
<rect x="58" y="45" width="12" height="55" fill="#ffffff" rx="2"/>
|
|
7
|
-
|
|
8
|
-
<!-- Hammer head (main block) -->
|
|
9
|
-
<rect x="35" y="25" width="58" height="25" fill="#ffffff" rx="3"/>
|
|
10
|
-
|
|
11
|
-
<!-- Hammer head detail lines -->
|
|
12
|
-
<rect x="40" y="30" width="48" height="2" fill="#000000"/>
|
|
13
|
-
<rect x="40" y="35" width="48" height="2" fill="#000000"/>
|
|
14
|
-
<rect x="40" y="40" width="48" height="2" fill="#000000"/>
|
|
15
|
-
|
|
16
|
-
<!-- Digital bytes/binary elements around the hammer -->
|
|
17
|
-
<!-- Top left -->
|
|
18
|
-
<rect x="20" y="15" width="3" height="3" fill="#ffffff"/>
|
|
19
|
-
<rect x="25" y="15" width="3" height="3" fill="#ffffff"/>
|
|
20
|
-
<rect x="25" y="20" width="3" height="3" fill="#ffffff"/>
|
|
21
|
-
|
|
22
|
-
<!-- Top right -->
|
|
23
|
-
<rect x="100" y="15" width="3" height="3" fill="#ffffff"/>
|
|
24
|
-
<rect x="105" y="15" width="3" height="3" fill="#ffffff"/>
|
|
25
|
-
<rect x="100" y="20" width="3" height="3" fill="#ffffff"/>
|
|
26
|
-
|
|
27
|
-
<!-- Bottom left -->
|
|
28
|
-
<rect x="15" y="100" width="3" height="3" fill="#ffffff"/>
|
|
29
|
-
<rect x="20" y="105" width="3" height="3" fill="#ffffff"/>
|
|
30
|
-
<rect x="25" y="100" width="3" height="3" fill="#ffffff"/>
|
|
31
|
-
|
|
32
|
-
<!-- Bottom right -->
|
|
33
|
-
<rect x="100" y="105" width="3" height="3" fill="#ffffff"/>
|
|
34
|
-
<rect x="105" y="100" width="3" height="3" fill="#ffffff"/>
|
|
35
|
-
<rect x="110" y="105" width="3" height="3" fill="#ffffff"/>
|
|
36
|
-
|
|
37
|
-
<!-- Circuit-like lines connecting to hammer -->
|
|
38
|
-
<path d="M 30 45 L 35 45" stroke="#ffffff" stroke-width="2" fill="none"/>
|
|
39
|
-
<path d="M 93 45 L 98 45" stroke="#ffffff" stroke-width="2" fill="none"/>
|
|
40
|
-
|
|
41
|
-
<!-- Binary numbers around the hammer -->
|
|
42
|
-
<text x="15" y="65" fill="#ffffff" font-family="monospace" font-size="8">01</text>
|
|
43
|
-
<text x="105" y="65" fill="#ffffff" font-family="monospace" font-size="8">10</text>
|
|
44
|
-
<text x="60" y="20" fill="#000000" font-family="monospace" font-size="6">11</text>
|
|
45
|
-
<text x="60" y="115" fill="#ffffff" font-family="monospace" font-size="8">00</text>
|
|
46
|
-
|
|
47
|
-
<!-- Hammer striking effect (lightning/energy) -->
|
|
48
|
-
<path d="M 64 50 L 60 55 L 68 55 L 64 60" fill="#ffffff"/>
|
|
49
|
-
|
|
50
|
-
<!-- Corner circuit elements -->
|
|
51
|
-
<rect x="10" y="10" width="8" height="1" fill="#ffffff"/>
|
|
52
|
-
<rect x="10" y="10" width="1" height="8" fill="#ffffff"/>
|
|
53
|
-
|
|
54
|
-
<rect x="110" y="10" width="8" height="1" fill="#ffffff"/>
|
|
55
|
-
<rect x="117" y="10" width="1" height="8" fill="#ffffff"/>
|
|
56
|
-
|
|
57
|
-
<rect x="10" y="117" width="8" height="1" fill="#ffffff"/>
|
|
58
|
-
<rect x="10" y="110" width="1" height="8" fill="#ffffff"/>
|
|
59
|
-
|
|
60
|
-
<rect x="110" y="117" width="8" height="1" fill="#ffffff"/>
|
|
61
|
-
<rect x="117" y="110" width="1" height="8" fill="#ffffff"/>
|
|
62
|
-
</svg>
|