Skip to content

Commit eed5e54

Browse files
Stewart86claude
andcommitted
docs: clean up README by removing outdated information and simplifying setup
- Remove manual Claude CLI installation instructions (now auto-handled by Docker) - Simplify server whitelist configuration to use ALLOWED_DISCORD_SERVERS env var - Streamline local development setup to emphasize Docker deployment - Remove complex multi-container deployment sections and config wizard references - Update project structure to reflect actual tracked files - Modernize memory management documentation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 0d46cc2 commit eed5e54

File tree

1 file changed

+31
-158
lines changed

1 file changed

+31
-158
lines changed

README.md

Lines changed: 31 additions & 158 deletions
Original file line numberDiff line numberDiff line change
@@ -128,29 +128,9 @@ To keep your bot private and prevent unauthorized access:
128128

129129
1. **Disable Public Bot Setting**: In the Discord Developer Portal under the "Bot" tab, make sure "Public Bot" is disabled. This prevents anyone with your client ID from adding the bot to their server.
130130

131-
2. **Implement Server Whitelist**: Add code to check server IDs and leave any unauthorized servers.
132-
133-
```javascript
134-
// Add to index.js
135-
client.on("guildCreate", async (guild) => {
136-
// List of allowed server IDs
137-
const allowedServers = [
138-
// Add your authorized server IDs here
139-
"123456789012345678",
140-
"987654321098765432",
141-
];
142-
143-
// Check if the server is authorized
144-
if (!allowedServers.includes(guild.id)) {
145-
console.log(`Leaving unauthorized server: ${guild.name} (${guild.id})`);
146-
await guild.leave();
147-
} else {
148-
console.log(`Joined authorized server: ${guild.name} (${guild.id})`);
149-
}
150-
});
151-
```
131+
2. **Server Whitelist**: Bobby automatically implements server whitelisting when you provide the `ALLOWED_DISCORD_SERVERS` environment variable with comma-separated server IDs.
152132

153-
3. **Control Invite Links**: Only share bot invite links with trusted users and regularly rotate your bot token if you suspect unauthorized access.
133+
3. **Use Environment Variables**: Bobby automatically handles server whitelisting via the `ALLOWED_DISCORD_SERVERS` environment variable.
154134

155135
4. **Use Minimal Permissions**: Only request the permissions your bot actually needs to function.
156136

