hashtag
v2.0.1Research trending hashtags, score relevance, and generate optimized tag sets. Use when finding trends, scoring tags, or analyzing competitor hashtags.
Installation
Hashtag
Sysops toolkit — a comprehensive command-line tool for system operations logging, monitoring, alerting, benchmarking, backup/restore, and data management. Each command records timestamped entries to local log files for full traceability.
Commands
All commands are run via hashtag <command> [args]. When called without args, each command shows the 20 most recent entries from its log. When called with args, it records a new timestamped entry.
| Command | Description |
|---|---|
hashtag scan <input> |
Record a scan entry (system scan, security scan, etc.) |
hashtag monitor <input> |
Record a monitoring entry (service health, uptime, etc.) |
hashtag report <input> |
Record a report entry (incident report, status report, etc.) |
hashtag alert <input> |
Record an alert entry (threshold breach, warning, etc.) |
hashtag top <input> |
Record a top-level metric or process entry |
hashtag usage <input> |
Record resource usage data (CPU, memory, disk, etc.) |
hashtag check <input> |
Record a check result (health check, config check, etc.) |
hashtag fix <input> |
Record a fix applied (patch, hotfix, remediation, etc.) |
hashtag cleanup <input> |
Record a cleanup action (temp files, old logs, etc.) |
hashtag backup <input> |
Record a backup operation |
hashtag restore <input> |
Record a restore operation |
hashtag log <input> |
Record a general log entry |
hashtag benchmark <input> |
Record a benchmark result (performance test, etc.) |
hashtag compare <input> |
Record a comparison entry (before/after, A/B test, etc.) |
hashtag stats |
Show summary statistics across all log files |
hashtag export <fmt> |
Export all data in json, csv, or txt format |
hashtag search <term> |
Search across all log files for a term |
hashtag recent |
Show the 20 most recent activity entries |
hashtag status |
Health check — version, data dir, entry count, disk usage |
hashtag help |
Show all available commands |
hashtag version |
Show version (v2.0.0) |
Data Storage
- Data directory:
~/.local/share/hashtag/ - Per-command logs:
$DATA_DIR/{command}.log— each command type gets its own log file (e.g.,scan.log,monitor.log,backup.log) - History log:
$DATA_DIR/history.log— unified activity log with timestamps for all commands - Export files:
$DATA_DIR/export.{json|csv|txt}— generated by theexportcommand - Format: Each entry is stored as
YYYY-MM-DD HH:MM|value(pipe-delimited) - All directories are auto-created on first run
Requirements
- Bash 4.0+ (uses
set -euo pipefailfor strict error handling) - No external dependencies — pure bash, runs on any Linux/macOS system
- Standard Unix tools:
date,wc,du,grep,tail,head,basename
When to Use
- Daily sysops logging — Record system scans, health checks, and monitoring results throughout the day for an auditable trail
- Incident response tracking — Log alerts, fixes, and reports during an incident to maintain a timeline of actions taken
- Backup/restore documentation — Track when backups and restores happen, what was included, and verify completion
- Performance benchmarking — Record benchmark results over time and use
compareto track improvements or regressions - Data export and reporting — Export all recorded data as JSON, CSV, or plain text for external analysis, dashboards, or compliance audits
Examples
System Monitoring Workflow
# Record a scan result
hashtag scan "Network scan: 12 hosts up, 3 unreachable"
# Monitor a service
hashtag monitor "PostgreSQL: running, 89 connections, 2.1GB shared_buffers"
# Check system health
hashtag check "Firewall rules: 42 active, last updated 2h ago"
# View all recent activity
hashtag recent
Incident Response
# Log an alert
hashtag alert "Memory usage 93% on app-server-02"
# Record the fix applied
hashtag fix "Restarted leaking Java process, deployed memory limit"
# Create a report
hashtag report "Memory incident resolved - added JVM heap cap at 4GB"
# Search across all logs
hashtag search "memory"
Backup and Export
# Record backup operations
hashtag backup "Full PostgreSQL backup: 2.3GB → /mnt/nfs/pg-backup/"
hashtag backup "Config snapshot: /etc/ → config-20250318.tar.gz"
# View statistics across all logs
hashtag stats
# Export everything for external analysis
hashtag export json
hashtag export csv
# Check overall tool health
hashtag status
Cleanup and Resource Tracking
# Record cleanup actions
hashtag cleanup "Rotated application logs: freed 4.5GB"
hashtag cleanup "Removed orphaned Docker volumes: 12 deleted"
# Log resource usage
hashtag usage "Bandwidth: 850Mbps peak, 340Mbps average"
hashtag top "Highest CPU: python3 PID 9012 at 78%"
# Record benchmark results
hashtag benchmark "Disk sequential write: 520 MB/s"
# Compare configurations
hashtag compare "Old config: 4 workers — New config: 8 workers, 2x throughput"
How It Works
Hashtag stores all data locally in ~/.local/share/hashtag/. Each command creates or appends to its own log file with pipe-delimited timestamps. The unified history.log tracks all activity across commands. Use stats to see entry counts per log file and total disk usage, search to find entries across all logs, or export to back up everything in JSON, CSV, or plain text format.
Powered by BytesAgain | bytesagain.com | [email protected]