Use Cases

Developers use notfs to get push notifications from CI/CD pipelines, servers, cron jobs, scripts, and any automation. Here are the most popular use cases with ready-to-copy code examples.

CI/CD Pipeline Notifications

Get push notifications when builds succeed, fail, or deployments go live. Works with GitHub Actions, GitLab CI, Jenkins, CircleCI, and any CI system.

Stop refreshing your CI dashboard. notfs sends a push notification to your phone the moment a build finishes — whether it passes or fails. Add a single curl command to your pipeline and get instant alerts with the commit message, branch name, and build status.

# GitHub Actions — notify on build result
- name: Notify via notfs
  if: always()
  run: |
    STATUS=${{ job.status }}
    curl -s -X POST https://api.notfs.dev/api/notifications \
      -H "X-API-Key: ${{ secrets.NOTFS_API_KEY }}" \
      -H "Content-Type: application/json" \
      -d "{
        \"title\": \"Build $STATUS — ${{ github.ref_name }}\",
        \"body\": \"${{ github.event.head_commit.message }}\",
        \"priority\": \"$( [ \"$STATUS\" = \"failure\" ] && echo critical || echo normal )\",
        \"delay\": \"5s\"
      }"
Know instantly when builds fail — fix before anyone notices
Track deployments to production from your phone
Use priority levels to differentiate routine builds from failures
Works with any CI system that supports shell commands

Server Monitoring & Alerts

Receive push notifications for server alerts: high CPU, disk full, service down, SSL expiry, and more. Replace email alerts you never read.

Email alerts get lost. notfs delivers server alerts directly to your phone as push notifications. Set up monitoring scripts that POST to notfs when thresholds are exceeded — high CPU, disk space running low, services crashing, or SSL certificates about to expire.

#!/bin/bash
# Monitor disk usage, alert if above 90%
USAGE=$(df / | awk 'NR==2 {print $5}' | tr -d '%')

if [ "$USAGE" -gt 90 ]; then
  curl -s -X POST https://api.notfs.dev/api/notifications \
    -H "X-API-Key: ntfs_your_key" \
    -H "Content-Type: application/json" \
    -d "{
      \"title\": \"⚠️ Disk usage at $USAGE%\",
      \"body\": \"Server $(hostname) root partition\",
      \"priority\": \"critical\",
      \"sound\": \"critical\",
      \"delay\": \"5s\"
    }"
fi
Instant alerts — no more checking email for server issues
Critical priority + sound for urgent alerts (disk full, service down)
Schedule periodic health checks with cron + notfs
Add to existing monitoring scripts with one curl command

Cron Job & Scheduled Task Monitoring

Get notified when cron jobs fail, run late, or produce unexpected results. Dead man's switch for your background tasks.

Cron jobs fail silently. With notfs, add a notification at the end of your cron scripts to confirm they ran successfully — or alert you when they fail. Use the scheduled delivery feature to set up dead man's switches: if the cron job doesn't cancel the scheduled notification, it fires automatically.

# Crontab: nightly database backup with notfs alerts
0 2 * * * /opt/scripts/backup.sh && \
  curl -s -X POST https://api.notfs.dev/api/notifications \
    -H "X-API-Key: ntfs_your_key" \
    -d '{"title":"✅ Backup complete","body":"Database backed up successfully","delay":"5s"}' \
  || \
  curl -s -X POST https://api.notfs.dev/api/notifications \
    -H "X-API-Key: ntfs_your_key" \
    -d '{"title":"❌ Backup failed","body":"Database backup script exited with error","priority":"critical","delay":"5s"}'
Know immediately when background tasks fail
Confirm successful completion of critical jobs
Dead man's switch: schedule a "job didn't run" alert, cancel it if the job succeeds
Works with any cron job, systemd timer, or scheduled script

Security & Access Alerts

Get push notifications for SSH logins, failed auth attempts, new user signups, and suspicious activity on your servers.

Security events happen 24/7. With notfs, get real-time push notifications for SSH logins, failed authentication attempts, new user signups, and any security-relevant events. Use critical priority for immediate attention.

# /etc/ssh/sshrc — notify on SSH login
curl -s -X POST https://api.notfs.dev/api/notifications \
  -H "X-API-Key: ntfs_your_key" \
  -H "Content-Type: application/json" \
  -d "{
    \"title\": \"🔐 SSH Login\",
    \"body\": \"$USER@$(hostname) from $SSH_CLIENT\",
    \"priority\": \"high\",
    \"delay\": \"5s\"
  }"
Real-time alerts for every SSH login to your servers
Monitor failed authentication attempts
Track new user signups in your application
Immediate push for suspicious activity — no email delay

Long-Running Script Completion

Get a push notification when data migrations, ML training jobs, test suites, or any long-running script finishes.

Stop watching terminals. Run your long script and add a notfs call at the end — you'll get a push notification the moment it finishes. Works for data migrations, machine learning training, large test suites, database imports, or any process that takes more than a few minutes.

# Notify when a long-running process finishes
python train_model.py --epochs 100 && \
  curl -s -X POST https://api.notfs.dev/api/notifications \
    -H "X-API-Key: ntfs_your_key" \
    -d '{"title":"🎉 Training complete","body":"Model training finished after 100 epochs","delay":"5s"}'

# Or use Python directly
import requests
requests.post("https://api.notfs.dev/api/notifications",
    headers={"X-API-Key": "ntfs_your_key"},
    json={"title": "Migration done", "body": f"{rows} rows migrated", "delay": "5s"})
Walk away from your computer — get notified when it's done
Differentiate success vs failure with different notification sounds
Include results in the notification body (rows processed, accuracy metrics)
Chain notfs calls in any language or shell script

Webhook Relay & Event Processing

Forward webhook events from Stripe, GitHub, Shopify, or any third-party service to your phone as push notifications.

Build a simple webhook endpoint that receives events from any service (Stripe payments, GitHub stars, Shopify orders) and relays them to your phone via notfs. Never miss an important event again.

// Express.js webhook relay → notfs push notification
app.post('/webhook/stripe', async (req, res) => {
  const event = req.body;

  if (event.type === 'payment_intent.succeeded') {
    await fetch('https://api.notfs.dev/api/notifications', {
      method: 'POST',
      headers: {
        'X-API-Key': process.env.NOTFS_KEY,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        title: '💰 New Payment',
        body: `${(event.data.object.amount / 100).toFixed(2)} ${event.data.object.currency.toUpperCase()}`,
        priority: 'high',
        delay: '5s',
      }),
    });
  }

  res.sendStatus(200);
});
Instant push notifications for Stripe payments, GitHub events, etc.
Build in minutes with any server framework
Filter and customize which events reach your phone
Combine with notfs metadata to include event details

Start building with notfs

Send your first push notification in under a minute. Free for up to 1,000 notifications per month.