@eldrforge/kodrdriv 0.0.7 → 0.0.10

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 (48) hide show
  1. package/README.md +65 -707
  2. package/dist/arguments.js +79 -55
  3. package/dist/arguments.js.map +1 -1
  4. package/dist/commands/commit.js +28 -16
  5. package/dist/commands/commit.js.map +1 -1
  6. package/dist/commands/link.js +19 -18
  7. package/dist/commands/link.js.map +1 -1
  8. package/dist/commands/publish.js +170 -93
  9. package/dist/commands/publish.js.map +1 -1
  10. package/dist/commands/release.js +8 -0
  11. package/dist/commands/release.js.map +1 -1
  12. package/dist/commands/unlink.js +21 -20
  13. package/dist/commands/unlink.js.map +1 -1
  14. package/dist/constants.js +4 -2
  15. package/dist/constants.js.map +1 -1
  16. package/dist/logging.js +35 -23
  17. package/dist/logging.js.map +1 -1
  18. package/dist/main.js +49 -3
  19. package/dist/main.js.map +1 -1
  20. package/dist/util/child.js +13 -1
  21. package/dist/util/child.js.map +1 -1
  22. package/docs/index.html +17 -0
  23. package/docs/package.json +36 -0
  24. package/docs/public/README.md +132 -0
  25. package/docs/public/advanced-usage.md +188 -0
  26. package/docs/public/code-icon.svg +4 -0
  27. package/docs/public/commands.md +116 -0
  28. package/docs/public/configuration.md +274 -0
  29. package/docs/public/examples.md +352 -0
  30. package/docs/public/kodrdriv-logo.svg +62 -0
  31. package/docs/src/App.css +387 -0
  32. package/docs/src/App.tsx +60 -0
  33. package/docs/src/components/DocumentPage.tsx +56 -0
  34. package/docs/src/components/ErrorMessage.tsx +15 -0
  35. package/docs/src/components/LoadingSpinner.tsx +14 -0
  36. package/docs/src/components/MarkdownRenderer.tsx +56 -0
  37. package/docs/src/components/Navigation.css +73 -0
  38. package/docs/src/components/Navigation.tsx +36 -0
  39. package/docs/src/index.css +61 -0
  40. package/docs/src/main.tsx +10 -0
  41. package/docs/src/test/setup.ts +1 -0
  42. package/docs/src/vite-env.d.ts +10 -0
  43. package/docs/tsconfig.node.json +13 -0
  44. package/docs/vite.config.ts +15 -0
  45. package/docs/vitest.config.ts +15 -0
  46. package/eslint.config.mjs +1 -0
  47. package/package.json +10 -5
  48. package/vitest.config.ts +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"logging.js","sources":["../src/logging.ts"],"sourcesContent":["import winston from 'winston';\nimport { DATE_FORMAT_YEAR_MONTH_DAY_HOURS_MINUTES_SECONDS, PROGRAM_NAME } from './constants';\n\nexport interface LogContext {\n [key: string]: any;\n}\n\nconst createLogger = (level: string = 'info') => {\n\n let format = winston.format.combine(\n winston.format.timestamp({ format: DATE_FORMAT_YEAR_MONTH_DAY_HOURS_MINUTES_SECONDS }),\n winston.format.errors({ stack: true }),\n winston.format.splat(),\n winston.format.json()\n );\n\n let transports = [\n new winston.transports.Console({\n format: winston.format.combine(\n winston.format.colorize(),\n winston.format.printf(({ timestamp, level, message, ...meta }) => {\n const metaStr = Object.keys(meta).length ? ` ${JSON.stringify(meta)}` : '';\n return `${timestamp} ${level}: ${message}${metaStr}`;\n })\n )\n })\n ];\n\n if (level === 'info') {\n format = winston.format.combine(\n winston.format.errors({ stack: true }),\n winston.format.splat(),\n );\n\n transports = [\n new winston.transports.Console({\n format: winston.format.combine(\n winston.format.colorize(),\n winston.format.printf(({ level, message }) => {\n return `${level}: ${message}`;\n })\n )\n })\n ];\n }\n\n return winston.createLogger({\n level,\n format,\n defaultMeta: { service: PROGRAM_NAME },\n transports,\n });\n};\n\nlet logger = createLogger();\n\nexport const setLogLevel = (level: string) => {\n logger = createLogger(level);\n};\n\nexport const getLogger = () => logger; "],"names":["createLogger","level","format","winston","combine","timestamp","DATE_FORMAT_YEAR_MONTH_DAY_HOURS_MINUTES_SECONDS","errors","stack","splat","json","transports","Console","colorize","printf","message","meta","metaStr","Object","keys","length","JSON","stringify","defaultMeta","service","PROGRAM_NAME","logger","setLogLevel","getLogger"],"mappings":";;;AAOA,MAAMA,YAAAA,GAAe,CAACC,KAAAA,GAAgB,MAA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A,EAAQC,OAAAA,CAAQD,MAAM,CAACE,OAAO,CAC1BD,OAAAA,CAAQD,MAAM,CAACW,QAAQ,EAAA,EACvBV,QAAQD,MAAM,CAACY,MAAM,CAAC,CAAC,EAAEb,KAAK,EAAEc,OAAO,EAAE,GAAA;AACrC,oBAAA,OAAO,CAAA,EAAGd,KAAAA,CAAM,EAAE,EAAEc,OAAAA,CAAAA,CAAS;AACjC,iBAAA,CAAA;AAER,aAAA;AACH,SAAA;AACL;IAEA,OAAOZ,OAAAA,CAAQH,YAAY,CAAC;AACxBC,QAAAA,KAAAA;AACAC,QAAAA,MAAAA;QACAqB,WAAAA,EAAa;YAAEC,OAAAA,EAASC;AAAa,SAAA;AACrCd,QAAAA;AACJ,KAAA,CAAA;AACJ,CAAA;AAEA,IAAIe,MAAAA,GAAS1B,YAAAA,EAAAA;AAEN,MAAM2B,cAAc,CAAC1B,KAAAA,GAAAA;AACxByB,IAAAA,MAAAA,GAAS1B,YAAAA,CAAaC,KAAAA,CAAAA;AAC1B;AAEO,MAAM2B,SAAAA,GAAY,IAAMF;;;;"}
