{"id":13551403,"url":"https://github.com/meteoritt/topalias","last_synced_at":"2025-04-16T01:12:41.418Z","repository":{"id":37092107,"uuid":"420374319","full_name":"meteoritt/topalias","owner":"meteoritt","description":"Linux bash/zsh aliases generator","archived":false,"fork":false,"pushed_at":"2022-12-23T11:34:28.000Z","size":559,"stargazers_count":46,"open_issues_count":13,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-16T01:12:35.484Z","etag":null,"topics":["alias","alias-analysis","alias-loader","alias-management","aliases","aliases-setup","aliasing","bash","cli","cmd","command","console","history","linux","python","shell","terminal","top","zsh"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/topalias","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meteoritt.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-23T09:55:59.000Z","updated_at":"2024-12-22T09:45:15.000Z","dependencies_parsed_at":"2023-01-30T18:30:51.868Z","dependency_job_id":null,"html_url":"https://github.com/meteoritt/topalias","commit_stats":null,"previous_names":["csredrat/topalias"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meteoritt%2Ftopalias","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meteoritt%2Ftopalias/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meteoritt%2Ftopalias/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meteoritt%2Ftopalias/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meteoritt","download_url":"https://codeload.github.com/meteoritt/topalias/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249178217,"owners_count":21225350,"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":["alias","alias-analysis","alias-loader","alias-management","aliases","aliases-setup","aliasing","bash","cli","cmd","command","console","history","linux","python","shell","terminal","top","zsh"],"created_at":"2024-08-01T12:01:47.426Z","updated_at":"2025-04-16T01:12:41.393Z","avatar_url":"https://github.com/meteoritt.png","language":"Python","readme":"# topalias\n\n[![Test Status](https://github.com/CSRedRat/topalias/workflows/Test/badge.svg?branch=master)](https://github.com/CSRedRat/topalias/actions?query=workflow%3ATest)\n[![Coverage](https://coveralls.io/repos/github/CSRedRat/topalias/badge.svg?branch=master)](https://coveralls.io/github/CSRedRat/topalias?branch=master)\n[![GitLab pipeline](https://gitlab.com/CSRedRat/topalias/badges/master/pipeline.svg)](https://gitlab.com/CSRedRat/topalias/-/pipelines)\n[![Python Version](https://img.shields.io/pypi/pyversions/topalias.svg)](https://pypi.org/project/topalias/)\n[![Downloads](https://static.pepy.tech/personalized-badge/topalias?period=total\u0026units=international_system\u0026left_color=black\u0026right_color=orange\u0026left_text=Downloads)](https://pepy.tech/project/topalias)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat\u0026labelColor=ef8336)](https://pycqa.github.io/isort/)\n[![DeepSource](https://static.deepsource.io/deepsource-badge-light-mini.svg)](https://deepsource.io/gh/CSRedRat/topalias/?ref=repository-badge)\n\n[topalias](https://github.com/CSRedRat/topalias) - Linux alias generator from bash/zsh command history with statistics, written on [Python](https://pypi.org/project/topalias/).\n\n## Features\n\n-   Generate short alias for popular command from bash/zsh shell history\n-   Command history statistics \u0026 analytics\n-   Parametrised input\n-   Console help for all commands, options and arguments\n-   Shell workflow hints\n\n## Installation\n\nFrom [pypi.org repository](https://pypi.org/project/topalias/):\n\n```bash\npip3 install -U --user topalias\n```\n\nFrom source:\n\n```bash\ngit clone https://github.com/CSRedRat/topalias\npython3 topalias/setup.py install --user\n```\n\nRun as python script without install:\n\n```bash\ngit clone https://github.com/CSRedRat/topalias\npython3 topalias/topalias/cli.py -h\n```\n\n### Install requirements\n\n```bash\nsudo apt install python3 python3-pip -y\n```\n\nAdd PATH environment variable for run Python tools as Linux utility:\n\n```bash\necho \"export PATH=$PATH:$HOME/.local/bin\" \u003e\u003e ~/.bashrc\nsource ~/.bashrc\n```\n\n## Usage\n\n![generated bash aliases](https://github.com/CSRedRat/topalias/raw/master/images/bash_screenshot.png \"Bash topalias output\")\n\nWithout parameters utility check if you use alias in ~/.bash_aliases - analyze and print usage statistics, then find new simple aliases\n\n```bash\npython3 -m topalias  # run as python module\ntopalias  # check aliases and print suggestion bash command history\ntopalias -h  # print help\ntopalias --zsh  # work with zsh shell command history\ntopalias --min=2  # set minimal length for generated acronym filter, so that exclude some short command and find long, hard, usable command\ntopalias --debug history  # only analyze local bash history and print filtered rows\n```\n\nFiles path search order:\n\n-   directory from execution parameter\n-   .bash_history in . current directory\n-   .bash_history in ~ user home directory\n-   example development files in topalias/data\n\nYou can change dot files search path to another user home directory:\n\n```bash\ntopalias -f /home/user  # or topalias --path /home/user\n```\n\nAlso you can use topalias utility in [Bash for Git](https://gitforwindows.org) on Windows and in [WSL](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux).\n\n### Documentation\n\n```\nUsage: topalias [OPTIONS] COMMAND [ARGS]\n\nOptions:\n  -l, --min INTEGER     Print alias acronym not less that value. Default: 1\n  -c, --count INTEGER   Print specified number acronym suggestions. Default:\n                        20\n\n  --filter              Filter used aliases in history. Default: False\n  -z, --zsh             Use zsh shell history file .zsh_history. Default:\n                        False\n\n  -f, --path TEXT       Change custom directory for files: .bash_aliases,\n                        .bash_history, .zsh_history\n\n  --version             Print current program version and check latest on\n                        pypi.org.\n\n  --debug / --no-debug  Enable debug strings in output.\n  -h, --help            Show this message and exit.\n\nCommands:\n  hint     Print all hints.\n  history  Print bash history file.\n  version  Get program current and available version.\n```\n\n## TODO\n\n-   check if alias name already used\n-   check if alias already added\n-   add any another acronym algorithm with semantic\n-   more statistics \u0026 analytics (used dir, utils, parameters, time)\n-   alias max length parameter\n-   command ignore list flag: top, emacs, vim\n-   often used command \"ssh username@servername\" suggest add to .ssh/config/\n\n## License\n\n[GPLv3](https://github.com/CSRedRat/topalias/blob/master/LICENSE)\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/CSRedRat\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/1287586?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eSergey Chudakov\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/CSRedRat/topalias/commits?author=CSRedRat\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#infra-CSRedRat\" title=\"Infrastructure (Hosting, Build-Tools, etc)\"\u003e🚇\u003c/a\u003e \u003ca href=\"#ideas-CSRedRat\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"#maintenance-CSRedRat\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"#platform-CSRedRat\" title=\"Packaging/porting to new platform\"\u003e📦\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/morozsm\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/4393731?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eSergey Morozik\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/CSRedRat/topalias/commits?author=morozsm\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\n_GitLab repository mirror with CI/CD: [https://gitlab.com/CSRedRat/topalias](https://gitlab.com/CSRedRat/topalias)_\n\n","funding_links":[],"categories":["HTML","\u003ca name=\"cheatsheet\"\u003e\u003c/a\u003eCommands cheatsheet and snippets"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeteoritt%2Ftopalias","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeteoritt%2Ftopalias","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeteoritt%2Ftopalias/lists"}