{"id":17678324,"url":"https://github.com/yantonov/alias","last_synced_at":"2025-05-12T21:23:20.100Z","repository":{"id":38330557,"uuid":"211460495","full_name":"yantonov/alias","owner":"yantonov","description":"Add aliases for a CLI program which has no alias support","archived":false,"fork":false,"pushed_at":"2025-05-03T15:37:14.000Z","size":111,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-03T16:46:00.141Z","etag":null,"topics":["alias","shell"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yantonov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null}},"created_at":"2019-09-28T07:16:32.000Z","updated_at":"2025-05-03T15:37:18.000Z","dependencies_parsed_at":"2024-10-24T09:43:43.810Z","dependency_job_id":"249968dd-b291-4703-a356-bf4e6b397f52","html_url":"https://github.com/yantonov/alias","commit_stats":{"total_commits":132,"total_committers":3,"mean_commits":44.0,"dds":"0.48484848484848486","last_synced_commit":"4a6f0a5e12ae160f22c92d2667e897145cd8e697"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yantonov%2Falias","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yantonov%2Falias/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yantonov%2Falias/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yantonov%2Falias/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yantonov","download_url":"https://codeload.github.com/yantonov/alias/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253823832,"owners_count":21969917,"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","shell"],"created_at":"2024-10-24T08:04:34.237Z","updated_at":"2025-05-12T21:23:20.083Z","avatar_url":"https://github.com/yantonov.png","language":"Rust","readme":"[![Build Actions Status](https://github.com/yantonov/alias/workflows/ci/badge.svg)](https://github.com/yantonov/alias/actions)\n\n# Intro\n\nThis app helps you to define a custom alias for a command-line utility that has no [alias support](https://git-scm.com/docs/git-config#Documentation/git-config.txt-alias).  \nUsing this app you can define some aliases (including shell aliases) and use them just like they were defined out of the box.  \nTherefore, you do not need to pollute a global namespace with shell aliases (using .zsh/.bashrc/.profile etc).  \n\n# Table of contents\n1. [Technical notes](#technical-notes)\n2. [Usage](#usage)\n3. [List of aliases](#list-of-aliases)\n4. [Override](#override)\n5. [Target executable location](#target-executable-location)\n6. [Different operating systems](#different-operating-systems)\n7. [Shell scripts on Windows](#shell-scripts-on-windows)\n8. [Examples](#examples)\n\n## Technical notes\nTechnically is just a thin wrapper(proxy) to conditionally run target program.  \n\nThis app is independent of\n1. the target program which needs aliases support\n2. operating system\n3. shell/command interpreter\n\n## Usage\n1. Put the executable under PATH, and name it the same as the target program (program without alias support)  \nYou can get prebuilt binaries [here](https://github.com/yantonov/alias/releases)\n2. Write config (config.toml) and put it near the executable  \n(a sample config will be created at the first launch if it does not exist)\n3. Use custom aliases just like if they are supported out of the box.  \n\n## List of aliases\nThe list of aliases can be shown by using --aliases parameter.\n\n## Override\nYou can add an additional configuration file 'override.toml' to the same directory.  \nThis helps you to redefine or introduce new aliases which depend on the environment.  \nMotivation: some aliases may be specific to the working environment and you do not want to expose them by sharing using a public repository.\n\n## Target executable location\nThere are two options:  \n1. You can explicitly define the target executable using 'executable' parameter (see the example [here](https://github.com/yantonov/alias/blob/master/docs/sample_config.toml)).  \n2. Without explicit configuration, the app tries to detect the target executable automatically by trying to find an existing file with the same name later in the PATH.  \nIn that case, you have to add this alias application in front of the target executable in terms of the PATH variable.\n\n## Different operating systems\nDifferent operating systems place binary files in different directories.  \nTo handle this, it is possible to reference target executable using environment variables (example: executable=\"${HOME}/tools/bin/app\")  \nThis helps you to use the same config file across different operating systems.\n\n## Shell scripts on Windows\nWhen you try to use shell script directly as a target executable you can face the problem '%1 is not a valid win32 application'.  \nTo deal with this issue you can ann run_as_shell=true parameter to the config (or to the override file if you prefer), this will allows you to run the script using the current shell.\n\n## Examples\nSample config can be found [here](https://github.com/yantonov/alias/blob/master/docs/sample_config.toml).\n\nA little bit more realistic examples:  \n1. [docker aliases](https://github.com/yantonov/docker-aliases)  \n2. [podman aliases](https://github.com/yantonov/podman-aliases)  \n3. [gw aliases](https://github.com/yantonov/gw-aliases)  \n4. [cdt aliases](https://github.com/yantonov/cdt-aliases)  \n5. [arc aliases](https://github.com/yantonov/arc-aliases)  \n6. [ya tool aliases](https://github.com/yantonov/ya-aliases)  \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyantonov%2Falias","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyantonov%2Falias","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyantonov%2Falias/lists"}