1
+ {"version":3,"file":"logging.js","sources":["../src/logging.ts"],"sourcesContent":["import winston from 'winston';\nimport { DATE_FORMAT_YEAR_MONTH_DAY_HOURS_MINUTES_SECONDS, PROGRAM_NAME } from './constants';\n\nexport interface LogContext {\n [key: string]: any;\n}\n\nconst createTransports = (level: string) => {\n if (level === 'info') {\n return [\n new winston.transports.Console({\n format: winston.format.combine(\n winston.format.colorize(),\n winston.format.printf(({ level, message }) => {\n return `${level}: ${message}`;\n })\n )\n })\n ];\n }\n\n return [\n new winston.transports.Console({\n format: winston.format.combine(\n winston.format.colorize(),\n winston.format.printf(({ timestamp, level, message, ...meta }) => {\n const metaStr = Object.keys(meta).length ? ` ${JSON.stringify(meta)}` : '';\n return `${timestamp} ${level}: ${message}${metaStr}`;\n })\n )\n })\n ];\n};\n\nconst createFormat = (level: string) => {\n if (level === 'info') {\n return winston.format.combine(\n winston.format.errors({ stack: true }),\n winston.format.splat(),\n );\n }\n\n return winston.format.combine(\n winston.format.timestamp({ format: DATE_FORMAT_YEAR_MONTH_DAY_HOURS_MINUTES_SECONDS }),\n winston.format.errors({ stack: true }),\n winston.format.splat(),\n winston.format.json()\n );\n};\n\n// Create the logger instance once\nconst logger = winston.createLogger({\n level: 'info',\n format: createFormat('info'),\n defaultMeta: { service: PROGRAM_NAME },\n transports: createTransports('info'),\n});\n\nexport const setLogLevel = (level: string) => {\n // Reconfigure the existing logger instead of creating a new one\n logger.configure({\n level,\n format: createFormat(level),\n defaultMeta: { service: PROGRAM_NAME },\n transports: createTransports(level),\n });\n};\n\nexport const getLogger = () => logger; "],"names":["createTransports","level","winston","transports","Console","format","combine","colorize","printf","message","timestamp","meta","metaStr","Object","keys","length","JSON","stringify","createFormat","errors","stack","splat","DATE_FORMAT_YEAR_MONTH_DAY_HOURS_MINUTES_SECONDS","json","logger","createLogger","defaultMeta","service","PROGRAM_NAME","setLogLevel","configure","getLogger"],"mappings":";;;AAOA,MAAMA,mBAAmB,CAACC,KAAAA,GAAAA;AACtB,IAAA,IAAIA,UAAU,MAAA,EAAQ;QAClB,OAAO;AACH,YAAA,IAAIC,OAAAA,CAAQC,UAAU,CAACC,OAAO,CAAC;gBAC3BC,MAAAA,EAAQH,OAAAA,CAAQG,MAAM,CAACC,OAAO,CAC1BJ,OAAAA,CAAQG,MAAM,CAACE,QAAQ,EAAA,EACvBL,QAAQG,MAAM,CAACG,MAAM,CAAC,CAAC,EAAEP,KAAK,EAAEQ,OAAO,EAAE,GAAA;AACrC,oBAAA,OAAO,CAAA,EAAGR,KAAAA,CAAM,EAAE,EAAEQ,OAAAA,CAAAA,CAAS;AACjC,iBAAA,CAAA;AAER,aAAA;AACH,SAAA;AACL;IAEA,OAAO;AACH,QAAA,IAAIP,OAAAA,CAAQC,UAAU,CAACC,OAAO,CAAC;YAC3BC,MAAAA,EAAQH,OAAAA,CAAQG,MAAM,CAACC,OAAO,CAC1BJ,QAAQG,M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A,UAAAA,EAAYH,gBAAAA,CAAiB,MAAA;AACjC,CAAA,CAAA;AAEO,MAAM6B,cAAc,CAAC5B,KAAAA,GAAAA;;AAExBuB,IAAAA,MAAAA,CAAOM,SAAS,CAAC;AACb7B,QAAAA,KAAAA;AACAI,QAAAA,MAAAA,EAAQa,YAAAA,CAAajB,KAAAA,CAAAA;QACrByB,WAAAA,EAAa;YAAEC,OAAAA,EAASC;AAAa,SAAA;AACrCzB,QAAAA,UAAAA,EAAYH,gBAAAA,CAAiBC,KAAAA;AACjC,KAAA,CAAA;AACJ;AAEO,MAAM8B,SAAAA,GAAY,IAAMP;;;;"}
package/dist/main.js CHANGED
@@ -7,18 +7,51 @@ import { execute as execute$3 } from './commands/link.js';
7
7
  import { execute as execute$2 } from './commands/publish.js';
8
8
  import { execute as execute$1 } from './commands/release.js';
9
9
  import { execute as execute$4 } from './commands/unlink.js';
10
- import { DEFAULT_CONFIG_DIR, COMMAND_COMMIT, COMMAND_RELEASE, COMMAND_PUBLISH, COMMAND_LINK, COMMAND_UNLINK } from './constants.js';
10
+ import { DEFAULT_CONFIG_DIR, COMMAND_CHECK_CONFIG, COMMAND_INIT_CONFIG, COMMAND_COMMIT, COMMAND_RELEASE, COMMAND_PUBLISH, COMMAND_LINK, COMMAND_UNLINK } from './constants.js';
11
11
  import { getLogger, setLogLevel } from './logging.js';
