slackhive 0.1.0 → 0.1.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.
@@ -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(chalk_1.default.bold(' 🐝 SlackHive Setup'));
28
- console.log(chalk_1.default.gray(' Build, deploy, and orchestrate AI agent teams on Slack'));
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 = [
@@ -73,7 +81,7 @@ async function init(opts) {
73
81
  message: 'How do you want to authenticate with Claude?',
74
82
  choices: [
75
83
  { title: 'API Key — pay-per-use via Anthropic API', value: 'apikey' },
76
- { title: 'Subscription — Claude Max plan (run `claude login` first)', value: 'subscription' },
84
+ { title: 'Subscription — run `claude login` first', value: 'subscription' },
77
85
  ],
78
86
  });
79
87
  if (!authMode.mode) {
@@ -112,7 +120,12 @@ async function init(opts) {
112
120
  type: 'text',
113
121
  name: 'postgresPassword',
114
122
  message: 'Postgres password',
115
- initial: 'slackhive',
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
- let envContent = (0, fs_1.readFileSync)(envExamplePath, 'utf-8');
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 += `\nANTHROPIC_API_KEY=${response.anthropicKey}`;
142
+ envContent += `ANTHROPIC_API_KEY=${response.anthropicKey}\n`;
129
143
  }
130
144
  else {
131
- envContent += `\n# Using Claude Code subscription — credentials from ~/.claude`;
132
- }
133
- envContent += `\nADMIN_USERNAME=${response.adminUsername}`;
134
- envContent += `\nADMIN_PASSWORD=${response.adminPassword}`;
135
- envContent += `\nPOSTGRES_PASSWORD=${response.postgresPassword}`;
136
- envContent += `\nAUTH_SECRET=${randomSecret()}`;
137
- envContent += '\n';
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.green(' SlackHive is ready!'));
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.0",
3
+ "version": "0.1.2",
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": ["slack", "ai", "agents", "claude", "claude-code", "slackhive"],
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": {