Recently I facilitated problem that there is no easy way to create alias to most useful apps in Windows command line.  I found some hacks they require registry modifications and so one.  So because of lag of this feature I decided to simplify my workflow and I created simple Python script.

Solution is simple and quite straight forward. Each new alias will be created as a bat file with right name.  Assuming that main folder of aliases will be added to system PATH everything should work fine.

Script provides simple API:

  • add: add specific alias for given path
  • rem: remove alias with name
  • list: list all registered aliases
  • get: shows run script for specific alias



  1. Create aliases for command line applications and GUI applications. GUI applications requires –fork flag to do not block command line until application stop.
  2. Pass invoke parameter of alias to destination program. Let’s assume that you created alias for notepad using:
    alias add n notepad --fork

    Not you would like to open some file using this alias:

    n test.txt

    Result will be as expected. Notepad will run with text.txt as a invoke parameter.


  1. Open command line
  2. Create folder for aliases:
    mkdir C:\Users\Piotr\aliases
  3. Add this folder to system PATH
    • “My Computer” > “Properties” > “Advanced” > “Environment Variables” > “Path”
    • Append to PATH:
  4. Go to this folder:
    cd C:\Users\Piotr\
  5. Clone script:
    git clone .
  6. Register this script as an alias
    python C:\Users\Piotr\aliases\ add alias python C:\Users\Piotr\aliases\
  7. Start to use alias command


Depending on current needs, maybe I will add Linux, and MacOs support (but I assume they have own system for aliases).

Other nice feature it could be “setup” command which will register alias to invoke script. Will be great to auto register path to folder in system PATH.

More info and current state at:

1 Kudos