clevermation-cli 0.3.2

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.
@@ -0,0 +1,46 @@
1
+ name: Publish to npm
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ publish:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ contents: read
12
+
13
+ steps:
14
+ - name: Checkout
15
+ uses: actions/checkout@v4
16
+
17
+ - name: Setup Bun
18
+ uses: oven-sh/setup-bun@v2
19
+ with:
20
+ bun-version: latest
21
+
22
+ - name: Install dependencies
23
+ run: bun install
24
+
25
+ - name: Run tests
26
+ run: bun test || echo "No tests found, skipping..."
27
+
28
+ - name: Setup Node for NPM publish
29
+ uses: actions/setup-node@v4
30
+ with:
31
+ node-version: '20'
32
+ registry-url: 'https://registry.npmjs.org'
33
+
34
+ - name: Update version from release tag
35
+ run: |
36
+ VERSION=${GITHUB_REF#refs/tags/v}
37
+ echo "Updating version to $VERSION"
38
+ # Update package.json
39
+ jq --arg v "$VERSION" '.version = $v' package.json > tmp.json && mv tmp.json package.json
40
+ # Update src/index.ts
41
+ sed -i "s/const VERSION = '[^']*'/const VERSION = '$VERSION'/" src/index.ts
42
+
43
+ - name: Publish to npm
44
+ run: npm publish --access public
45
+ env:
46
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/CLAUDE.md ADDED
@@ -0,0 +1,167 @@
1
+ # Clevermation CLI
2
+
3
+ ## Projektziel
4
+
5
+ Interne CLI für das Clevermation-Team zur standardisierten Einrichtung und Verwaltung von Claude Code Projekten. Die CLI ermöglicht Teammitgliedern, schnell und konsistent Projekte aufzusetzen, ohne manuell Tools konfigurieren zu müssen.
6
+
7
+ ## Warum dieses Projekt?
8
+
9
+ - **Konsistenz**: Alle Projekte haben die gleiche Struktur und Konfiguration
10
+ - **Onboarding**: Neue Teammitglieder können sofort produktiv arbeiten
11
+ - **Automatisierung**: Authentifizierung, GitHub-Repos, Claude Code Plugins - alles automatisch
12
+ - **Best Practices**: Clevermation-Standards sind eingebaut (Naming, Struktur, Tools)
13
+
14
+ ## Tech-Stack
15
+
16
+ | Technologie | Zweck |
17
+ |-------------|-------|
18
+ | **Bun** | Runtime (TypeScript) |
19
+ | **Commander.js** | CLI Framework |
20
+ | **@inquirer/prompts** | Interaktive Prompts (Checkboxen, Selects) |
21
+ | **chalk** | Farbige Konsolen-Ausgabe |
22
+ | **ora** | Spinner für async Operationen |
23
+ | **execa** | Externe CLI-Aufrufe (git, gh, supabase) |
24
+ | **Zod** | Config-Schema Validierung |
25
+ | **GitHub Packages** | Distribution (privates NPM) |
26
+
27
+ ## Projektstruktur
28
+
29
+ ```
30
+ clevermation-cli/
31
+ ├── bin/
32
+ │ ├── cl.ts # Entry Point (Alias: cl)
33
+ │ └── clever.ts # Entry Point (Alias: clever)
34
+ ├── src/
35
+ │ ├── index.ts # CLI Setup, Command-Registration
36
+ │ ├── commands/
37
+ │ │ ├── init.ts # Projekt initialisieren
38
+ │ │ ├── sync.ts # GitHub synchronisieren
39
+ │ │ ├── auth.ts # Service-Authentifizierung
40
+ │ │ ├── doctor.ts # System-Check
41
+ │ │ ├── open.ts # IDE öffnen
42
+ │ │ ├── config.ts # Konfiguration verwalten
43
+ │ │ ├── explain.ts # Projekt erklären
44
+ │ │ └── update.ts # CLI/Plugins updaten
45
+ │ ├── utils/
46
+ │ │ ├── logger.ts # Farbige Konsolen-Ausgabe
47
+ │ │ ├── config.ts # Config laden/speichern
48
+ │ │ ├── prerequisites.ts # System-Voraussetzungen prüfen/installieren
49
+ │ │ └── auto-update.ts # Update-Check im Hintergrund
50
+ │ └── types/
51
+ │ └── config.ts # Zod Schemas für Configs
52
+ ├── scripts/
53
+ │ └── setup-team-member.sh # Onboarding-Script
54
+ ├── .github/workflows/
55
+ │ └── publish.yml # Auto-Publish bei Release
56
+ └── package.json
57
+ ```
58
+
59
+ ## Commands
60
+
61
+ | Command | Beschreibung |
62
+ |---------|-------------|
63
+ | `cl init` | Neues Projekt mit interaktivem Setup |
64
+ | `cl sync` | GitHub Repo erstellen und synchronisieren |
65
+ | `cl auth` | Service-Authentifizierung (GitHub, Supabase, N8N, ElevenLabs) |
66
+ | `cl doctor` | System-Voraussetzungen prüfen |
67
+ | `cl open` | Projekt in IDE öffnen (VS Code default) |
68
+ | `cl config` | Konfiguration anzeigen/bearbeiten |
69
+ | `cl explain` | Projektstruktur erklären |
70
+ | `cl update` | CLI und Plugins aktualisieren |
71
+
72
+ ## Konfigurationsdateien
73
+
74
+ ### Global: `~/.clevermation/config.json`
75
+ ```json
76
+ {
77
+ "auth": { "github": {...}, "supabase": {...}, "n8n": {...} },
78
+ "preferences": { "defaultModel": "sonnet", "defaultIDE": "code" }
79
+ }
80
+ ```
81
+
82
+ ### Projekt: `.clevermation/config.json`
83
+ ```json
84
+ {
85
+ "project": { "name": "...", "type": "customer", "customer": "..." },
86
+ "services": { "github": {...}, "supabase": {...} },
87
+ "claudeCode": { "plugins": [...], "model": "sonnet" }
88
+ }
89
+ ```
90
+
91
+ ## Konventionen
92
+
93
+ ### Repository-Namen
94
+ - **Kundenprojekte**: `kunde-projekt` (z.B. `acme-webshop`)
95
+ - **Interne Projekte**: `clevermation-projekt` (z.B. `clevermation-cli`)
96
+ - **Alle Repos**: Privat in Clevermation Organisation
97
+
98
+ ### Code-Style
99
+ - TypeScript strict mode
100
+ - Deutsche Kommentare
101
+ - Bun statt npm/yarn/pnpm
102
+
103
+ ---
104
+
105
+ ## TODO
106
+
107
+ ### Kurzfristig
108
+ - [ ] CLAUDE.md Template für "Optimale Einstellungen" mit User verfeinern
109
+ - [ ] `cl new <name>` Shortcut (mkdir + cd + init)
110
+ - [ ] `cl plugins` Command für Plugin-Verwaltung
111
+
112
+ ### Claude Code Plugins (Marketplace)
113
+ - [ ] **Supabase Plugin** - Datenbank, Auth, Storage, Edge Functions, RLS
114
+ - [ ] **N8N Plugin** - Workflow Automation, Trigger, Nodes
115
+ - [ ] **ElevenLabs Plugin** - Voice AI, Text-to-Speech, Voice Cloning
116
+ - [ ] **Mermaid/Planning Plugin** - Diagramme, Flowcharts, Architektur
117
+
118
+ ### Future Features
119
+ - [ ] **Projekt-Templates** - Web-App, Automation, API vorkonfiguriert
120
+ - [ ] **Team-Settings Sync** - Globale Clevermation-Settings synchronisieren
121
+ - [ ] **Erweiterte CLAUDE.md** - Manager-Rolle, Subagenten-Orchestrierung, Testing-Workflow
122
+ - [ ] **`cl deploy`** - Deployment zu Vercel/Supabase/etc.
123
+
124
+ ---
125
+
126
+ ## Distribution
127
+
128
+ ### Installation
129
+ ```bash
130
+ # Mit Bun (empfohlen)
131
+ bun add -g clevermation-cli
132
+
133
+ # Mit npm
134
+ npm install -g clevermation-cli
135
+
136
+ # Mit pnpm
137
+ pnpm add -g clevermation-cli
138
+ ```
139
+
140
+ ### Release-Prozess
141
+ 1. Version in `package.json` und `src/index.ts` erhöhen
142
+ 2. Commit und Push
143
+ 3. `gh release create v0.x.0`
144
+ 4. GitHub Action published automatisch zu GitHub Packages
145
+
146
+ ---
147
+
148
+ ## Entwicklung
149
+
150
+ ```bash
151
+ # Lokal ausführen
152
+ bun run dev init
153
+ bun run dev doctor
154
+ bun run dev auth
155
+
156
+ # TypeScript prüfen
157
+ bun run typecheck
158
+
159
+ # Tests
160
+ bun test
161
+ ```
162
+
163
+ ## Links
164
+
165
+ - **Repository**: https://github.com/Clevermation/clevermation-cli
166
+ - **Releases**: https://github.com/Clevermation/clevermation-cli/releases
167
+ - **npm Package**: https://www.npmjs.com/package/clevermation-cli
package/README.md ADDED
@@ -0,0 +1,211 @@
1
+ # Clevermation CLI
2
+
3
+ Tool für das Clevermation-Team zur standardisierten Einrichtung von Claude Code Projekten.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ # Mit Bun (empfohlen)
9
+ bun add -g clevermation-cli
10
+
11
+ # Mit npm
12
+ npm install -g clevermation-cli
13
+
14
+ # Mit pnpm
15
+ pnpm add -g clevermation-cli
16
+ ```
17
+
18
+ Danach stehen die Commands `cl` und `clever` zur Verfügung.
19
+
20
+ ## Commands
21
+
22
+ ### `cl init`
23
+
24
+ Initialisiert ein neues Projekt mit interaktivem Setup.
25
+
26
+ ```bash
27
+ cl init
28
+ ```
29
+
30
+ **Fragt ab:**
31
+ - Projekt-Typ (Kunde oder Intern)
32
+ - Projektname
33
+ - Services (Supabase, N8N, ElevenLabs)
34
+ - Claude Model Präferenz
35
+ - Optimale Projekt-Einstellungen
36
+
37
+ ### `cl sync`
38
+
39
+ Synchronisiert das Projekt mit GitHub.
40
+
41
+ ```bash
42
+ cl sync
43
+ ```
44
+
45
+ **Funktionen:**
46
+ - Prüft GitHub CLI Authentifizierung
47
+ - Erstellt privates Repo in Clevermation Org (falls nicht vorhanden)
48
+ - Pusht Änderungen
49
+
50
+ ### `cl auth`
51
+
52
+ Verwaltet Authentifizierung für alle Services.
53
+
54
+ ```bash
55
+ # Status aller Services anzeigen
56
+ cl auth
57
+
58
+ # Bei einem Service anmelden
59
+ cl auth login github
60
+ cl auth login supabase
61
+ cl auth login n8n
62
+ cl auth login elevenlabs
63
+ cl auth login all # Alle Services
64
+
65
+ # Von einem Service abmelden
66
+ cl auth logout github
67
+ ```
68
+
69
+ ### `cl doctor`
70
+
71
+ Prüft System-Voraussetzungen und zeigt Probleme.
72
+
73
+ ```bash
74
+ cl doctor
75
+ ```
76
+
77
+ **Prüft:**
78
+ - Bun, Git, GitHub CLI, Claude Code
79
+ - Supabase CLI (optional)
80
+ - Auth-Status aller Services
81
+
82
+ ### `cl open`
83
+
84
+ Öffnet das Projekt in deiner IDE.
85
+
86
+ ```bash
87
+ # Im Standard-Editor öffnen (VS Code)
88
+ cl open
89
+
90
+ # In spezifischer IDE öffnen
91
+ cl open -i cursor
92
+ cl open -i webstorm
93
+ cl open -i zed
94
+
95
+ # Standard-IDE setzen
96
+ cl open --set-default cursor
97
+ ```
98
+
99
+ ### `cl config`
100
+
101
+ Zeigt und verwaltet Konfiguration.
102
+
103
+ ```bash
104
+ cl config
105
+ ```
106
+
107
+ ### `cl explain`
108
+
109
+ Erklärt die aktuelle Projektstruktur.
110
+
111
+ ```bash
112
+ cl explain
113
+ cl explain -v # Verbose mit Verzeichnisbaum
114
+ ```
115
+
116
+ ### `cl update`
117
+
118
+ Aktualisiert CLI und Plugins.
119
+
120
+ ```bash
121
+ cl update
122
+ cl update --cli-only # Nur CLI
123
+ cl update --plugins-only # Nur Plugins
124
+ ```
125
+
126
+ ## Features
127
+
128
+ ### Auto-Update
129
+ Die CLI prüft automatisch auf Updates (max. 1x pro 24h) und zeigt eine Benachrichtigung wenn eine neue Version verfügbar ist.
130
+
131
+ ### Auto-Install
132
+ Fehlende Voraussetzungen (Bun, Git, GitHub CLI) werden automatisch im Hintergrund installiert.
133
+
134
+ ### Optimale Einstellungen
135
+ Bei `cl init` kann optional eine globale `~/.claude/CLAUDE.md` erstellt werden mit Clevermation-spezifischen Einstellungen.
136
+
137
+ ## Projekt-Struktur nach `cl init`
138
+
139
+ ```
140
+ mein-projekt/
141
+ ├── .clevermation/
142
+ │ └── config.json # Projekt-Konfiguration
143
+ ├── .claude/
144
+ │ ├── settings.json # Claude Code Settings
145
+ │ └── settings.local.json # API Keys (gitignored)
146
+ ├── .mcp.json # MCP Server Konfiguration
147
+ ├── src/
148
+ ├── docs/
149
+ └── .gitignore
150
+ ```
151
+
152
+ ## Naming Conventions
153
+
154
+ | Projekt-Typ | Format | Beispiel |
155
+ |-------------|--------|----------|
156
+ | Kunde | `kunde-projekt` | `acme-webshop` |
157
+ | Intern | `clevermation-projekt` | `clevermation-cli` |
158
+
159
+ Alle Repositories werden als **privat** in der Clevermation Organisation erstellt.
160
+
161
+ ---
162
+
163
+ ## Claude Code Plugins (TODO)
164
+
165
+ Folgende Plugins sollen für den Marketplace erstellt werden:
166
+
167
+ - [ ] **Supabase Plugin** - Datenbank, Auth, Storage, Edge Functions, RLS
168
+ - [ ] **N8N Plugin** - Workflow Automation, Trigger, Nodes
169
+ - [ ] **ElevenLabs Plugin** - Voice AI, Text-to-Speech, Voice Cloning
170
+ - [ ] **Mermaid/Planning Plugin** - Diagramme, Flowcharts, Architektur-Planung
171
+
172
+ ## Future Features
173
+
174
+ - [ ] **Projekt-Templates** - Vorkonfigurierte Setups (Web-App, Automation, API)
175
+ - [ ] **`cl new <name>`** - Shortcut für mkdir + cd + init
176
+ - [ ] **`cl plugins`** - Claude Code Plugins verwalten
177
+ - [ ] **Erweiterte CLAUDE.md** - Manager-Rolle, Subagenten-Orchestrierung, Testing-Workflow
178
+ - [ ] **Team-Einstellungen sync** - Globale Clevermation-Settings synchronisieren
179
+
180
+ ---
181
+
182
+ ## Entwicklung
183
+
184
+ ```bash
185
+ # Repository klonen
186
+ git clone https://github.com/Clevermation/clevermation-cli.git
187
+ cd clevermation-cli
188
+
189
+ # Dependencies installieren
190
+ bun install
191
+
192
+ # Lokal ausführen
193
+ bun run dev init
194
+ bun run dev --help
195
+
196
+ # Tests
197
+ bun test
198
+ ```
199
+
200
+ ## Release erstellen
201
+
202
+ Releases werden automatisch über GitHub Actions veröffentlicht:
203
+
204
+ 1. Version in `package.json` und `src/index.ts` erhöhen
205
+ 2. Commit und Push
206
+ 3. GitHub Release erstellen: `gh release create v0.2.0`
207
+ 4. GitHub Action published automatisch zu GitHub Packages
208
+
209
+ ## Support
210
+
211
+ Bei Fragen: #dev-tools Slack Channel
package/bin/cl ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env bun
2
+ import '../src/index.js';
package/bin/clever ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env bun
2
+ import '../src/index.js';