@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.
Files changed (75) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.md +40 -0
  2. package/.github/ISSUE_TEMPLATE/feature_request.md +31 -0
  3. package/.github/pull_request_template.md +48 -0
  4. package/.github/workflows/deploy-docs.yml +59 -0
  5. package/.github/workflows/npm-publish.yml +48 -0
  6. package/.github/workflows/test.yml +48 -0
  7. package/CHANGELOG.md +92 -0
  8. package/CONTRIBUTING.md +438 -0
  9. package/LICENSE +190 -0
  10. package/PROJECT_SUMMARY.md +318 -0
  11. package/README.md +444 -0
  12. package/RELEASE_CHECKLIST.md +182 -0
  13. package/dist/application.js +166 -0
  14. package/dist/application.js.map +1 -0
  15. package/dist/commands/release.js +326 -0
  16. package/dist/commands/release.js.map +1 -0
  17. package/dist/constants.js +122 -0
  18. package/dist/constants.js.map +1 -0
  19. package/dist/logging.js +176 -0
  20. package/dist/logging.js.map +1 -0
  21. package/dist/main.js +24 -0
  22. package/dist/main.js.map +1 -0
  23. package/dist/mcp-server.js +17467 -0
  24. package/dist/mcp-server.js.map +7 -0
  25. package/dist/utils/config.js +89 -0
  26. package/dist/utils/config.js.map +1 -0
  27. package/docs/AI_GUIDE.md +618 -0
  28. package/eslint.config.mjs +85 -0
  29. package/guide/architecture.md +776 -0
  30. package/guide/commands.md +580 -0
  31. package/guide/configuration.md +779 -0
  32. package/guide/mcp-integration.md +708 -0
  33. package/guide/overview.md +225 -0
  34. package/package.json +91 -0
  35. package/scripts/build-mcp.js +115 -0
  36. package/scripts/test-mcp-compliance.js +254 -0
  37. package/src/application.ts +246 -0
  38. package/src/commands/release.ts +450 -0
  39. package/src/constants.ts +162 -0
  40. package/src/logging.ts +210 -0
  41. package/src/main.ts +25 -0
  42. package/src/mcp/prompts/index.ts +98 -0
  43. package/src/mcp/resources.ts +121 -0
  44. package/src/mcp/server.ts +195 -0
  45. package/src/mcp/tools.ts +219 -0
  46. package/src/types.ts +131 -0
  47. package/src/utils/config.ts +181 -0
  48. package/tests/application.test.ts +114 -0
  49. package/tests/commands/commit.test.ts +248 -0
  50. package/tests/commands/release.test.ts +325 -0
  51. package/tests/constants.test.ts +118 -0
  52. package/tests/logging.test.ts +142 -0
  53. package/tests/mcp/prompts/index.test.ts +202 -0
  54. package/tests/mcp/resources.test.ts +166 -0
  55. package/tests/mcp/tools.test.ts +211 -0
  56. package/tests/utils/config.test.ts +212 -0
  57. package/tsconfig.json +32 -0
  58. package/vite.config.ts +107 -0
  59. package/vitest.config.ts +40 -0
  60. package/website/index.html +14 -0
  61. package/website/src/App.css +142 -0
  62. package/website/src/App.tsx +34 -0
  63. package/website/src/components/Commands.tsx +182 -0
  64. package/website/src/components/Configuration.tsx +214 -0
  65. package/website/src/components/Examples.tsx +234 -0
  66. package/website/src/components/Footer.css +99 -0
  67. package/website/src/components/Footer.tsx +93 -0
  68. package/website/src/components/GettingStarted.tsx +94 -0
  69. package/website/src/components/Hero.css +95 -0
  70. package/website/src/components/Hero.tsx +50 -0
  71. package/website/src/components/Navigation.css +102 -0
  72. package/website/src/components/Navigation.tsx +57 -0
  73. package/website/src/index.css +36 -0
  74. package/website/src/main.tsx +10 -0
  75. package/website/vite.config.ts +12 -0