12
12
  import { ConfigSchema } from './types.js';
13
13
 
14
+ /**
15
+ * Configure early logging based on command line flags.
16
+ *
17
+ * Hey we need this because we need to be able to debug CardiganTime.
18
+ * This method checks for --verbose and --debug flags early in the process
19
+ * before CardiganTime is configured, allowing us to capture debug output
20
+ * from the CardiganTime initialization itself.
21
+ */ function configureEarlyLogging() {
22
+ const hasVerbose = process.argv.includes('--verbose');
23
+ const hasDebug = process.argv.includes('--debug');
24
+ // Set log level based on early flag detection
25
+ if (hasDebug) {
26
+ setLogLevel('debug');
27
+ } else if (hasVerbose) {
28
+ setLogLevel('verbose');
29
+ }
30
+ }
14
31
  async function main() {
32
+ // Configure logging early, before CardiganTime initialization
33
+ configureEarlyLogging();
15
34
  const cardigantime = Cardigantime.create({
16
35
  defaults: {
17
- configDirectory: DEFAULT_CONFIG_DIR
36
+ configDirectory: DEFAULT_CONFIG_DIR,
37
+ // Move pathResolution INSIDE defaults
38
+ pathResolution: {
39
+ resolvePathArray: [
40
+ 'contextDirectories'
41
+ ]
42
+ },
43
+ // Use fieldOverlaps instead of mergeStrategy, INSIDE defaults
44
+ fieldOverlaps: {
45
+ 'contextDirectories': 'prepend'
46
+ }
18
47
  },
48
+ features: [
49
+ 'config',
50
+ 'hierarchical'
51
+ ],
19
52
  configShape: ConfigSchema.shape,
20
53
  logger: getLogger()
21
- });
54
+ }); // No need for 'as any' at the end
22
55
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
23
56
  const [runConfig, secureConfig, commandConfig] = await configure(cardigantime); // Pass cardigantime instance
24
57
  // Set log level based on verbose flag
@@ -29,7 +62,20 @@ async function main() {
29
62
  setLogLevel('debug');
30
63
  }
31
64
  const logger = getLogger();
