Skip to main content

Linux bash aliases generator

Project description

topalias

Build Status Coverage GitLab pipeline Python Version

topalias - Linux bash/zsh alias generator and statistics from command history, written on Python.

Features

  • Generate short alias for popular command from bash/zsh shell history
  • Command history statistics & analytics
  • Parametrised input
  • Console help for all commands, options and arguments
  • Shell workflow hints

Installation

From pypi.org repository:

pip3 install -U --user topalias

From source:

git clone https://github.com/CSRedRat/topalias
python3 topalias/setup.py install --user

Run as python script without install:

git clone https://github.com/CSRedRat/topalias
python3 topalias/topalias/cli.py -h

Install requirements

sudo apt install python3 python3-pip -y

Usage

generated bash aliases

Showcase how your project can be used:

topalias # check if you uses aliases in ~/.bash_aliases - analyze and print usage statistics, offers to find new simple aliases
topalias -h # print help
topalias history # analyze local bash history
topalias h --acr=2 # set minimal length for generated acronym filter, so that exclude some short command and find long, hard, usable command

File path search order:

  • .bash_history in current . directory
  • .bash_history in home ~ directory
  • example development files in topalias/data

Run as python module:

python3 -m topalias

Also you can use topalias utility in Bash for Git on Windows and in WSL.

TODO

  • zsh support
  • exclude used alias from command chart
  • alias usage statistic
  • add any acronym algorithm
  • more statistics & analytics (used dir, utils, parameters, time)
  • only util in command without parameters usage statistic
  • history file path parameter
  • top command count parameter
  • alias max length parameter

Please add you feature requests: https://github.com/CSRedRat/topalias/issues/new

License

GPLv3

Contributors вњЁ

Thanks goes to these wonderful people (emoji key):


Sergey Chudakov

💻 🚇 🤔 🚧 📦 🧑‍🏫 💡

GitLab repository mirror with CI/CD: https://gitlab.com/CSRedRat/topalias

GitHub Pages: https://csredrat.github.io/topalias/

Version history

We follow Semantic Versions.

Version 1.1.7

  • Build and publish working package

Version 0.1.0

  • Initial release

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

topalias-1.2.13.tar.gz (10.1 kB view details)

Uploaded Source

Built Distributions

topalias-1.2.13-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

topalias-1.2.13-py2.py3-none-any.whl (8.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file topalias-1.2.13.tar.gz.

File metadata

  • Download URL: topalias-1.2.13.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for topalias-1.2.13.tar.gz
Algorithm Hash digest
SHA256 ce3dd71d375ca5005d6d1ff9212bf60c56a20f263be73c39c5d91febfffdaf08
MD5 583818101114014bc4fb523a901713c7
BLAKE2b-256 ab0f3cffbdf2fa721a2489fe7de5b1d40e2315e87b2ca840e1b39cca88510314

See more details on using hashes here.

File details

Details for the file topalias-1.2.13-py3-none-any.whl.

File metadata

  • Download URL: topalias-1.2.13-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for topalias-1.2.13-py3-none-any.whl
Algorithm Hash digest
SHA256 cc89ba2520c441857e4e9dfb44f1181b10e0b202d17267e6f19feef7ead28980
MD5 27c8315ed6208ad8c31f880551e25e04
BLAKE2b-256 b9c054a33cdda87cb1a4fc78a61366729bb330976bcde492cae109a32318d9c4

See more details on using hashes here.

File details

Details for the file topalias-1.2.13-py2.py3-none-any.whl.

File metadata

  • Download URL: topalias-1.2.13-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for topalias-1.2.13-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 fa9ca953c7a6c42784f01bccde68e81063362e9b2aca63fee3acf139a6bb741e
MD5 22465595d6406f8357be4aa141f6e04e
BLAKE2b-256 fb5838ab244b076c992abb023eef4008853ba9b8720f32d343db3ff72b3db150

See more details on using hashes here.

Supported by

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