A command line interface for the cPanel Unrestricted API.
Project description
cPanel Command Line Interface
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.
Some examples
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 account scott@example.com:
$ cpanel get mail filter scott@example.com spamkiller
The output is generally JSON, so it’s easily parsable using, e.g., jq
User’s Guide
For a complete User’s Guide go to: https://cpanel-cli.readthedocs.io/en/latest/
Requirements
Linux or macOS; it might work on Windows
Python 3.8 or later
Installation on Linux
Install Python 3.8 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.8 or later should work.
Installation on macOS
Install Python 3.8 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.
What about installing on Windows?
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.
Contributing
See CONTRIBUTING
Interfaz de línea de comandos para cPanel
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.
Algunos ejemplos
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 correo scott@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
Guía del usuario
La guía del usuario completa se encuentra en: https://cpanel-cli.readthedocs.io/es/latest/
Requisitos
Linux o macOS; tal vez podría funcionar en Windows
Python 3.8 o superior
Instalación en Linux
Instale Python 3.8 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.8 o posterior debería funcionar.
Instalación en macOS
Instale Python 3.8 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.
¿Se puede instalar en Windows?
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.
Cómo contribuir
Véase CONTRIBUTING en español
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cpanel_cli-0.17.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df4c9989d7303c32adf4e15283067f66601c5829a98818cc0c850cd1cde138ec |
|
MD5 | 8da1e37de33029326fbdaba2425dc8f8 |
|
BLAKE2b-256 | 94afc6377159f0eee9eb08e25932d165eca2077f1d3ca99da0ce4fef0aa32f46 |