Troubleshooting
Quick Diagnostics
Run the built-in diagnostic tool:
niki doctorThis checks:
- Configuration file
- Dependencies
- API key
- Daemon status
Common Issues
Daemon Not Running
Symptom: No notifications received
# Check statusniki daemon status
# Start daemonniki daemon start
# Or in foreground for debuggingniki daemon start --foregroundAPI Key Not Configured
Symptom: “API key not found” error
# Set environment variableexport ANTHROPIC_API_KEY="sk-ant-..."
# Verifyecho $ANTHROPIC_API_KEYMake sure the variable is set in your shell profile (~/.bashrc, ~/.zshrc).
Telegram Bot Not Responding
Symptoms:
- No notifications
- Bot doesn’t respond to messages
Solutions:
-
Check bot token is correct:
Terminal window niki doctor -
Verify you messaged the bot first (send
/start) -
Check your user ID is in
allowed_user_ids -
Restart daemon after config changes:
Terminal window niki daemon stopniki daemon start
Slack Bot Not Responding
Symptoms:
- Bot appears offline
- DMs not received
Solutions:
-
Check Socket Mode is enabled in Slack app settings
-
Verify packages installed:
Terminal window pip install niki[slack] -
Check
message.imevent is subscribed -
Reinstall app after adding scopes
”Package not found” Errors
Symptom: Import errors on daemon start
# Install missing packagespip install niki[all]
# Or specific featurespip install niki[slack]pip install niki[telegram]pip install niki[jupyter]Notifications Not Sent
Symptoms:
- Job completes but no notification
- Only some jobs trigger notifications
Check:
-
Job duration meets threshold:
[general]threshold_seconds = 60 # Jobs under 60s won't notify -
Notification mode allows notifications:
Terminal window niki mode active -
Check daemon logs:
Terminal window journalctl --user -u niki -f
Jupyter Extension Not Loading
Symptom: %load_ext niki fails
# Install Jupyter supportpip install niki[jupyter]
# Verifypython -c "from niki.jupyter import IPYTHON_AVAILABLE; print(IPYTHON_AVAILABLE)"Permission Errors
Symptom: Can’t write to config directory
# Check permissionsls -la ~/.niki/
# Fix permissionschmod 700 ~/.niki/chmod 600 ~/.niki/config.tomlGetting Help
- Check GitHub Issues
- Search Discussions
- Open a new issue with:
- Output of
niki doctor - Error messages
- Your configuration (redact tokens)
- Output of
Debug Mode
For detailed logs:
# Set log level# In config.toml:[daemon]log_level = "debug"
# Restart daemonniki daemon stopniki daemon start --foreground