@@ -0,0 +1,99 @@
1
+ .footer {
2
+ background-color: var(--color-bg-secondary);
3
+ border-top: 1px solid var(--color-border);
4
+ margin-top: auto;
5
+ padding: 3rem 2rem 1rem;
6
+ }
7
+
8
+ .footer-content {
9
+ max-width: 1200px;
10
+ margin: 0 auto;
11
+ display: grid;
12
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
13
+ gap: 2rem;
14
+ margin-bottom: 2rem;
15
+ }
16
+
17
+ .footer-section h3 {
18
+ color: var(--color-primary);
19
+ margin-bottom: 0.5rem;
20
+ font-size: 1.25rem;
21
+ }
22
+
23
+ .footer-section h4 {
24
+ color: var(--color-text);
25
+ margin-bottom: 0.75rem;
26
+ font-size: 1rem;
27
+ font-weight: 600;
28
+ }
29
+
30
+ .footer-section p {
31
+ color: var(--color-text-secondary);
32
+ font-size: 0.9rem;
33
+ margin-bottom: 0.5rem;
34
+ }
35
+
36
+ .footer-version {
37
+ font-family: var(--font-mono);
38
+ font-size: 0.85rem !important;
39
+ color: var(--color-accent) !important;
40
+ }
41
+
42
+ .footer-section ul {
43
+ list-style: none;
44
+ padding: 0;
45
+ }
46
+
47
+ .footer-section ul li {
48
+ margin-bottom: 0.5rem;
49
+ }
50
+
51
+ .footer-section ul li a {
52
+ color: var(--color-text-secondary);
53
+ text-decoration: none;
54
+ transition: color 0.2s;
55
+ font-size: 0.9rem;
56
+ }
57
+
58
+ .footer-section ul li a:hover {
59
+ color: var(--color-primary);
60
+ }
61
+
62
+ .footer-bottom {
63
+ max-width: 1200px;
64
+ margin: 0 auto;
65
+ padding-top: 2rem;
66
+ border-top: 1px solid var(--color-border);
67
+ text-align: center;
68
+ color: var(--color-text-secondary);
69
+ font-size: 0.875rem;
70
+ }
71
+
72
+ .footer-bottom p {
73
+ margin-bottom: 0.5rem;
74
+ }
75
+
76
+ .footer-bottom a {
77
+ color: var(--color-primary);
78
+ text-decoration: none;
79
+ }
80
+
81
+ .footer-bottom a:hover {
82
+ text-decoration: underline;
83
+ }
84
+
85
+ .footer-tagline {
86
+ opacity: 0.7;
87
+ font-style: italic;
88
+ }
89
+
90
+ @media (max-width: 768px) {
91
+ .footer {
92
+ padding: 2rem 1rem 1rem;
93
+ }
94
+
95
+ .footer-content {
96
+ grid-template-columns: 1fr;
97
+ gap: 1.5rem;
98
+ }
99
+ }
@@ -0,0 +1,93 @@
1
+ import React from 'react';
2
+ import './Footer.css';
3
+
4
+ const Footer: React.FC = () => {
5
+ const currentYear = new Date().getFullYear();
6
+
7
+ return (
8
+ <footer className="footer">
9
+ <div className="footer-content">
10
+ <div className="footer-section">
11
+ <h3>Kilde</h3>
12
+ <p>Universal Git Automation Tool</p>
13
+ <p className="footer-version">Version 0.1.0</p>
14
+ </div>
15
+
16
+ <div className="footer-section">
17
+ <h4>Documentation</h4>
18
+ <ul>
19
+ <li>
20
+ <a href="https://github.com/grunnverk/kilde#readme" target="_blank" rel="noopener noreferrer">
21
+ README
22
+ </a>
23
+ </li>
24
+ <li>
25
+ <a href="https://github.com/grunnverk/kilde/blob/main/docs/AI_GUIDE.md" target="_blank" rel="noopener noreferrer">
26
+ AI Guide
27
+ </a>
28
+ </li>
29
+ <li>
30
+ <a href="https://github.com/grunnverk/kilde/blob/main/CONTRIBUTING.md" target="_blank" rel="noopener noreferrer">
31
+ Contributing
32
+ </a>
33
+ </li>
34
+ </ul>
35
+ </div>
36
+
37
+ <div className="footer-section">
38
+ <h4>Community</h4>
39
+ <ul>
40
+ <li>
41
+ <a href="https://github.com/grunnverk/kilde" target="_blank" rel="noopener noreferrer">
42
+ GitHub
43
+ </a>
44
+ </li>
45
+ <li>
46
+ <a href="https://github.com/grunnverk/kilde/issues" target="_blank" rel="noopener noreferrer">
47
+ Issues
48
+ </a>
49
+ </li>
50
+ <li>
51
+ <a href="https://www.npmjs.com/package/@grunnverk/kilde" target="_blank" rel="noopener noreferrer">
52
+ npm Package
53
+ </a>
54
+ </li>
55
+ </ul>
56
+ </div>
57
+
58
+ <div className="footer-section">
59
+ <h4>Related</h4>
60
+ <ul>
61
+ <li>
62
+ <a href="https://www.conventionalcommits.org/" target="_blank" rel="noopener noreferrer">
63
+ Conventional Commits
64
+ </a>
65
+ </li>
66
+ <li>
67
+ <a href="https://modelcontextprotocol.io/" target="_blank" rel="noopener noreferrer">
68
+ Model Context Protocol
69
+ </a>
70
+ </li>
71
+ <li>
72
+ <a href="https://github.com/grunnverk" target="_blank" rel="noopener noreferrer">
73
+ @grunnverk
74
+ </a>
75
+ </li>
76
+ </ul>
77
+ </div>
78
+ </div>
79
+
80
+ <div className="footer-bottom">
81
+ <p>
82
+ © {currentYear} Grunnverk. Licensed under{' '}
83
+ <a href="https://github.com/grunnverk/kilde/blob/main/LICENSE" target="_blank" rel="noopener noreferrer">
84
+ Apache-2.0
85
+ </a>
86
+ </p>
87
+ <p className="footer-tagline">Built with Claude Sonnet 4.5</p>
88
+ </div>
89
+ </footer>
90
+ );
91
+ };
92
+
93
+ export default Footer;
@@ -0,0 +1,94 @@
1
+ import React from 'react';
2
+
3
+ const GettingStarted: React.FC = () => {
4
+ return (
5
+ <div className="section">
6
+ <h2>Getting Started</h2>
7
+
8
+ <div className="grid grid-3">
9
+ <div className="card">
10
+ <div className="feature-icon">1️⃣</div>
11
+ <h3>Install</h3>
12
+ <p>Install Kilde globally via npm:</p>
13
+ <div className="code-block">
14
+ <pre>npm install -g @grunnverk/kilde</pre>
15
+ </div>
16
+ </div>
17
+
18
+ <div className="card">
19
+ <div className="feature-icon">2️⃣</div>
20
+ <h3>Configure</h3>
21
+ <p>Set your API key:</p>
22
+ <div className="code-block">
23
+ <pre>{`export OPENAI_API_KEY=sk-...`}</pre>
24
+ </div>
25
+ </div>
26
+
27
+ <div className="card">
28
+ <div className="feature-icon">3️⃣</div>
29
+ <h3>Use</h3>
30
+ <p>Generate your first commit:</p>
31
+ <div className="code-block">
32
+ <pre>kilde commit</pre>
33
+ </div>
34
+ </div>
35
+ </div>
36
+
37
+ <h3>Quick Example</h3>
38
+ <div className="code-block">
39
+ <pre>{`# Make some changes
40
+ echo "export function hello() { return 'world'; }" > hello.ts
41
+
42
+ # Generate AI-powered commit message
43
+ kilde commit --add
44
+
45
+ # Generated message:
46
+ # feat: add hello world function
47
+ #
48
+ # Implement a basic hello() function that returns
49
+ # the string 'world' for greeting functionality.`}</pre>
50
+ </div>
51
+
52
+ <h3>Key Features</h3>
53
+ <div className="grid grid-2">
54
+ <div className="card">
55
+ <h3>🎯 Smart Commits</h3>
56
+ <p>
57
+ AI analyzes your changes and generates meaningful commit messages
58
+ following Conventional Commits format. Understands context from
59
+ your codebase and suggests appropriate commit types and scopes.
60
+ </p>
61
+ </div>
62
+
63
+ <div className="card">
64
+ <h3>📝 Release Notes</h3>
65
+ <p>
66
+ Generate comprehensive release notes from git history. Works with
67
+ any git host, groups changes by type, and creates professional
68
+ documentation automatically.
69
+ </p>
70
+ </div>
71
+
72
+ <div className="card">
73
+ <h3>🔌 MCP Integration</h3>
74
+ <p>
75
+ Integrate with Claude Desktop or Claude Code via Model Context
76
+ Protocol. Execute git operations through natural language
77
+ conversation with AI assistants.
78
+ </p>
79
+ </div>
80
+
81
+ <div className="card">
82
+ <h3>⚙️ Flexible Config</h3>
83
+ <p>
84
+ Configure via YAML or JSON files. Supports multiple locations,
85
+ deep merge with defaults, and command-line overrides for maximum
86
+ flexibility.
87
+ </p>
88
+ </div>
89
+ </div>
90
+ </div>
91
+ );
92
+ };
93
+
94
+ export default GettingStarted;
@@ -0,0 +1,95 @@
1
+ .hero {
2
+ background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-secondary) 100%);
3
+ padding: 6rem 2rem;
4
+ text-align: center;
5
+ border-bottom: 1px solid var(--color-border);
6
+ }
7
+
8
+ .hero-content {
9
+ max-width: 900px;
10
+ margin: 0 auto;
11
+ }
12
+
13
+ .hero-title {
14
+ font-size: 3.5rem;
15
+ font-weight: 800;
16
+ margin-bottom: 1.5rem;
17
+ background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
18
+ -webkit-background-clip: text;
19
+ -webkit-text-fill-color: transparent;
20
+ background-clip: text;
21
+ line-height: 1.2;
22
+ }
23
+
24
+ .hero-subtitle {
25
+ font-size: 1.25rem;
26
+ color: var(--color-text-secondary);
27
+ margin-bottom: 3rem;
28
+ line-height: 1.8;
29
+ max-width: 700px;
30
+ margin-left: auto;
31
+ margin-right: auto;
32
+ }
33
+
34
+ .hero-features {
35
+ display: flex;
36
+ justify-content: center;
37
+ gap: 2rem;
38
+ margin-bottom: 3rem;
39
+ flex-wrap: wrap;
40
+ }
41
+
42
+ .hero-feature {
43
+ display: flex;
44
+ align-items: center;
45
+ gap: 0.5rem;
46
+ font-size: 1.1rem;
47
+ color: var(--color-text);
48
+ }
49
+
50
+ .feature-emoji {
51
+ font-size: 1.5rem;
52
+ }
53
+
54
+ .hero-actions {
55
+ display: flex;
56
+ justify-content: center;
57
+ gap: 1rem;
58
+ margin-bottom: 3rem;
59
+ flex-wrap: wrap;
60
+ }
61
+
62
+ .hero-install {
63
+ max-width: 600px;
64
+ margin: 0 auto;
65
+ }
66
+
67
+ .hero-install .code-block {
68
+ text-align: left;
69
+ background-color: rgba(30, 41, 59, 0.8);
70
+ border: 1px solid var(--color-primary);
71
+ }
72
+
73
+ @media (max-width: 768px) {
74
+ .hero {
75
+ padding: 4rem 1rem;
76
+ }
77
+
78
+ .hero-title {
79
+ font-size: 2.5rem;
80
+ }
81
+
82
+ .hero-subtitle {
83
+ font-size: 1.1rem;
84
+ }
85
+
86
+ .hero-features {
87
+ flex-direction: column;
88
+ align-items: center;
89
+ gap: 1rem;
90
+ }
91
+
92
+ .hero-actions {
93
+ flex-direction: column;
94
+ }
95
+ }
@@ -0,0 +1,50 @@
1
+ import React from 'react';
2
+ import './Hero.css';
3
+
4
+ const Hero: React.FC = () => {
5
+ return (
6
+ <div className="hero">
7
+ <div className="hero-content">
8
+ <h1 className="hero-title">
9
+ Universal Git Automation
10
+ </h1>
11
+ <p className="hero-subtitle">
12
+ AI-powered commit messages and release notes for any git repository,
13
+ regardless of programming language or hosting platform.
14
+ </p>
15
+
16
+ <div className="hero-features">
17
+ <div className="hero-feature">
18
+ <span className="feature-emoji">🌍</span>
19
+ <span>Language-Agnostic</span>
20
+ </div>
21
+ <div className="hero-feature">
22
+ <span className="feature-emoji">🤖</span>
23
+ <span>AI-Powered</span>
24
+ </div>
25
+ <div className="hero-feature">
26
+ <span className="feature-emoji">🔌</span>
27
+ <span>MCP Integration</span>
28
+ </div>
29
+ </div>
30
+
31
+ <div className="hero-actions">
32
+ <a href="https://www.npmjs.com/package/@grunnverk/kilde" className="button">
33
+ Get Started
34
+ </a>
35
+ <a href="https://github.com/grunnverk/kilde" className="button button-secondary">
36
+ View on GitHub
37
+ </a>
38
+ </div>
39
+
40
+ <div className="hero-install">
41
+ <div className="code-block">
42
+ <pre>npm install -g @grunnverk/kilde</pre>
43
+ </div>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ );
48
+ };
49
+
50
+ export default Hero;
@@ -0,0 +1,102 @@
1
+ .navigation {
2
+ background-color: var(--color-bg-secondary);
3
+ border-bottom: 1px solid var(--color-border);
4
+ position: sticky;
5
+ top: 0;
6
+ z-index: 100;
7
+ backdrop-filter: blur(10px);
8
+ }
9
+
10
+ .nav-container {
11
+ max-width: 1200px;
12
+ margin: 0 auto;
13
+ padding: 1rem 2rem;
14
+ display: flex;
15
+ justify-content: space-between;
16
+ align-items: center;
17
+ }
18
+
19
+ .nav-brand {
20
+ display: flex;
21
+ align-items: baseline;
22
+ gap: 1rem;
23
+ }
24
+
25
+ .nav-brand h1 {
26
+ font-size: 1.75rem;
27
+ font-weight: 700;
28
+ color: var(--color-primary);
29
+ margin: 0;
30
+ }
31
+
32
+ .nav-tagline {
33
+ font-size: 0.875rem;
34
+ color: var(--color-text-secondary);
35
+ }
36
+
37
+ .nav-links {
38
+ display: flex;
39
+ gap: 1rem;
40
+ align-items: center;
41
+ }
42
+
43
+ .nav-links button,
44
+ .nav-links a {
45
+ padding: 0.5rem 1rem;
46
+ background: none;
47
+ border: none;
48
+ color: var(--color-text-secondary);
49
+ cursor: pointer;
50
+ font-size: 1rem;
51
+ text-decoration: none;
52
+ transition: color 0.2s;
53
+ font-family: inherit;
54
+ }
55
+
56
+ .nav-links button:hover,
57
+ .nav-links a:hover {
58
+ color: var(--color-text);
59
+ }
60
+
61
+ .nav-links button.active {
62
+ color: var(--color-primary);
63
+ font-weight: 600;
64
+ }
65
+
66
+ .nav-github {
67
+ background-color: var(--color-primary);
68
+ color: white !important;
69
+ border-radius: 6px;
70
+ padding: 0.5rem 1rem !important;
71
+ font-weight: 600;
72
+ }
73
+
74
+ .nav-github:hover {
75
+ background-color: var(--color-primary-hover);
76
+ }
77
+
78
+ @media (max-width: 768px) {
79
+ .nav-container {
80
+ flex-direction: column;
81
+ gap: 1rem;
82
+ padding: 1rem;
83
+ }
84
+
85
+ .nav-brand {
86
+ flex-direction: column;
87
+ align-items: center;
88
+ gap: 0.25rem;
89
+ text-align: center;
90
+ }
91
+
92
+ .nav-links {
93
+ flex-wrap: wrap;
94
+ justify-content: center;
95
+ }
96
+
97
+ .nav-links button,
98
+ .nav-links a {
99
+ font-size: 0.9rem;
100
+ padding: 0.4rem 0.8rem;
101
+ }
102
+ }
@@ -0,0 +1,57 @@
1
+ import React from 'react';
2
+ import './Navigation.css';
3
+
4
+ interface NavigationProps {
5
+ activeSection: string;
6
+ onNavigate: (section: string) => void;
7
+ }
8
+
9
+ const Navigation: React.FC<NavigationProps> = ({ activeSection, onNavigate }) => {
10
+ return (
11
+ <nav className="navigation">
12
+ <div className="nav-container">
13
+ <div className="nav-brand">
14
+ <h1>Kilde</h1>
15
+ <span className="nav-tagline">Universal Git Automation</span>
16
+ </div>
17
+
18
+ <div className="nav-links">
19
+ <button
20
+ className={activeSection === 'home' ? 'active' : ''}
21
+ onClick={() => onNavigate('home')}
22
+ >
23
+ Home
24
+ </button>
25
+ <button
26
+ className={activeSection === 'commands' ? 'active' : ''}
27
+ onClick={() => onNavigate('commands')}
28
+ >
29
+ Commands
30
+ </button>
31
+ <button
32
+ className={activeSection === 'configuration' ? 'active' : ''}
33
+ onClick={() => onNavigate('configuration')}
34
+ >
35
+ Configuration
36
+ </button>
37
+ <button
38
+ className={activeSection === 'examples' ? 'active' : ''}
39
+ onClick={() => onNavigate('examples')}
40
+ >
41
+ Examples
42
+ </button>
43
+ <a
44
+ href="https://github.com/grunnverk/kilde"
45
+ target="_blank"
46
+ rel="noopener noreferrer"
47
+ className="nav-github"
48
+ >
49
+ GitHub
50
+ </a>
51
+ </div>
52
+ </div>
53
+ </nav>
54
+ );
55
+ };
56
+
57
+ export default Navigation;
@@ -0,0 +1,36 @@
1
+ :root {
2
+ --color-bg: #0f172a;
3
+ --color-bg-secondary: #1e293b;
4
+ --color-text: #f1f5f9;
5
+ --color-text-secondary: #cbd5e1;
6
+ --color-primary: #3b82f6;
7
+ --color-primary-hover: #2563eb;
8
+ --color-accent: #8b5cf6;
9
+ --color-border: #334155;
10
+ --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Droid Sans Mono', 'Source Code Pro', monospace;
11
+ }
12
+
13
+ * {
14
+ margin: 0;
15
+ padding: 0;
16
+ box-sizing: border-box;
17
+ }
18
+
19
+ body {
20
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
21
+ 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
22
+ sans-serif;
23
+ -webkit-font-smoothing: antialiased;
24
+ -moz-osx-font-smoothing: grayscale;
25
+ background-color: var(--color-bg);
26
+ color: var(--color-text);
27
+ line-height: 1.6;
28
+ }
29
+
30
+ code, pre {
31
+ font-family: var(--font-mono);
32
+ }
33
+
34
+ #root {
35
+ min-height: 100vh;
36
+ }
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import ReactDOM from 'react-dom/client';
3
+ import App from './App';
4
+ import './index.css';
5
+
6
+ ReactDOM.createRoot(document.getElementById('root')!).render(
7
+ <React.StrictMode>
8
+ <App />
9
+ </React.StrictMode>,
10
+ );
@@ -0,0 +1,12 @@
1
+ import { defineConfig } from 'vite';
2
+ import react from '@vitejs/plugin-react';
3
+
4
+ export default defineConfig({
5
+ plugins: [react()],
6
+ root: '.',
7
+ base: '/kilde/',
8
+ build: {
9
+ outDir: 'dist',
10
+ emptyOutDir: true,
11
+ },
12
+ });