Skip to main content

A command line interface for the cPanel Unrestricted API.

Project description

PyPI Python version Documentation Status

cPanel Command Line Interface

cpanel_cli_icon

LÉAME en español

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.9 or later

Installation on Linux

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.

Installation on macOS

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.

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


PyPI Versión de Python Status de la documentación

Interfaz de línea de comandos para cPanel

cpanel_cli_icon

README in English

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.9 o superior

Instalación en Linux

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.

Instalación en macOS

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.

¿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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cpanel-cli-0.20.0.tar.gz (97.4 kB view hashes)

Uploaded Source

Built Distribution

cpanel_cli-0.20.0-py3-none-any.whl (35.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page