slackhive 0.1.4 → 0.1.5
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/dist/commands/init.js +16 -1
- package/package.json +1 -1
package/dist/commands/init.js
CHANGED
|
@@ -103,6 +103,20 @@ async function init(opts) {
|
|
|
103
103
|
process.exit(1);
|
|
104
104
|
}
|
|
105
105
|
console.log(chalk_1.default.green(' ✓') + ' Found ~/.claude credentials');
|
|
106
|
+
// Find claude binary
|
|
107
|
+
let claudeBinDefault = '/usr/local/bin/claude';
|
|
108
|
+
try {
|
|
109
|
+
const found = (0, child_process_1.execSync)('which claude', { encoding: 'utf-8' }).trim();
|
|
110
|
+
if (found)
|
|
111
|
+
claudeBinDefault = found;
|
|
112
|
+
}
|
|
113
|
+
catch { /* use default */ }
|
|
114
|
+
questions.push({
|
|
115
|
+
type: 'text',
|
|
116
|
+
name: 'claudeBin',
|
|
117
|
+
message: 'Path to claude binary',
|
|
118
|
+
initial: claudeBinDefault,
|
|
119
|
+
});
|
|
106
120
|
}
|
|
107
121
|
questions.push({
|
|
108
122
|
type: 'text',
|
|
@@ -140,7 +154,8 @@ async function init(opts) {
|
|
|
140
154
|
envContent += `ANTHROPIC_API_KEY=${response.anthropicKey}\n`;
|
|
141
155
|
}
|
|
142
156
|
else {
|
|
143
|
-
envContent += `#
|
|
157
|
+
envContent += `# Claude Code subscription — credentials from ~/.claude\n`;
|
|
158
|
+
envContent += `CLAUDE_BIN=${response.claudeBin}\n`;
|
|
144
159
|
}
|
|
145
160
|
envContent += `\nPOSTGRES_DB=slackhive\n`;
|
|
146
161
|
envContent += `POSTGRES_USER=slackhive\n`;
|