Getting Started

After completing the installation process, this guide will help you start using Cyber Bot effectively. We'll cover how to run your first cron jobs, customize the bot's behavior, and understand the command structure.

Quick Start

If you've already completed the installation, you can quickly test the bot with one of these commands:

# Send a TryHackMe reminder
npm run cron -- -c sendTHM

# Get latest cybersecurity news
npm run cron -- -c sendNewsResume

# Fetch the latest CVEs
npm run cron -- -c sendCve

These commands will execute a single cron job immediately and send the results to your configured Telegram chat.

Command Structure

Cyber Bot uses a consistent command structure for running cron jobs:

npm run cron -- -c [cronName] [-l language] [-y youtubeChannel] [-p param]

Where:

  • cronName: The name of the cron job to run (required)
  • language: The language for generated content (optional, defaults to 'english')

Examples

# Run with English content (default)
npm run cron -- -c sendNewsResume

# Run with French content
npm run cron -- -c sendNewsResume -l french

Available Cron Jobs

Cyber Bot comes with several pre-configured cron jobs for different cybersecurity tasks:

Command Description Recommended Frequency
sendTHM Sends TryHackMe daily challenge reminders Daily (morning)
sendThmCTF Notifies about TryHackMe CTF competitions Weekly
sendGithubNotes Processes and sends GitHub notes with enhanced context Daily or Weekly
sendNewsResume Summarizes latest cybersecurity news Hourly
sendCve Sends important CVE updates Every 6 hours
sendPodcastDD Shares new Darknet Diaries podcast episodes Weekly
sendPodcastSnyk Shares new Snyk podcast episodes Weekly
sendPodcastSecurityNow Shares new Security Now podcast episodes Weekly
sendPodcastCyberShow Shares new The Cyber Show podcast episodes Weekly
sendRedditPost Shares popular Reddit posts from cybersecurity subreddits Daily
sendYoutubeVideo Shares new YouTube videos from cybersecurity channels Daily
sendYoutubeShorts Shares new YouTube Shorts from cybersecurity channels Weekly

For detailed information about each cron job, refer to the specific documentation page in the Crons section.

Setting Up Scheduling

To automate Cyber Bot, you'll need to set up scheduled tasks using your system's scheduler. Here are examples using crontab on Linux/macOS:

Example Crontab Schedule

# Daily TryHackMe reminder at 8:00 AM
0 8 * * * cd /path/to/cyber-bot && /usr/bin/npm run cron -- -c sendTHM >> /path/to/cyber-bot/logs/thm.log 2>&1

# Cybersecurity news digest at 6:00 PM
0 18 * * * cd /path/to/cyber-bot && /usr/bin/npm run cron -- -c sendNewsResume >> /path/to/cyber-bot/logs/news.log 2>&1

# CVE updates every 6 hours
0 */6 * * * cd /path/to/cyber-bot && /usr/bin/npm run cron -- -c sendCve >> /path/to/cyber-bot/logs/cve.log 2>&1

# Weekly podcast updates on Sunday at 9:00 AM
0 9 * * 0 cd /path/to/cyber-bot && /usr/bin/npm run cron -- -c sendPodcastDD >> /path/to/cyber-bot/logs/podcast.log 2>&1

# Daily Reddit posts at 12:00 PM
0 12 * * * cd /path/to/cyber-bot && /usr/bin/npm run cron -- -c sendRedditPost >> /path/to/cyber-bot/logs/reddit.log 2>&1

To edit your crontab on Linux/macOS, run crontab -e and add the desired entries.

Log Rotation

Consider setting up log rotation to manage the log files generated by your scheduled cron jobs. This prevents log files from growing too large over time.

Testing Your Setup

Before setting up automation, it's a good idea to test each cron job manually to ensure it works as expected:

  1. Run each cron job manually using the command structure described above
  2. Check your Telegram chat to ensure messages are being delivered correctly
  3. Verify that the content is formatted properly and contains the expected information
  4. Check for any errors in the console output

Basic Customization

Environment Variables

Most behavior can be customized through environment variables in your .env file. Here are some key settings you might want to adjust:

Variable Purpose Example
AUTHORIZED_LANGUAGES Languages available for content generation english,french,spanish
REDDIT_SUBREDDITS Subreddits to monitor for content cybersecurity,netsec,hacking
REDDIT_DAYS_LOOKBACK How many days to look back for Reddit posts 7
CVSS_SEVERITY_THRESHOLD Minimum CVSS score for reported CVEs 7.0
HOURS_DELAY Hours to look back for new CVEs 24
TELEGRAM_TOPIC_* Telegram topic IDs for message organization 12345

Prompt Customization

You can customize how AI generates content by modifying the prompt templates in the /crons/utils/prompts directory.

Logging and Monitoring

Cyber Bot includes basic logging to help you track its operation:

Next Steps

Now that you've set up Cyber Bot and understand the basics, you may want to explore:

  • Detailed documentation for specific cron jobs
  • Advanced customization options in the Deployment guide
  • How to contribute to the Cyber Bot project