slackhive 0.1.0 → 0.1.1
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 +30 -13
- package/package.json +9 -2
package/dist/commands/init.js
CHANGED
|
@@ -23,9 +23,17 @@ const REPO_URL = 'https://github.com/amansrivastava17/slackhive.git';
|
|
|
23
23
|
*/
|
|
24
24
|
async function init(opts) {
|
|
25
25
|
const dir = (0, path_1.resolve)(opts.dir);
|
|
26
|
+
const O = chalk_1.default.hex('#D97757').bold;
|
|
27
|
+
const W = chalk_1.default.hex('#EBE6E0').bold;
|
|
28
|
+
const D = chalk_1.default.hex('#1A1918');
|
|
26
29
|
console.log('');
|
|
27
|
-
console.log(
|
|
28
|
-
console.log(
|
|
30
|
+
console.log(' ' + D.bgHex('#1A1918')(W(' ┌───┬───┐ ')));
|
|
31
|
+
console.log(' ' + D.bgHex('#1A1918')(W(' │ │ │ ')));
|
|
32
|
+
console.log(' ' + D.bgHex('#1A1918')(W(' ├───┼───┤ ')));
|
|
33
|
+
console.log(' ' + D.bgHex('#1A1918')(O(' >') + W('──') + O('█') + W(' │ ')));
|
|
34
|
+
console.log(' ' + D.bgHex('#1A1918')(W(' └───┴───┘ ')));
|
|
35
|
+
console.log('');
|
|
36
|
+
console.log(chalk_1.default.bold(' SlackHive') + chalk_1.default.gray(' — AI agent teams on Slack'));
|
|
29
37
|
console.log('');
|
|
30
38
|
// ── Check prerequisites ────────────────────────────────────────────────────
|
|
31
39
|
const checks = [
|
|
@@ -112,7 +120,12 @@ async function init(opts) {
|
|
|
112
120
|
type: 'text',
|
|
113
121
|
name: 'postgresPassword',
|
|
114
122
|
message: 'Postgres password',
|
|
115
|
-
initial:
|
|
123
|
+
initial: randomSecret().slice(0, 16),
|
|
124
|
+
}, {
|
|
125
|
+
type: 'text',
|
|
126
|
+
name: 'redisPassword',
|
|
127
|
+
message: 'Redis password',
|
|
128
|
+
initial: randomSecret().slice(0, 16),
|
|
116
129
|
});
|
|
117
130
|
const response = await (0, prompts_1.default)(questions);
|
|
118
131
|
if (authMode.mode === 'apikey' && !response.anthropicKey) {
|
|
@@ -123,18 +136,22 @@ async function init(opts) {
|
|
|
123
136
|
console.log(chalk_1.default.red('\n Setup cancelled.'));
|
|
124
137
|
process.exit(1);
|
|
125
138
|
}
|
|
126
|
-
|
|
139
|
+
// Build .env from scratch so there are no placeholder values
|
|
140
|
+
let envContent = '# Generated by slackhive init\n\n';
|
|
127
141
|
if (authMode.mode === 'apikey') {
|
|
128
|
-
envContent +=
|
|
142
|
+
envContent += `ANTHROPIC_API_KEY=${response.anthropicKey}\n`;
|
|
129
143
|
}
|
|
130
144
|
else {
|
|
131
|
-
envContent +=
|
|
132
|
-
}
|
|
133
|
-
envContent += `\
|
|
134
|
-
envContent +=
|
|
135
|
-
envContent +=
|
|
136
|
-
envContent += `\
|
|
137
|
-
envContent +=
|
|
145
|
+
envContent += `# Using Claude Code subscription — credentials from ~/.claude\n`;
|
|
146
|
+
}
|
|
147
|
+
envContent += `\nPOSTGRES_DB=slackhive\n`;
|
|
148
|
+
envContent += `POSTGRES_USER=slackhive\n`;
|
|
149
|
+
envContent += `POSTGRES_PASSWORD=${response.postgresPassword}\n`;
|
|
150
|
+
envContent += `\nREDIS_PASSWORD=${response.redisPassword}\n`;
|
|
151
|
+
envContent += `\nADMIN_USERNAME=${response.adminUsername}\n`;
|
|
152
|
+
envContent += `ADMIN_PASSWORD=${response.adminPassword}\n`;
|
|
153
|
+
envContent += `AUTH_SECRET=${randomSecret()}\n`;
|
|
154
|
+
envContent += `\nNODE_ENV=production\n`;
|
|
138
155
|
(0, fs_1.writeFileSync)(envPath, envContent);
|
|
139
156
|
console.log(chalk_1.default.green('\n ✓') + ' .env file created');
|
|
140
157
|
}
|
|
@@ -176,7 +193,7 @@ async function init(opts) {
|
|
|
176
193
|
}
|
|
177
194
|
// ── Done ───────────────────────────────────────────────────────────────────
|
|
178
195
|
console.log('');
|
|
179
|
-
console.log(chalk_1.default.bold
|
|
196
|
+
console.log(chalk_1.default.hex('#D97757').bold(' 🐝 SlackHive is ready!'));
|
|
180
197
|
console.log('');
|
|
181
198
|
console.log(` ${chalk_1.default.bold('Web UI:')} http://localhost:3001`);
|
|
182
199
|
console.log(` ${chalk_1.default.bold('Login:')} http://localhost:3001/login`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "slackhive",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "CLI to install and manage SlackHive — AI agent teams on Slack",
|
|
5
5
|
"bin": {
|
|
6
6
|
"slackhive": "./dist/index.js"
|
|
@@ -9,7 +9,14 @@
|
|
|
9
9
|
"build": "tsc",
|
|
10
10
|
"dev": "ts-node src/index.ts"
|
|
11
11
|
},
|
|
12
|
-
"keywords": [
|
|
12
|
+
"keywords": [
|
|
13
|
+
"slack",
|
|
14
|
+
"ai",
|
|
15
|
+
"agents",
|
|
16
|
+
"claude",
|
|
17
|
+
"claude-code",
|
|
18
|
+
"slackhive"
|
|
19
|
+
],
|
|
13
20
|
"author": "Aman Srivastava",
|
|
14
21
|
"license": "MIT",
|
|
15
22
|
"repository": {
|