Installed script with pip: Run like a command

Solution 1:

Add the path ~/.local/bin to the PATH environment.

Open the file .bashrc in a terminal

nano ~/.bashrc

and add

:$HOME/.local/bin

at the end of the PATH definition

e.g.

export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:$HOME/bin:$HOME/.local/bin

and add the line:

alias my_app="scdl - l <link>"

to start your command scdl - l <link> with the alias my_app.

Replace my_app with a name of your choice.

Start the command to read the configuration

source ~/.bashrc

That's all.

Solution 2:

Or simpler way... Just create a symlink to it in /usr/local/bin/

eg.

sudo ln -s /home/user/.local/bin/scdl /usr/local/bin/scdl

Then its automatically added to the default PATH