@axiomatic-labs/claudeflow 2.0.55 → 2.0.57

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 (2) hide show
  1. package/bin/cli.js +10 -27
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  // npm shim: downloads the Go binary if needed, then delegates all commands to it.
4
4
 
5
- const { execSync, execFileSync, spawn } = require('child_process');
5
+ const { spawn } = require('child_process');
6
6
  const path = require('path');
7
7
  const fs = require('fs');
8
8
  const os = require('os');
@@ -45,33 +45,9 @@ function fetchUrl(url, headers = {}) {
45
45
  });
46
46
  }
47
47
 
48
- function getToken() {
49
- // Try gh CLI
50
- try {
51
- const raw = execSync('gh auth token', { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] }).trim();
52
- if (raw) return raw;
53
- } catch {}
54
-
55
- // Try env var
56
- if (process.env.GITHUB_TOKEN) return process.env.GITHUB_TOKEN;
57
-
58
- // Try cached
59
- try {
60
- const cfg = JSON.parse(fs.readFileSync(path.join(os.homedir(), '.claudeflow', 'config.json'), 'utf-8'));
61
- if (cfg.githubToken) return cfg.githubToken;
62
- } catch {}
63
-
64
- return null;
65
- }
66
-
67
48
  async function downloadBinary(token) {
68
49
  const ui = require('../lib/ui.js');
69
50
 
70
- if (!token) {
71
- ui.error('GitHub authentication required. Run with a valid GITHUB_TOKEN or gh CLI auth.');
72
- process.exit(1);
73
- }
74
-
75
51
  ui.step('Fetching latest release...');
76
52
 
77
53
  const releaseData = await fetchUrl(
@@ -109,11 +85,18 @@ async function ensureBinary() {
109
85
  }
110
86
 
111
87
  const ui = require('../lib/ui.js');
88
+ const { requireAuth } = require('../lib/auth.js');
112
89
  ui.banner();
113
90
  ui.step('First run — downloading Claudeflow binary...');
114
91
 
115
- const token = getToken();
116
- await downloadBinary(token);
92
+ const token = await requireAuth();
93
+ try {
94
+ await downloadBinary(token);
95
+ } catch (err) {
96
+ ui.error('Could not download Claudeflow binary.');
97
+ ui.info('Ensure your token has access to the axiomatic-labs/axiomatic-cli repository.');
98
+ process.exit(1);
99
+ }
117
100
  }
118
101
 
119
102
  async function main() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axiomatic-labs/claudeflow",
3
- "version": "2.0.55",
3
+ "version": "2.0.57",
4
4
  "description": "Claudeflow — AI-powered development toolkit for Claude Code. Skills, agents, hooks, and quality gates that ship production apps.",
5
5
  "bin": {
6
6
  "claudeflow": "./bin/cli.js"