A command line interface for the cPanel Unrestricted API.
Quickly execute commands in a terminal to manage a website instead of logging into cPanel and clicking your way around the web interface. You can also use this utility in scripting jobs.
Print help:
$ cpanel help
Print help on implemented modules:
$ cpanel help modules
Print help on module
mail
:$ cpanel help mail
List cPanel email accounts:
$ cpanel list mail accounts
Get a description of email filter
spamkiller
associated to email accountscott@example.com
:$ cpanel get mail filter scott@example.com spamkiller
The output is generally JSON, so it’s easily parsable using, e.g., jq
For a complete User’s Guide go to: https://cpanel-cli.readthedocs.io/en/latest/
- Linux or macOS; it might work on Windows
- Python 3.9 or later
Install Python 3.9 or later using your distro’s package manager.
Then run:
$ python3 -m pip install --user cpanel-cli
Test the installation using:
$ cpanel --version
Tested on Ubuntu 21.10 “Impish Indri”, but it has no specific Ubuntu requirements, so any Linux distro with Python 3.9 or later should work.
Install Python 3.9 or later using Homebrew.
Then run:
$ python3 -m pip install --user cpanel-cli
Test the installation using:
$ cpanel --version
Tested on macOS 10.15.7 “Catalina”; should also work on “Big Sur” or later.
I suspect this should work on Windows 10/11 using WSL 2 (Windows Subsystem for Linux).
Unfortunately, I don’t have access to a Windows system, so I can’t confirm this. Pull requests are very much welcome in case anyone wants to try out it and contribute.
See CONTRIBUTING
Una interfaz de línea de comandos para la Unrestricted API de cPanel.
Ejecute rápidamente comandos en un terminal en lugar de iniciar sesión en la interfaz web de cPanel. También puede usar este utilitario para trabajos de scripting.
Imprime la ayuda:
$ cpanel help
Imprime la ayuda de los módulos implementados:
$ cpanel help modules
Imprime la ayuda del módulo
mail
:$ cpanel help mail
Lista las cuentas de correo de cPanel:
$ cpanel list mail accounts
Obtiene la description del filtro de correo
spamkiller
asociado a la cuenta de de correoscott@example.com
:$ cpanel get mail filter scott@example.com spamkiller
La salida es generalmente JSON, por lo que es fácilmente analizable utilizando, por ejemplo, jq
La guía del usuario completa se encuentra en: https://cpanel-cli.readthedocs.io/es/latest/
- Linux o macOS; tal vez podría funcionar en Windows
- Python 3.9 o superior
Instale Python 3.9 o superior usando el gestor de paquetes de su distribución.
Luego ejecute:
$ python3 -m pip install --user cpanel-cli
Pruebe la instalación con:
$ cpanel --version
Probado en Ubuntu 21.10 “Impish Indri”, pero no tiene requisitos específicos de Ubuntu, por lo que cualquier distribución de Linux con Python 3.9 o posterior debería funcionar.
Instale Python 3.9 o posterior usando Homebrew.
Luego ejecute:
$ python3 -m pip install --user cpanel-cli
Pruebe la instalación con:
$ cpanel --version
Probado en macOS 10.15.7 “Catalina”; también debería funcionar en “Big Sur” o posterior.
Sospecho que esto debería funcionar en Windows 10/11 usando WSL 2 (Windows Subsystem for Linux).
Desafortunadamente, no tengo acceso a un sistema Windows, así que no puedo confirmarlo. Los pull requests son bienvenidos en caso de que alguien quiera probarlo y contribuir.
Véase CONTRIBUTING en español