Shlink provides a CLI entry point which exposes a set of commands to perform a variety of operations. From creating, updating or listing short URLs, to manage API keys or handle your domains.
You can treat it as an alternative interface to manage your Shlink instance, that will be available out of the box.
The entry point is the bin/cli script, and you will usually run it as bin/cli [command] [arguments]. It is recommended to symlink the bin/cli script to a global shlink script, so that you can run the CLI from anywhere with shlink [command] [arguments].
Commands in Shlink’s CLI entry point are contextually namespaced in api-key, domain, short-url, tag and visit.
By running the bin/cli script with no arguments, you will see the full list of commands with a description for each one of them.
Running any command with the -h/--help flag will display an extended help for that specific command, showing the list of arguments, and a descriptive explanation on how to use it.
This is the full list of commands exposed by Shlink’s CLI entry point: