AI-powered espresso shot analyzer with Discord bot support
1.4K
An AI-powered espresso shot analyzer that uses GPT-5.2 Pro to provide detailed, actionable recommendations for improving your shots.
All documentation has been moved to the docs/ directory. Start here:
š docs/INDEX.mdā - Master index of all documentation
Quick links:
# 1. Run the setup script
./setup.sh
# 2. Add your OpenAI API key to .env
# Edit .env and set: OPENAI_KEY=sk-...
# 3. Run the app (CLI mode by default)
bun run dev
To run as a Discord bot instead of CLI, add Discord credentials to .env:
# 1. Create a Discord bot application:
# - Go to https://discord.com/developers/applications
# - Click "New Application"
# - Name it "Coffee Bot" (or preferred name)
# - Go to "Bot" section and click "Add Bot"
# - Copy the "Token" under the bot name
# 2. Get your Discord Channel ID:
# - Enable Developer Mode in Discord (User Settings ā App Settings ā Advanced ā Developer Mode)
# - Right-click your channel and select "Copy Channel ID"
# 3. Get your Discord Guild ID (Server ID):
# - Right-click your Discord server name and select "Copy Server ID"
# 4. Add to .env:
DISCORD_TOKEN=your_bot_token_here
DISCORD_CHANNEL_ID=your_channel_id_here
DISCORD_GUILD_ID=your_guild_id_here
# 5. Invite bot to server:
# - Go to OAuth2 ā URL Generator
# - Select "bot" scope
# - Select permissions: "Send Messages", "Embed Links", "Read Message History"
# - Copy the generated URL and open in browser to invite
# 6. Run:
bun run dev
The bot will auto-detect Discord mode and start listening for commands!
any types, full TypeScriptSee docs/CLI_SETUP.mdā for detailed setup instructions.
Or use the automated setup:
./setup.sh
coffee-bot/
āāā src/ - Application code
āāā __tests__/ - Test suites
āāā docs/ - All documentation
āāā config/ - Configuration
āāā data/ - Runtime data (auto-created)
āāā logs/ - Shot logs (auto-created)
āāā setup.sh - Setup script
āāā package.json - Dependencies
āāā tsconfig.json - TypeScript config
any)See the full documentation in docs/:
# Start the CLI app
bun run dev
# Run tests
bun test
MIT
Ready? ā Run ./setup.sh or see docs/CLI_SETUP.mdā
OPENAI_KEY is set correctlyCreate your config file:
cp config.example.json config.json
# Edit config.json with your actual credentials
Run with docker-compose:
docker-compose up -d
Monitor logs:
docker-compose logs -f coffee-bot
Stop the bot:
docker-compose down
The bot uses a config.json file mounted into the container. Example:
{
"gaggimate": {
"host": "gaggimate.local",
"port": 80
},
"openai": {
"key": "sk-proj-YOUR_KEY_HERE",
"model": "gpt-4"
},
"discord": {
"token": "YOUR_DISCORD_BOT_TOKEN",
"channelId": "YOUR_CHANNEL_ID",
"guildId": "YOUR_GUILD_ID"
},
"polling": {
"intervalSec": 60
},
"debug": false
}
Required fields:
gaggimate.host - IP/hostname of your GaggiMate machineopenai.key - OpenAI API keydiscord.* - Discord bot credentials (if using Discord mode)Images are automatically built and pushed to Docker Hub on every merge to main:
docker pull YOUR_DOCKER_HUB_USERNAME/coffee-bot:latest
docker run -v ./config.json:/app/config.json -v ./data:/app/data YOUR_DOCKER_HUB_USERNAME/coffee-bot
The bot expects to reach your GaggiMate machine on the same network. Make sure:
config.json is correctGitHub Actions automatically:
mainSetup required:
DOCKER_HUB_USERNAME - Your Docker Hub usernameDOCKER_HUB_PASSWORD - Your Docker Hub password (or access token)IMAGE_NAME in .github/workflows/docker-build.ymlMIT
Content type
Image
Digest
sha256:3ba8b55f6ā¦
Size
70.7 MB
Last updated
9 months ago
docker pull wabit/coffee-bot