{"id":26139764,"url":"https://github.com/openstrata101/historix","last_synced_at":"2025-03-11T02:28:01.681Z","repository":{"id":262860403,"uuid":"888586292","full_name":"OpenStrata101/HistoriX","owner":"OpenStrata101","description":"HistoriX is a powerful command history analyzer for Bash that categorizes, visualizes, and provides insights into your shell usage patterns.","archived":false,"fork":false,"pushed_at":"2025-03-09T21:49:08.000Z","size":16,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-09T22:25:41.271Z","etag":null,"topics":["bash","bashanalytics","commandhistory","commandline","commandline-interface","commandlinetool","datavisualization","historix","linux","linuxtools","shellanalysis","sysadmin","sysadmin-tool","terminaltool","terminaltools"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenStrata101.png","metadata":{"files":{"readme":"readme.md","changelog":"history_analyzer.sh","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-14T16:48:08.000Z","updated_at":"2025-03-09T21:49:11.000Z","dependencies_parsed_at":"2024-11-14T17:46:16.171Z","dependency_job_id":"1c54ea1a-a4ab-4066-b0ef-f307eb4f345e","html_url":"https://github.com/OpenStrata101/HistoriX","commit_stats":null,"previous_names":["intrepiddev101/historix","openstrata101/historix"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenStrata101%2FHistoriX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenStrata101%2FHistoriX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenStrata101%2FHistoriX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenStrata101%2FHistoriX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenStrata101","download_url":"https://codeload.github.com/OpenStrata101/HistoriX/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242958474,"owners_count":20212809,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","bashanalytics","commandhistory","commandline","commandline-interface","commandlinetool","datavisualization","historix","linux","linuxtools","shellanalysis","sysadmin","sysadmin-tool","terminaltool","terminaltools"],"created_at":"2025-03-11T02:28:00.960Z","updated_at":"2025-03-11T02:28:01.671Z","avatar_url":"https://github.com/OpenStrata101.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HistoriX - Command History Analyzer\n\n\n**HistoriX** is a powerful tool designed to analyze and visualize Bash command history. It helps users gain insights into their shell usage patterns, detect frequent commands, and spot potential security risks, all while offering beautiful visualizations and detailed statistics.\n\n\n# Table of Contents\n1.[Introduction](#HistoriX-CommandHistoryAnalyzer)\n\n2.[Features](#Features)\n\n3.[Installation](#Installation)\n- 3.1 [Prerequisites](#Prerequisites)\n- 3.2 [Installing Dependencies](#InstallingDependencies)\n- 3.3 [Download and Setup](#DownloadandSetup)\n\n4.[Usage](#Usage)\n- 4.1 [Main Menu Options](#MainMenuOptions)\n\n5.[Example Output](#ExampleOutput)\n\n6.[Customizable Alerts](#CustomizableAlerts)\n\n7.[Visualizations](#Visualizations)\n\n8.[Command History Cleanup](#CommandHistoryCleanup)\n\n9.[Exporting Results](#ExportingResults)\n\n10.[Contributing](#Contributing)\n- 10.1 [How to Contribute](#HowtoContribute)\n\n11.[License](#License)\n\n12.[Acknowledgments](#Acknowledgements)\n\n13.[Contact](#Contact)\n\n\n# Features\n- **Command Categorization**: Classify commands based on usage (e.g., Git commands, file operations, Docker commands).\n- **Most Frequent Commands**: Display the most commonly used commands with usage statistics.\n- **Dangerous Commands Detection**: Highlight potentially dangerous commands (e.g., `rm -rf`, `shutdown`).\n- **Date/Time Filtering**: Analyze command history based on specific date and time ranges (e.g., last 24 hours, last week).\n- **Command Grouping and Tagging**: Organize commands into meaningful groups like Git, Docker, etc.\n- **Execution Statistics**: Display execution time for commands.\n- **Suggestions and Recommendations**: Get recommendations based on your command history.\n- **Visualization**: Generate graphs of command usage over time and command frequency using **GNUplot**.\n- **Customizable Alerts**: Set up alerts for commands that match specific patterns.\n- **Frequent Command Combinations**: Detect frequently executed command combinations.\n- **History File Cleanup**: Option to clean up sensitive data in your history file.\n- **Exporting and Logging**: Export command analysis results to CSV/JSON files and log all actions.\n- **Multithreading Support**: Use parallel processing for handling large history files.\n- **Real-Time Command Tracking**: Track and log commands as they are executed in real-time.\n\n# Installation\n## Prerequisites\n- **Bash**: This program is designed to work with the Bash shell.\n- **GNUplot**: Required for generating command frequency and time-of-day visualizations.\n- **GNU Parallel**: For parallel processing of command history (optional for multithreading).\n## Installing Dependencies\nTo install the required dependencies, use the following commands:\n\n**On Ubuntu/Debian-based systems:**\n```bash\nsudo apt update\nsudo apt install gnuplot parallel\n```\n\n**On Fedora/RHEL-based systems:**\n```bash\nsudo dnf install gnuplot parallel\n```\n\n**On Archlinux-based systems:**\n```bash\nsudo pacman -S gnuplot parallel\n```\n\n# Download and Setup\n1.**Clone the repository or download the script manually**.\n\n```bash\ngit clone https://github.com/Openstrata/HistoriX.git\ncd HistoriX\n```\n\n2.**Make the script executable**:\n\n```bash\nchmod +x history_analyzer.sh\n```\n\n3.**Run the script**:\n\n```bash\n./history_analyzer.sh\n```\n\n# Usage\nWhen you run **HistoriX**, you'll be presented with an interactive menu where you can choose from various options to analyze your command history. Below is an overview of the options:\n\n#### Main Menu Options:\n\n1.**Analyze History**: Analyze and display various statistics and command breakdowns.\n\n- **Most Frequent Commands**: Shows the top 10 most frequently used commands.\n- **Commands Run with sudo**: Displays all commands that were executed with `sudo`.\n- **Unique Commands**: Lists unique commands executed in your shell.\n- **Potentially Dangerous Commands**: Highlights risky commands (e.g., `rm -rf`).\n- **Total Commands**: Displays the total number of commands in your history.\n\n2.**Generate Visualization**: Creates graphical visualizations using GNUplot. Options include:\n\n- **Frequency Chart**: Visualizes the most frequent commands.\n- **Time-of-Day Usage**: Visualizes command usage patterns over time.\n\n3.**Suggestions**: Provides recommendations based on your history (e.g., safer alternatives to risky commands).\n\n4.**Filter by Date**: Filter command history based on a date range (e.g., last 24 hours, last week).\n\n5.**Group/Tag Commands**: Categorize commands into groups for better analysis (e.g., `git`, `docker`).\n\n6.**Execution Statistics**: View the execution time of commands.\n\n7.**Clean History File**: Optionally clean up sensitive data (passwords, tokens) from your history file.\n\n8.**Export Results**: Export your analysis results to CSV or JSON files.\n\n9.**Detect Frequent Combinations**: Detect frequently run command combinations (e.g., git pull \u0026\u0026 git merge).\n\n10.Send Alerts: Set up alerts based on command patterns (e.g., commands involving rm or sudo).\n\n11.**Process in Parallel**: Use GNU Parallel to process your history file faster.\n\n12.**Track Real-time Commands**: Enable real-time tracking of commands executed in the shell.\n\n13.**User-Specific Analysis**: Analyze the command history for the current user.\n\n14.**Categorize Commands**: Categorize commands based on simple patterns like Git, Docker, etc.\n\n15.**Time-of-Day Analysis**: Analyze the frequency of commands executed at different times of the day.\n\n16.**Exit**: Exit the program.\n\n# Example Output\nHere’s an example of what the output might look like when running **HistoriX**:\n\n```bash\n$ ./history_analyzer.sh\n\nSelect an option:\n1) Analyze History\n2) Generate Visualization\n3) Suggestions\n4) Filter by Date\n5) Group/Tag Commands\n6) Execution Statistics\n7) Clean History File\n8) Export Results\n9) Detect Frequent Combinations\n10) Send Alerts\n11) Process in Parallel\n12) Track Real-time Commands\n13) User-specific Analysis\n14) Categorize Commands\n15) Time-of-Day Analysis\n16) Exit\n\u003e 1\n\nSelect an analysis option:\n1) Most Frequent Commands\n2) Commands Run with sudo\n3) Unique Commands\n4) Potentially Dangerous Commands\n5) Total Commands\n\u003e 1\n\nMost Frequent Commands:\n[35] git\n[20] ls\n[12] rm\n[8] docker\n[5] sudo\n[3] cat\n```\n\n# Customizable Alerts\n\nHistoriX allows you to set up alerts based on command patterns. For example, you can create an alert for any command that involves `sudo` or `rm -rf` by selecting the **Send Alerts** option.\n\n**Example alert**:\n\n```bash\nAlert: Found command 'sudo rm -rf /'\n```\n\n# Visualizations\nHistoriX can generate GNUplot visualizations for command usage. The following visualizations are available:\n\n1.**Command Frequency Chart**: Displays the most used commands in a bar chart.\n\n2.**Time-of-Day Usage**: Shows command execution patterns based on the time of day.\nVisualizations are saved as PNG files in `/tmp` (or any other directory you specify).\n\n# Command History Cleanup\nThe **Clean History File** option allows you to remove sensitive data (e.g., `passwords`, `tokens`) from your history file. This is useful if you want to maintain privacy or prevent sensitive information from appearing in your history.\n\n# Exporting Results\nYou can export your analysis to CSV or JSON files. This is useful for long-term analysis or sharing with others.\n\n**Example command**:\n\n```bash\nExported to command_history.csv\n```\n\n# Contributing\nWe welcome contributions to **HistoriX**! If you have any ideas for new features or improvements, feel free to open an issue or create a pull request.\n\n### How to Contribute:\n1.**Fork the repository**.\n\n2.**Clone your fork**:\n```bash\ngit clone https://github.com/intrepidDev101/HistoriX.git\n```\n\n3.**Create a new branch for your feature**:\n```bash\ngit checkout -b new-feature\n```\n\n4.**Make your changes and commit**:\n```bash\ngit commit -m \"Add feature X\"\n```\n\n5.**Push to your fork**:\n```bash\ngit push origin new-feature\n```\n\n6.**Open a pull request from your fork to the original repository**.\n\n# License\n**HistoriX** is licensed under the [MIT License](#LICENSE). Feel free to use, modify, and distribute it!\n\n# Acknowledgments\n- **GNUplot**: For generating beautiful visualizations.\n\n- **GNU Parallel**: For multithreading and faster processing of large history files.\n\n- **Bash**: For being the backbone of the terminal environment.\n\n# Contact\nFor any questions or suggestions, feel free to reach out to the author at:\n[fluxNest@proton.me](#ProtonMail)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenstrata101%2Fhistorix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenstrata101%2Fhistorix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenstrata101%2Fhistorix/lists"}