65
+ cardigantime.setLogger(logger);
32
66
  try {
67
+ // Handle check-config command first
68
+ if (commandConfig.commandName === COMMAND_CHECK_CONFIG) {
69
+ // CardiganTime's checkConfig has already been called in Arguments.configure()
70
+ // No additional processing needed here
71
+ return;
72
+ }
73
+ // Handle init-config command
74
+ if (commandConfig.commandName === COMMAND_INIT_CONFIG) {
75
+ // CardiganTime's initConfig has already been called in Arguments.configure()
76
+ // No additional processing needed here
77
+ return;
78
+ }
33
79
  // Get the command from Commander
34
80
  const command = process.argv[2];
35
81
  let commandName = commandConfig.commandName;
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sources":["../src/main.ts"],"sourcesContent":["#!/usr/bin/env node\nimport * as Cardigantime from '@theunwalked/cardigantime';\nimport 'dotenv/config';\nimport * as Arguments from './arguments';\nimport * as Commit from './commands/commit';\nimport * as Link from './commands/link';\nimport * as Publish from './commands/publish';\nimport * as Release from './commands/release';\nimport * as Unlink from './commands/unlink';\nimport { COMMAND_COMMIT, COMMAND_LINK, COMMAND_PUBLISH, COMMAND_RELEASE, COMMAND_UNLINK, DEFAULT_CONFIG_DIR } from './constants';\nimport { getLogger, setLogLevel } from './logging';\nimport { CommandConfig } from 'types';\nimport { Config, ConfigSchema, SecureConfig } from './types';\n\nexport async function main() {\n\n const cardigantime = Cardigantime.create({\n defaults: {\n configDirectory: DEFAULT_CONFIG_DIR, // Default directory for config file\n },\n configShape: ConfigSchema.shape as any, // Cast to any to avoid TypeScript recursion issues\n logger: getLogger(), // Optional: Pass logger instance\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [runConfig, secureConfig, commandConfig]: [Config, SecureConfig, CommandConfig] = await Arguments.configure(cardigantime); // Pass cardigantime instance\n\n // Set log level based on verbose flag\n if (runConfig.verbose) {\n setLogLevel('verbose');\n }\n if (runConfig.debug) {\n setLogLevel('debug');\n }\n\n const logger = getLogger();\n\n try {\n // Get the command from Commander\n const command = process.argv[2];\n let commandName = commandConfig.commandName;\n\n // If we have a specific command argument, use that\n if (command === 'commit' || command === 'release' || command === 'publish' || command === 'link' || command === 'unlink') {\n commandName = command;\n }\n\n let summary: string = '';\n\n if (commandName === COMMAND_COMMIT) {\n summary = await Commit.execute(runConfig);\n } else if (commandName === COMMAND_RELEASE) {\n const releaseSummary = await Release.execute(runConfig);\n summary = `${releaseSummary.title}\\n\\n${releaseSummary.body}`;\n } else if (commandName === COMMAND_PUBLISH) {\n await Publish.execute(runConfig);\n } else if (commandName === COMMAND_LINK) {\n summary = await Link.execute(runConfig);\n } else if (commandName === COMMAND_UNLINK) {\n summary = await Unlink.execute(runConfig);\n }\n\n // eslint-disable-next-line no-console\n console.log(`\\n\\n${summary}\\n\\n`);\n\n } catch (error: any) {\n logger.error('Exiting due to Error: %s, %s', error.message, error.stack);\n process.exit(1);\n }\n}\n\nmain();"],"names":["main","cardigantime","Cardigantime","create","defaults","configDirectory","DEFAULT_CONFIG_DIR","configShape","ConfigSchema","shape","logger","getLogger","runConfig","secureConfig","commandConfig","Arguments","verbose","setLogLevel","debug","command","process","argv","commandName","summary","COMMAND_COMMIT","Commit","COMMAND_RELEASE","releaseSummary","Release","title","body","COMMAND_PUBLISH","Publish","COMMAND_LINK","Link","COMMAND_UNLINK","Unlink","console","log","error","message","stack","exit"],"mappings":";;;;;;;;;;;;;AAcO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAeA,IAAAA,CAAAA,CAAAA,CAAAA,CAAAA;IAElB,MAAMC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAeC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAaC,MAAM,CAAC,CAAA;QACrCC,QAAAA,CAAAA,CAAU,CAAA;YACNC,eAAAA,CAAAA,CAAiBC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA;AACrB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACAC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAaC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAaC,CAAAA,CAAAA,CAAAA,CAAAA,CAAK,CAAA;QAC/BC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAQC,CAAAA,CAAAA,CAAA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AAA,CAAO6B,CAAAA,CAAAA,CAAAA,CAAAA,CAAK,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgCA,CAAAA,CAAAA,CAAAA,CAAAA,EAAMC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAO,CAAA,CAAED,CAAAA,CAAAA,CAAAA,CAAAA,EAAME,KAAK,CAAA,CAAA;AACvErB,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAQsB,CAAAA,CAAAA,CAAAA,CAAI,CAAC,CAAA,CAAA,CAAA;AACjB,CAAA,CAAA,CAAA,CAAA,CAAA;AACJ,CAAA;AAEA1C,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA;;"}
1
+ {"version":3,"file":"main.js","sources":["../src/main.ts"],"sourcesContent":["#!/usr/bin/env node\nimport * as Cardigantime from '@theunwalked/cardigantime';\nimport 'dotenv/config';\nimport * as Arguments from './arguments';\nimport * as Commit from './commands/commit';\nimport * as Link from './commands/link';\nimport * as Publish from './commands/publish';\nimport * as Release from './commands/release';\nimport * as Unlink from './commands/unlink';\nimport { COMMAND_CHECK_CONFIG, COMMAND_COMMIT, COMMAND_INIT_CONFIG, COMMAND_LINK, COMMAND_PUBLISH, COMMAND_RELEASE, COMMAND_UNLINK, DEFAULT_CONFIG_DIR } from './constants';\nimport { getLogger, setLogLevel } from './logging';\nimport { CommandConfig } from 'types';\nimport { Config, ConfigSchema, SecureConfig } from './types';\n\n/**\n * Configure early logging based on command line flags.\n * \n * Hey we need this because we need to be able to debug CardiganTime.\n * This method checks for --verbose and --debug flags early in the process\n * before CardiganTime is configured, allowing us to capture debug output\n * from the CardiganTime initialization itself.\n */\nfunction configureEarlyLogging(): void {\n const hasVerbose = process.argv.includes('--verbose');\n const hasDebug = process.argv.includes('--debug');\n\n // Set log level based on early flag detection\n if (hasDebug) {\n setLogLevel('debug');\n } else if (hasVerbose) {\n setLogLevel('verbose');\n }\n}\n\nexport async function main() {\n // Configure logging early, before CardiganTime initialization\n configureEarlyLogging();\n\n const cardigantime = Cardigantime.create({\n defaults: {\n configDirectory: DEFAULT_CONFIG_DIR,\n // Move pathResolution INSIDE defaults\n pathResolution: {\n resolvePathArray: ['contextDirectories'], // Resolve contextDirectories array elements as paths\n },\n // Use fieldOverlaps instead of mergeStrategy, INSIDE defaults\n fieldOverlaps: {\n 'contextDirectories': 'prepend', // Use prepend strategy for contextDirectories array\n // Add other field overlap configurations as needed\n },\n },\n features: ['config', 'hierarchical'],\n configShape: ConfigSchema.shape, // No need for 'as any' now\n logger: getLogger(),\n }); // No need for 'as any' at the end\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [runConfig, secureConfig, commandConfig]: [Config, SecureConfig, CommandConfig] = await Arguments.configure(cardigantime); // Pass cardigantime instance\n\n // Set log level based on verbose flag\n if (runConfig.verbose) {\n setLogLevel('verbose');\n }\n if (runConfig.debug) {\n setLogLevel('debug');\n }\n\n const logger = getLogger();\n cardigantime.setLogger(logger);\n\n try {\n // Handle check-config command first\n if (commandConfig.commandName === COMMAND_CHECK_CONFIG) {\n // CardiganTime's checkConfig has already been called in Arguments.configure()\n // No additional processing needed here\n return;\n }\n\n // Handle init-config command\n if (commandConfig.commandName === COMMAND_INIT_CONFIG) {\n // CardiganTime's initConfig has already been called in Arguments.configure()\n // No additional processing needed here\n return;\n }\n\n // Get the command from Commander\n const command = process.argv[2];\n let commandName = commandConfig.commandName;\n\n // If we have a specific command argument, use that\n if (command === 'commit' || command === 'release' || command === 'publish' || command === 'link' || command === 'unlink') {\n commandName = command;\n }\n\n let summary: string = '';\n\n if (commandName === COMMAND_COMMIT) {\n summary = await Commit.execute(runConfig);\n } else if (commandName === COMMAND_RELEASE) {\n const releaseSummary = await Release.execute(runConfig);\n summary = `${releaseSummary.title}\\n\\n${releaseSummary.body}`;\n } else if (commandName === COMMAND_PUBLISH) {\n await Publish.execute(runConfig);\n } else if (commandName === COMMAND_LINK) {\n summary = await Link.execute(runConfig);\n } else if (commandName === COMMAND_UNLINK) {\n summary = await Unlink.execute(runConfig);\n }\n\n // eslint-disable-next-line no-console\n console.log(`\\n\\n${summary}\\n\\n`);\n\n } catch (error: any) {\n logger.error('Exiting due to Error: %s, %s', error.message, error.stack);\n process.exit(1);\n }\n}\n\nmain();"],"names":["configureEarlyLogging","hasVerbose","process","argv","includes","hasDebug","setLogLevel","main","cardigantime","Cardigantime","create","defaults","configDirectory","DEFAULT_CONFIG_DIR","pathResolution","resolvePathArray","fieldOverlaps","features","configShape","ConfigSchema","shape","logger","getLogger","runConfig","secureConfig","commandConfig","Arguments","verbose","debug","setLogger","commandName","COMMAND_CHECK_CONFIG","COMMAND_INIT_CONFIG","command","summary","COMMAND_COMMIT","Commit","COMMAND_RELEASE","releaseSummary","Release","title","body","COMMAND_PUBLISH","Publish","COMMAND_LINK","Link","COMMAND_UNLINK","Unlink","console","log","error","message","stack","exit"],"mappings":";;;;;;;;;;;;;AAcA,CAAA,CAAA,CAAA;;;;;;;AAOC,CAAA,CAAA,CAAA,CACD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAASA,qBAAAA,CAAAA,CAAAA,CAAAA,CAAAA;AACL,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAMC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAaC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAQC,IAAI,CAACC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CA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AA,CAAAA,CAAAA,EAAMC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAO,CAAA,CAAED,CAAAA,CAAAA,CAAAA,CAAAA,EAAME,KAAK,CAAA,CAAA;AACvElD,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAQmD,CAAAA,CAAAA,CAAAA,CAAI,CAAC,CAAA,CAAA,CAAA;AACjB,CAAA,CAAA,CAAA,CAAA,CAAA;AACJ,CAAA;AAEA9C,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA;;"}
@@ -1,11 +1,23 @@
1
1
  #!/usr/bin/env node
2
2
  import { exec } from 'child_process';
3
3
  import util from 'util';
4
+ import { getLogger } from '../logging.js';
4
5
 
5
6
  async function run(command, options = {}) {
6
7
  const execPromise = util.promisify(exec);
7
8
  return execPromise(command, options);
8
9
  }
10
+ async function runWithDryRunSupport(command, isDryRun, options = {}) {
11
+ const logger = getLogger();
12
+ if (isDryRun) {
13
+ logger.info(`DRY RUN: Would execute command: ${command}`);
14
+ return {
15
+ stdout: '',
16
+ stderr: ''
17
+ };
18
+ }
19
+ return run(command, options);
20
+ }
9
21
 
10
- export { run };
22
+ export { run, runWithDryRunSupport };
11
23
  //# sourceMappingURL=child.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"child.js","sources":["../../src/util/child.ts"],"sourcesContent":["#!/usr/bin/env node\nimport child_process, { exec } from 'child_process';\nimport util from 'util';\n\nexport async function run(command: string, options: child_process.ExecOptions = {}): Promise<{ stdout: string; stderr: string }> {\n const execPromise = util.promisify(exec);\n return execPromise(command, options);\n}"],"names":["run","command","options","execPromise","util","promisify","exec"],"mappings":";;;;AAIO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAeA,GAAAA,CAAIC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAe,EAAEC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAqC,EAAE,CAAA,CAAA,CAAA;IAC9E,CAAA,CAAA,CAAA,CAAA,CAAA,CAAMC,WAAAA,CAAAA,CAAAA,CAAcC,CAAAA,CAAAA,CAAAA,CAAAA,CAAKC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAS,CAACC,IAAAA,CAAAA,CAAAA;AACnC,CAAA,CAAA,CAAA,CAAA,OAAOH,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAYF,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAASC,OAAAA,CAAAA,CAAAA;AAChC,CAAA;;"}
1
+ {"version":3,"file":"child.js","sources":["../../src/util/child.ts"],"sourcesContent":["#!/usr/bin/env node\nimport child_process, { exec } from 'child_process';\nimport util from 'util';\nimport { getLogger } from '../logging';\n\nexport async function run(command: string, options: child_process.ExecOptions = {}): Promise<{ stdout: string; stderr: string }> {\n const execPromise = util.promisify(exec);\n return execPromise(command, options);\n}\n\nexport async function runWithDryRunSupport(\n command: string,\n isDryRun: boolean,\n options: child_process.ExecOptions = {}\n): Promise<{ stdout: string; stderr: string }> {\n const logger = getLogger();\n\n if (isDryRun) {\n logger.info(`DRY RUN: Would execute command: ${command}`);\n return { stdout: '', stderr: '' };\n }\n\n return run(command, options);\n}"],"names":["run","command","options","execPromise","util","promisify","exec","runWithDryRunSupport","isDryRun","logger","getLogger","info","stdout","stderr"],"mappings":";;;;;AAKO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAeA,GAAAA,CAAIC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAe,EAAEC,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CAAA;AACVC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAOE,CAAAA,CAAAA,CAAAA,CAAI,CAAC,CAAC,gCAAgC,CAAA,CAAEV,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAS,CAAA,CAAA;QACxD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAA;YAAEW,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAQ,CAAA,CAAA,CAAA;YAAIC,MAAAA,CAAAA,CAAQ,CAAA,CAAA;AAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACpC,CAAA,CAAA,CAAA,CAAA,CAAA;AAEA,CAAA,CAAA,CAAA,CAAA,OAAOb,CAAAA,CAAAA,EAAIC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAASC,OAAAA,CAAAA,CAAAA;AACxB,CAAA;;"}
@@ -0,0 +1,17 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <link rel="icon" type="image/svg+xml" href="/code-icon.svg" />
7
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8
+ <title>🚀 KodrDriv - Intelligent Git Release Notes</title>
9
+ <meta name="description" content="Create Intelligent Release Notes and Change Logs from Git using AI">
10
+ </head>
11
+
12
+ <body>
13
+ <div id="root"></div>
14
+ <script type="module" src="/src/main.tsx"></script>
15
+ </body>
16
+
17
+ </html>
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "kodrdriv-docs",
3
+ "private": true,
4
+ "version": "0.0.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "tsc && vite build",
9
+ "preview": "vite preview",
10
+ "test": "vitest run --coverage",
11
+ "test:watch": "vitest --watch"
12
+ },
13
+ "dependencies": {
14
+ "react": "^19.1.0",
15
+ "react-dom": "^19.1.0",
16
+ "react-markdown": "^10.1.0",
17
+ "react-router-dom": "^7.6.3",
18
+ "react-syntax-highlighter": "^15.6.1",
19
+ "remark-gfm": "^4.0.1"
20
+ },
21
+ "devDependencies": {
22
+ "@testing-library/jest-dom": "^6.6.3",
23
+ "@testing-library/react": "^16.3.0",
24
+ "@testing-library/user-event": "^14.6.1",
25
+ "@types/react": "^19.1.8",
26
+ "@types/react-dom": "^19.1.6",
27
+ "@types/react-syntax-highlighter": "^15.5.13",
28
+ "@vitejs/plugin-react": "^4.6.0",
29
+ "@vitest/coverage-v8": "^3.2.4",
30
+ "@vitest/ui": "^3.2.4",
31
+ "jsdom": "^26.1.0",
32
+ "typescript": "^5.8.3",
33
+ "vite": "^7.0.0",
34
+ "vitest": "^3.2.4"
35
+ }
36
+ }
@@ -0,0 +1,132 @@
1
+ # KodrDriv
2
+
3
+ KodrDriv is a powerful utility designed to automatically generate intelligent release notes and commit messages from your Git repository. It analyzes commit history, pull requests, and related metadata to create comprehensive, well-structured documentation of your project's evolution. By leveraging advanced AI-powered analysis, it helps teams maintain clear visibility into their codebase's development history while reducing the manual effort typically required for changelog maintenance.
4
+
5
+ ## What is KodrDriv?
6
+
7
+ KodrDriv is an AI-powered Git workflow automation tool designed to solve the common problem of writing meaningful commit messages and release notes. It provides a unified way to:
8
+
9
+ - **Generate intelligent commit messages** from your code changes
10
+ - **Create comprehensive release notes** automatically from Git history
11
+ - **Automate the entire release process** with pull request and GitHub integration
12
+ - **Manage workspace dependencies** for monorepo and multi-package development
13
+ - **Maintain consistent documentation** with minimal manual effort
14
+
15
+ ## Why KodrDriv?
16
+
17
+ Writing good commit messages and release notes is time-consuming and often done when you're least in the mood for reflection. **KodrDriv was created specifically to solve the "context switch" problem that happens when you've been deep in code and Git asks you to summarize what you've done.**
18
+
19
+ Without KodrDriv, you need to manually:
20
+ - Stop your flow to write commit messages
21
+ - Remember all the changes you made across multiple files
22
+ - Craft meaningful release notes from scattered commit messages
23
+ - Coordinate complex release workflows with multiple steps
24
+
25
+ KodrDriv reads your code changes and Git history to automatically generate contextual, meaningful documentation that reflects your actual work.
26
+
27
+ ## Installation
28
+
29
+ Install KodrDriv globally using npm:
30
+
31
+ ```bash
32
+ npm install -g @eldrforge/kodrdriv
33
+ ```
34
+
35
+ This will make the `kodrdriv` command available globally on your system.
36
+
37
+ ## Quick Start
38
+
39
+ Here's how to get started with KodrDriv:
40
+
41
+ ### Generate a Commit Message
42
+
43
+ ```bash
44
+ # Make some changes to your code
45
+ git add .
46
+ kodrdriv commit
47
+ ```
48
+
49
+ ### Generate Release Notes
50
+
51
+ ```bash
52
+ # Generate release notes from your recent changes
53
+ kodrdriv release
54
+ ```
55
+
56
+ ### Automate Your Release Process
57
+
58
+ ```bash
59
+ # Fully automated release with dependency updates, PR creation, and GitHub release
60
+ kodrdriv publish
61
+ ```
62
+
63
+ ### Link Local Packages for Development
64
+
65
+ ```bash
66
+ # Automatically link workspace packages for local development
67
+ kodrdriv link --scope-roots '{"@company": "../"}'
68
+ ```
69
+
70
+ ## Key Features
71
+
72
+ ### AI-Powered Analysis
73
+ Uses OpenAI models to understand your code changes and generate contextual commit messages and release notes.
74
+
75
+ ### Comprehensive Release Automation
76
+ The `publish` command handles dependency updates, version bumping, PR creation, status checks, merging, and GitHub releases.
77
+
78
+ ### Intelligent Workspace Management
79
+ Automatically discovers and links related packages in monorepos and multi-package projects.
80
+
81
+ ### Flexible Configuration
82
+ Supports hierarchical configuration with command-line overrides, config files, and environment variables.
83
+
84
+ ### Custom Instructions
85
+ Extend or replace default AI instructions to match your project's specific conventions and requirements.
86
+
87
+ ## Documentation
88
+
89
+ 📚 **Complete Documentation**
90
+
91
+ **Quick Links:**
92
+ - [Commands](docs/public/commands.md) - Detailed documentation of all commands (commit, release, publish, link)
93
+ - [Configuration](docs/public/configuration.md) - All configuration options, hierarchical config, and environment variables
94
+ - [Advanced Usage](docs/public/advanced-usage.md) - Custom instructions, context, prompt structure, and advanced features
95
+ - [Examples](docs/public/examples.md) - Practical usage examples and common workflows
96
+
97
+ ## Basic Command Options
98
+
99
+ - `--dry-run`: Perform a dry run without saving files
100
+ - `--verbose`: Enable verbose logging
101
+ - `--debug`: Enable debug logging
102
+ - `--check-config`: Display current configuration hierarchy
103
+ - `--version`: Display version information
104
+
105
+ For complete command-line options and detailed usage, see the [Configuration Documentation](docs/public/configuration.md).
106
+
107
+ ## Environment Variables
108
+
109
+ KodrDriv requires OpenAI API credentials for AI-powered features:
110
+
111
+ - `OPENAI_API_KEY`: OpenAI API key (required)
112
+ - `GITHUB_TOKEN`: Required for publish command and GitHub operations
113
+
114
+ ## Contributing
115
+
116
+ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
117
+
118
+ ## License
119
+
120
+ Apache-2.0 - see [LICENSE](LICENSE) file for details.
121
+
122
+ ## About the Name
123
+
124
+ Ski carving and efficient software development have a lot in common. Carving uses edge control to follow a smooth, energy-efficient arc — just like automation uses clean, repeatable scripts to replace manual work. Both are about flow: linking turns or commits without hesitation. As carving unlocks speed and control, automation unlocks scalability and momentum. The result is clean tracks — razor-thin arcs on snow, or tidy diffs in code. And when you've mastered your craft, you don't stop to think about your last move. Your code leaves a clean trail — and your commit message can be automated straight from the diff.
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
@@ -0,0 +1,188 @@
1
+ # Advanced Usage
2
+
3
+ This section covers advanced features and customization options for KodrDriv.
4
+
5
+ ## Custom Instructions
6
+
7
+ KodrDriv comes with default instructions that guide the AI in generating release notes or change logs. These instructions can be customized to match your project's specific needs and conventions.
8
+
9
+ ### Default Instructions
10
+
11
+ The default instructions are defined in the source code:
12
+
13
+ - **Commit Instructions**: The default instructions for commit message generation are defined in [src/prompt/instructions/commit.ts](https://github.com/eldrforge/kodrdriv/blob/main/src/prompt/instructions/commit.ts).
14
+
15
+ - **Release Instructions**: The default instructions for release notes generation are defined in [src/prompt/instructions/release.ts](https://github.com/eldrforge/kodrdriv/blob/main/src/prompt/instructions/release.ts).
16
+
17
+ These instruction files contain detailed guidelines for the AI on how to format and structure the output, including examples and specific requirements for different types of changes.
18
+
19
+ ### Customizing Instructions
20
+
21
+ You can override these default instructions in several ways:
22
+
23
+ 1. **Command Line Option**: Use the `--instructions` flag to specify a custom instructions file:
24
+ ```bash
25
+ kodrdriv --instructions ./my-custom-instructions.txt
26
+ ```
27
+
28
+ 2. **Default Location**: Even without specifying a command line option, KodrDriv will automatically look for an instructions file at `./.kodrdriv/instructions.md` in your current working directory.
29
+
30
+ 3. **File Format**: While the default file is named `instructions.md`, you can use any text file with any extension. The content doesn't have to be in Markdown format - any plain text content will work. This gives you flexibility to use your preferred text editor or format for writing instructions.
31
+
32
+ ### Extending Default Instructions
33
+
34
+ The configuration directory (configDir) allows you to further customize both commit and release instructions by adding pre and post content to the default instructions. This is done by creating additional files in your `.kodrdriv/instructions` directory:
35
+
36
+ #### Release Instructions
37
+ 1. **Pre-Content**: Create a file named `release-pre.md` to add content that will be prepended to the default release instructions.
38
+ 2. **Post-Content**: Create a file named `release-post.md` to add content that should be appended to the default release instructions.
39
+
40
+ #### Commit Instructions
41
+ 1. **Pre-Content**: Create a file named `commit-pre.md` to add content that will be prepended to the default commit instructions.
42
+ 2. **Post-Content**: Create a file named `commit-post.md` to add content that should be appended to the default commit instructions.
43
+
44
+ For example, if you want to add specific formatting requirements before the default release instructions, you could create `.kodrdriv/instructions/release-pre.md`, and if you want to add instructions to the end of the commit instructions, you would have a file in `.kodrdriv/instructions/commit-post.md`.
45
+
46
+ ### Overriding Default Instructions
47
+
48
+ While the pre and post content files provide a way to extend the default instructions, you can also completely replace them by creating either `commit.md` or `release.md` in your `.kodrdriv/instructions` directory. This gives you full control over the instruction content.
49
+
50
+ However, please note that completely replacing the default instructions should be done with caution. The default instructions are carefully crafted to:
51
+ - Ensure consistent formatting
52
+ - Maintain proper context awareness
53
+ - Follow best practices for commit messages and release notes
54
+ - Handle edge cases and special scenarios
55
+
56
+ By replacing these instructions entirely, you may lose these benefits and potentially create inconsistencies in your documentation. It's recommended to use the pre and post content files to extend the default instructions rather than replacing them entirely, unless you have a specific need to do so.
57
+
58
+ To enable instruction overrides, you'll need to use the `--overrides` flag when running the command.
59
+
60
+ ## Context
61
+
62
+ KodrDriv can use contextual information about your project to generate more meaningful commit messages and release notes. Context is provided through Markdown files stored in a dedicated directory.
63
+
64
+ ### Context Directory Structure
65
+
66
+ The structure of your context directory is entirely up to you. There are no strict requirements for how you organize your context files - you can structure them in whatever way makes the most sense for your project and team.
67
+
68
+ Here are two example approaches to organizing context files:
69
+
70
+ #### Hierarchical Structure Example
71
+
72
+ You can organize context in a hierarchical structure with subdirectories for different categories:
73
+
74
+ ```
75
+ .kodrdriv/context/
76
+ ├── context.md # Main context file describing sections
77
+ ├── people/ # Directory for information about people
78
+ │ ├── context.md # Description of the people section
79
+ │ ├── team-members.md # Information about team members
80
+ │ └── contributors.md # Information about contributors
81
+ ├── projects/ # Directory for project information
82
+ │ ├── context.md # Description of the projects section
83
+ │ └── project-details.md # Details about various projects
84
+ └── technologies/ # Directory for technical information
85
+ ├── context.md # Description of the technologies section
86
+ ├── frameworks.md # Information about frameworks used
87
+ └── libraries.md # Information about libraries used
88
+ ```
89
+
90
+ #### Individual Records Example
91
+
92
+ Alternatively, you can use a flatter structure with individual files for each entity:
93
+
94
+ ```
95
+ .kodrdriv/context/
96
+ ├── context.md # Main context file describing sections
97
+ ├── people/ # Directory for individual people information
98
+ │ ├── context.md # Description of the people section
99
+ │ ├── john-doe.md # Information specific to John Doe
100
+ │ ├── jane-smith.md # Information specific to Jane Smith
101
+ │ └── alex-johnson.md # Information specific to Alex Johnson
102
+ ```
103
+
104
+ Choose the organization that works best for your needs. The system will process the context files regardless of the structure, as long as they follow the basic Markdown formatting guidelines.
105
+
106
+ ### Main Context File
107
+
108
+ The `context.md` file in each directory serves as an introduction to that section. The system loads this file first to understand the structure of the information. For example, a `context.md` file in the people directory might look like:
109
+
110
+ ```markdown
111
+ ## People
112
+
113
+ This section contains subsections that have information about people.
114
+ ```
115
+
116
+ ### Context Files
117
+
118
+ After loading the `context.md` file, the system reads all other Markdown files in the directory. It uses the first header in each file as the name of the section or subsection. For example:
119
+
120
+ ```markdown
121
+ ## Team Members
122
+
123
+ - John Doe: Lead Developer, focuses on backend systems
124
+ - Jane Smith: UX Designer, specializes in responsive interfaces
125
+ - Alex Johnson: DevOps Engineer, manages deployment pipelines
126
+ ```
127
+
128
+ ### Context Location
129
+
130
+ You can specify where to store your context files in two recommended ways:
131
+
132
+ 1. **Project Directory**: Store context files in your project repository at `.kodrdriv/context/`. This is useful when the context is specific to the project and should be versioned with the code.
133
+
134
+ 2. **gitignore Directory**: Alternatively, you can store context in your `.gitignore` directory if you want to keep it separate from your project files or if the context contains sensitive information that shouldn't be committed to the repository.
135
+
136
+ To specify a custom context directory, use the `--context-dir` option:
137
+
138
+ ```bash
139
+ kodrdriv commit --context-dir ~/my-custom-context
140
+ ```
141
+
142
+ By default, KodrDriv looks for context in the `.kodrdriv/context` directory within your project.
143
+
144
+ ## Prompt Structure
145
+
146
+ When KodrDriv sends a request to the LLM, it structures the prompt using XML-like tags to organize different components of the input. The prompt is composed of three main sections:
147
+
148
+ ```
149
+ <instructions>
150
+ [Your custom instructions or the default instructions]
151
+ </instructions>
152
+
153
+ <log>
154
+ [Git log output if --content-types includes 'log']
155
+ </log>
156
+
157
+ <diff>
158
+ [Git diff output if --content-types includes 'diff']
159
+ </diff>
160
+ ```
161
+
162
+ Each section serves a specific purpose:
163
+ - `<instructions>`: Contains the guidance for the LLM on how to format and structure the output
164
+ - `<log>`: Contains the git log output, providing commit history and messages
165
+ - `<diff>`: Contains the git diff output, showing the actual code changes
166
+
167
+ ## About the Name
168
+
169
+ Ski carving and efficient software development have a lot in common. Carving uses edge control to follow a smooth, energy-efficient arc — just like automation uses clean, repeatable scripts to replace manual work. Both are about flow: linking turns or commits without hesitation. As carving unlocks speed and control, automation unlocks scalability and momentum. The result is clean tracks — razor-thin arcs on snow, or tidy diffs in code. And when you've mastered your craft, you don't stop to think about your last move. Your code leaves a clean trail — and your commit message can be automated straight from the diff. And — snowboarders carve too. Different board, same beauty. We won't hold it against you if you're dropping clean edges on a single plank.
170
+
171
+ ## Origin Story: kodrdriv
172
+
173
+ It always happened at the same moment.
174
+
175
+ You've just spent the entire day in a flow state — the kind that only comes when everything clicks. Whether it was writing code for a critical feature or hammering out chapters of a Markdown or AsciiDoc book, you were locked in. Maybe you were racing the clock to hit a deadline. Maybe you were just up late trying to carve something beautiful out of nothing. Either way, you went right up to the wire, focused, dialed in, exhausted but satisfied.
176
+
177
+ And then… Git hits you with the meta-question:
178
+ "What did you do?"
179
+
180
+ That one prompt — to sum it all up in a commit message — feels totally out of place. It asks you to stop, zoom out, and articulate everything you've just done, right when your brain is at its least reflective. You're not in summary mode. You're still in it. Still shaping. Still carving.
181
+
182
+ And that's the thing: it sounds silly, like it shouldn't be a real problem. But every developer, every writer who lives in Git knows that exact moment. The friction is real. The context switch is jarring. It's like being asked to narrate your entire ski run after you've blasted through powder, dodged trees, hit the cliff drop — and now you're out of breath, standing at the bottom, being asked to give a PowerPoint.
183
+
184
+ That's why I built kodrdriv.
185
+
186
+ It's not just a tool — it's a mindset shift. The idea is simple: you've already carved your line in the snow. Your code is there. Your diffs are real. Instead of making you explain it, kodrdriv uses an LLM to read the trail you left behind and generate a clean, meaningful commit message. One that actually reflects your work — without breaking your flow or making you guess what mattered most.
187
+
188
+ Whether you're merging branches or writing books, kodrdriv is built for that end-of-day moment when you want to commit and move on — not pause for existential reflection. It reads the line you've drawn, and it helps you push it forward.
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2
+ <polyline points="16,18 22,12 16,6"></polyline>
3
+ <polyline points="8,6 2,12 8,18"></polyline>
4
+ </svg>