Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/martinthoma/shell-history-analysis
Analyze how you use your shell
https://github.com/martinthoma/shell-history-analysis
data-analysis python shell
Last synced: 19 days ago
JSON representation
Analyze how you use your shell
- Host: GitHub
- URL: https://github.com/martinthoma/shell-history-analysis
- Owner: MartinThoma
- License: mit
- Created: 2020-01-07T21:37:58.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-08T02:39:30.000Z (almost 2 years ago)
- Last Synced: 2024-11-29T12:08:56.558Z (26 days ago)
- Topics: data-analysis, python, shell
- Language: Python
- Homepage:
- Size: 104 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![PyPI version](https://badge.fury.io/py/shell-history-analysis.svg)](https://badge.fury.io/py/shell-history-analysis)
[![Python Support](https://img.shields.io/pypi/pyversions/shell-history-analysis.svg)](https://pypi.org/project/shell-history-analysis/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
![GitHub last commit](https://img.shields.io/github/last-commit/MartinThoma/shell-history-analysis)## Usage
```bash
# Get the history file
$ history > history.txt# Install
$ pip install shell_history_analysis# You have to know which shell you have
# This is important, because the `history` command has different outputs in
# different shells.
# Fish shell has only the command itself as an output.
$ shell_history_analysis history.txt --shell=zsh
Assumed shell: zsh
Grouping filepath: /home/moose/GitHub/shell-history-analysis/shell_history_analysis/grouping.yamlCLI Utils 2731
git 2498
Python 1536
Editor(s) 905
System Package Manager 271
Dev-Tools 203
Docker 187
System Management 160
mutmut 153
CLI Programs 88
pipenv 53
clana 43
conda 36
exercism 33
7z 21
hwrt 21
Shell Scripting 21
pandoc 21
gzip 20
Name: base_command, dtype: int64
Writing image to /home/moose/history.png
```![History of Commands](https://raw.githubusercontent.com/MartinThoma/shell-history-analysis/master/docs/history.png)
## Grouping and Anonymization
You can provide a `grouping.yaml` file to group commands together. The default
is the following:```bash
'CLI Programs':
- aspell
- ffmpeg
- ffprobe
- dot
- neato
- fdp
- circo
- convert
- md5sum
- curl
- wget
- jq
- netstat
'CLI Utils':
- mv
- cd
- ..
- ...
- ls
- rm
- grep
- cat
- cp
- mkdir
- head
- tail
- chmod
- chown
- watch
- open
- xdg-open
- file
- history
- tree
- touch
- find
- locate
- ping
- man
- ln
- wc
- df
- du
- pwd
- ll
Databases:
- mysql
- psql
Dev-Tools:
- make
- meld
- diff
- cookiecutter
- cloc
Docker:
- docker
- docker-compose
Editor(s):
- sublime
- subl
- vim
- vi
- spyder
- spyder3
- nano
Java:
- mvn
- java
- javac
JS:
- npm
- node
- ntl
- yarn
- nvm
- lerna
Cloud:
- az
- aws
LaTeX:
- pdflatex
- tlmgr
Python:
- python
- python2
- python3
- pip
- pip2
- pip3
- virtualenv
- venv
- black
- isort
- pylint
- mypy
- pytest
- flask
- pyenv
- coverage
- tox
- flake8
- twine
- pydocstyle
- pip-compile
- pylama
- pybabel
- pep8
- piprot
- jupyter
- alembic
Remote:
- scp
- ssh
- ssh-keygen
Rust:
- cargo
'Shell Scripting':
- for
- date
'System Management':
- kill
- killall
- echo
- export
- env
- ps
- top
- htop
- atop
- systemctl
- sysctl
- ip
- ifconfig
- which
- sysbench
- service
- dmesg
'System Package Manager':
- apt
- apt-get
- apt-cache
- update-alternatives
- dpkg
- add-apt-repository
- brew
- mas
'Web Development':
- ab
- http
- ng
git:
- git
- git-fame
```