@@ -176,15 +156,7 @@ client.on("guildCreate", async (guild) => {
176156
- Copy and securely store the generated API key immediately (this is your `ANTHROPIC_API_KEY`)
177157
- **IMPORTANT**: This key will not be shown again and grants access to paid API usage
178158

179-
4. Install Claude Code CLI:
180-
- After obtaining your API key, set it as an environment variable:
181-
```bash
182-
export ANTHROPIC_API_KEY=your_api_key_here
183-
```
184-
- Use Bun to install Claude Code CLI:
185-
```bash
186-
bun install -g @anthropic-ai/claude-code
187-
```
159+
**Note**: When using Docker (recommended), the Claude Code CLI is automatically installed and configured. Manual installation is only needed for local development.
188160

189161
## GitHub Personal Access Token Setup
190162

@@ -212,34 +184,16 @@ GH_TOKEN=your_github_personal_access_token
212184
GITHUB_REPO=owner/repo-name
213185
```
214186

215-
### Local Development
216-
217-
1. Install dependencies:
187+
### Local Development (Optional)
218188

219-
```bash
220-
bun install
221-
```
189+
**Note**: Docker deployment is recommended. Local development requires additional setup:
222190

223-
2. Install Claude Code CLI:
191+
1. Install dependencies: `bun install`
192+
2. Install Claude Code CLI: `bun install -g @anthropic-ai/claude-code`
193+
3. Install and authenticate GitHub CLI
194+
4. Start development server: `bun run dev`
224195

225-
```bash
226-
bun install -g @anthropic-ai/claude-code
227-
```
228-
229-
3. Install GitHub CLI and authenticate:
230-
231-
```bash
232-
# Install GitHub CLI (follow instructions for your OS)
233-
# https://github.com/cli/cli#installation
234-
235-
# Authenticate with your token
236-
echo $GH_TOKEN | gh auth login --with-token
237-
```
238-
239-
4. Start the development server:
240-
```bash
241-
bun run dev
242-
```
196+
For detailed local setup, see the Docker option above which handles all dependencies automatically.
243197

244198
### Docker Deployment
245199

@@ -297,108 +251,26 @@ The container will automatically authenticate with GitHub using your GH_TOKEN be
297251
3. Bobby will respond with an answer based on your codebase
298252
4. If Bobby detects a bug, it will automatically create a GitHub issue
299253

300-
## Public Bot Deployment
301-
302-
If you're offering Bobby as a service to multiple users or organizations, consider these options for secure configuration management:
303-
304-
### 1. Self-Hosted Web Portal
305-
306-
Create a simple secure web interface where users can:
307-
308-
- Enter their own API keys and tokens
309-
- Select GitHub repositories they want to monitor
310-
- Configure Discord servers to connect to
311-
312-
Store configurations securely:
313-
314-
- Use encrypted database storage with proper authentication
315-
- Implement a multi-tenant architecture with separate instances
316-
- Never expose API keys in logs or client-side code
317-
318-
### 2. Configuration File Wizard
319-
320-
Create a secure configuration wizard script:
321-
322-
```javascript
323-
// config-wizard.js
324-
import { prompt } from "bun:prompt";
325-
import { write, file } from "bun";
326-
import { randomBytes, createCipheriv } from "crypto";
327-
328-
async function configWizard() {
329-
console.log("Bobby Bot Configuration Wizard");
330-
331-
// Get encryption password
332-
const password = await prompt(
333-
"Enter a secure password to encrypt your configuration:",
334-
{ password: true },
335-
);
336-
337-
// Collect credentials
338-
const config = {
339-
DISCORD_TOKEN: await prompt("Enter your Discord Bot Token:"),
340-
ANTHROPIC_API_KEY: await prompt("Enter your Anthropic API Key:"),
341-
GH_TOKEN: await prompt("Enter your GitHub Personal Access Token:"),
342-
GITHUB_REPO: await prompt(
343-
"Enter your GitHub Repository (owner/repo-name):",
344-
),
345-
};
346-
347-
// Encrypt and save configuration
348-
const iv = randomBytes(16);
349-
const cipher = createCipheriv(
350-
"aes-256-cbc",
351-
password.substr(0, 32).padEnd(32, "0"),
352-
iv,
353-
);
354-
let encrypted = cipher.update(JSON.stringify(config), "utf8", "hex");
355-
encrypted += cipher.final("hex");
356-
357-
await write(
358-
"bobby-config.enc",
359-
JSON.stringify({
360-
iv: iv.toString("hex"),
361-
data: encrypted,
362-
}),
363-
);
364-
365-
console.log("Configuration saved to bobby-config.enc");
366-
console.log(
367-
"To start Bobby, run: bun run --env-file-path bobby-config.enc index.js",
368-
);
369-
}
370-
371-
configWizard();
372-
```
373-
374-
### 3. Multi-Container Deployment
254+
## Multi-Instance Deployment
375255

376-
For running multiple instances, create a deployment script:
256+
To run Bobby for multiple repositories or organizations, use separate containers:
377257

378258
```bash
379-
#!/bin/bash
380-
# deploy-bobby.sh
381-
382-
if [ -z "$1" ]; then
383-
echo "Usage: ./deploy-bobby.sh <config-file.env>"
384-
exit 1
385-
fi
386-
387-
# Extract organization name from config filename
388-
ORG_NAME=$(basename "$1" .env)
259+
# Deploy for different repositories
260+
docker run -d --name bobby-repo1 \
261+
-e GITHUB_REPO=org/repo1 \
262+
[other env vars] \
263+
-v bobby-repo1-data:/app/data \
264+
stewart86/bobby:latest
389265

390-
# Run container with organization-specific config and volumes
391-
docker run -d \
392-
--name "bobby-${ORG_NAME}" \
393-
--env-file "$1" \
394-
-v "bobby-${ORG_NAME}-data:/app/data" \
266+
docker run -d --name bobby-repo2 \
267+
-e GITHUB_REPO=org/repo2 \
268+
[other env vars] \
269+
-v bobby-repo2-data:/app/data \
395270
stewart86/bobby:latest
396271
```
397272

398-
This allows each organization to use their own:
399-
400-
- API keys and tokens
401-
- Data storage and session management
273+
Each instance maintains separate data storage and session management.
402274

403275
## Docker Hub
404276

@@ -422,15 +294,16 @@ GitHub Actions automatically builds and publishes Docker images:
422294
```
423295
bobby/
424296
├── index.js # Main application file
425-
├── docs/ # Memory storage directory
426-
├── data/ # Data storage directory
427-
├── CLAUDE.md # Memory index for Claude
428-
├── package.json # Dependency management
297+
├── CLAUDE.md # Claude Code instructions and memory index
298+
├── package.json # Dependencies and scripts
429299
├── entrypoint.sh # Docker container initialization script
430-
├── deploy-bobby.sh # Multi-instance deployment script
431-
├── config-wizard.js # Configuration setup wizard
432300
├── Dockerfile # Docker configuration
433301
├── CONTRIBUTING.md # Contribution guidelines
302+
├── LICENSE # MIT license
303+
├── .env.example # Environment variables template
304+
├── .github/ # GitHub Actions workflows
305+
│ └── workflows/
306+
│ └── docker-publish.yml
434307
└── README.md # Documentation
435308
```
436309

@@ -447,7 +320,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed development guidelines, code
447320

448321
## Memory Management
449322

450-
Bobby stores information in Markdown files in the `docs/` directory, organized by topic. The `CLAUDE.md` file serves as an index to these memory files, helping Claude find relevant information during conversations.
323+
Bobby uses the `CLAUDE.md` file for storing project instructions and context that helps Claude understand the codebase and provide better responses during conversations.
451324

452325
## Troubleshooting
453326

0 commit comments

Comments
 (0)