Skip to main content

Analyze the history of a shell

Project description

Usage

# 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.yaml

CLI 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

Grouping and Anonymization

You can provide a grouping.yaml file to group commands together. The default is the following:

'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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shell_history_analysis-0.1.2.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shell_history_analysis-0.1.2-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file shell_history_analysis-0.1.2.tar.gz.

File metadata

  • Download URL: shell_history_analysis-0.1.2.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.8.0 tqdm/4.40.0 CPython/3.6.9

File hashes

Hashes for shell_history_analysis-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a2093bf7f1c1de123e5bff96dd144d36f0ac813a798c3630b794d7958a458a87
MD5 d68e202690dc64f104c956dbdfc6ef5a
BLAKE2b-256 67a6c83bc1c6de1cbdb8c15a4a851ad84a4d61ef0ca9c7171a1e10813100e046

See more details on using hashes here.

File details

Details for the file shell_history_analysis-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: shell_history_analysis-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.8.0 tqdm/4.40.0 CPython/3.6.9

File hashes

Hashes for shell_history_analysis-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 971bb94aa3b273bf14631cdba32d54e0193135a1ced882bd6acfc9ada55722af
MD5 fa1ac3c243ad6df3b3c09f0876fd248a
BLAKE2b-256 8e9fadfe0e7a572a0aa07adfbd650f8741cf9bacca0345009b239213d1206101

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page