clevermation-cli 0.3.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clevermation-cli",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "description": "Clevermation CLI - Tool für Claude Code Projekte",
5
5
  "type": "module",
6
6
  "bin": {
package/src/index.ts CHANGED
@@ -11,7 +11,7 @@ import { handleError } from './utils/logger.js';
11
11
  import { checkForUpdates } from './utils/auto-update.js';
12
12
  import { silentPrerequisiteCheck } from './utils/prerequisites.js';
13
13
 
14
- const VERSION = '0.3.2';
14
+ const VERSION = '0.4.0';
15
15
 
16
16
  const program = new Command();
17
17
 
@@ -20,7 +20,7 @@ const DEFAULT_GLOBAL_CONFIG: GlobalConfig = {
20
20
  defaultOrg: 'Clevermation',
21
21
  auth: {},
22
22
  preferences: {
23
- defaultModel: 'sonnet',
23
+ defaultModel: 'opus',
24
24
  defaultIDE: 'code',
25
25
  autoUpdate: true,
26
26
  optimaleEinstellungen: true,
@@ -50,6 +50,14 @@ const PREREQUISITES: Prerequisite[] = [
50
50
  installMessage: 'Installiere Supabase CLI...',
51
51
  optional: true,
52
52
  },
53
+ {
54
+ name: 'UV (Python)',
55
+ command: 'uv',
56
+ versionFlag: '--version',
57
+ installCommand: 'curl -LsSf https://astral.sh/uv/install.sh | sh',
58
+ installMessage: 'Installiere UV...',
59
+ optional: true,
60
+ },
53
61
  ];
54
62
 
55
63
  interface CheckResult {
@@ -171,8 +179,9 @@ export async function showPrerequisiteStatus(): Promise<void> {
171
179
 
172
180
  // Supabase Auth Status prüfen
173
181
  const supabaseAuthStatus = await checkSupabaseAuth();
174
- if (supabaseAuthStatus) {
175
- console.log(chalk.green(' ✓'), 'Supabase authentifiziert');
182
+ if (supabaseAuthStatus.authenticated) {
183
+ const orgInfo = supabaseAuthStatus.org ? ` (${supabaseAuthStatus.org})` : '';
184
+ console.log(chalk.green(' ✓'), `Supabase authentifiziert${orgInfo}`);
176
185
  } else {
177
186
  console.log(chalk.yellow(' ○'), 'Supabase nicht authentifiziert', chalk.dim('(optional)'));
178
187
  }
@@ -197,17 +206,44 @@ export async function checkGitHubAuth(): Promise<{ authenticated: boolean; usern
197
206
  }
198
207
 
199
208
  /**
200
- * Prüft Supabase Authentifizierung.
209
+ * Prüft Supabase Authentifizierung und holt Org-Info.
201
210
  */
202
- export async function checkSupabaseAuth(): Promise<boolean> {
211
+ export async function checkSupabaseAuth(): Promise<{ authenticated: boolean; org?: string }> {
203
212
  try {
213
+ // Prüfe ob authentifiziert via projects list
204
214
  const result = await execa('supabase', ['projects', 'list'], {
205
215
  timeout: 10000,
206
216
  reject: false,
207
217
  });
208
- return result.exitCode === 0;
218
+
219
+ if (result.exitCode !== 0) {
220
+ return { authenticated: false };
221
+ }
222
+
223
+ // Hole erste Organisation als Identifier
224
+ const orgsResult = await execa('supabase', ['orgs', 'list'], {
225
+ timeout: 10000,
226
+ reject: false,
227
+ });
228
+
229
+ // Parse erste Org aus Output (Format: " ID | NAME")
230
+ const lines = orgsResult.stdout.split('\n');
231
+ for (const line of lines) {
232
+ // Überspringe Header-Zeilen
233
+ if (line.includes('|') && !line.includes('ID') && !line.includes('---')) {
234
+ const parts = line.split('|');
235
+ if (parts[1]) {
236
+ const orgName = parts[1].trim();
237
+ if (orgName) {
238
+ return { authenticated: true, org: orgName };
239
+ }
240
+ }
241
+ }
242
+ }
243
+
244
+ return { authenticated: true };
209
245
  } catch {
210
- return false;
246
+ return { authenticated: false };
211
247
  }
212
248
  }
213
249