Skip to content
Gestión Plagas

CLI

From the terminal or your coding agent

The gestion-plagas command talks to the API: one command per operation, JSON responses for your scripts and a skill so Claude Code and Codex can work with your data.

1. Install

You need Python 3.9 or later. With pipx or uv it is installed as one more command:

pipx install https://gestion-plagas.com/desarrolladores/cli/gestion_plagas-1.0.0-py3-none-any.whl
uv tool install https://gestion-plagas.com/desarrolladores/cli/gestion_plagas-1.0.0-py3-none-any.whl

Or download gestion-plagas.py, a single file with no dependencies, and run it with python gestion-plagas.py.

2. Connect to your company

gestion-plagas setup

It asks for an API key (create it in Settings › Sync with other apps; it starts with gp_), checks that it works and saves it for your computer user only. At the end it offers to install the skill.

On a server or in CI, use the GP_CLAVE environment variable instead of setup. Several companies? gestion-plagas setup --perfil otra and then --perfil otra in each command.

3. The commands

OrderWhat it does
gestion-plagas estadoCompany, user and permissions of the key.
gestion-plagas recursosThe resources the key can reach.
gestion-plagas listar clientes --q garcía --todoSearch with filters (--desde, --hasta, --estado, --cliente, --filtro field=value); --todo fetches every page.
gestion-plagas ver clientes 12The full record.
gestion-plagas crear clientes nombre="Bar Pepe"Create, with field=value or --json (text, @file.json or - for standard input).
gestion-plagas modificar clientes 12 telefono=600111222Change only what is sent.
gestion-plagas borrar clientes 12Delete (to the recycle bin) or deactivate; asks for confirmation unless --si is given.
gestion-plagas accion documentos 45 pdf --salida f.pdfAn action on a record (issue, collect, send…) or on the whole resource with - as the id.
gestion-plagas pedir GET openapi.jsonAny API path.
gestion-plagas eventosThe webhook events the key can reach.
gestion-plagas mcpThe MCP server configuration for your assistant.

Responses are JSON (--compacto on one line, --tabla to read lists). Errors go to standard error and the exit code is not 0, so it works well with jq and in scripts:

gestion-plagas listar clientes --todo --compacto | jq -r '.resultados[] | [.id, .nombre] | @tsv'

4. The skill for Claude Code and Codex

gestion-plagas skill

It installs the instructions in ~/.claude/skills/gestion-plagas and ~/.codex/skills/gestion-plagas: the agent knows which commands to use, how to discover the resources and that it must ask you before deleting, issuing or collecting. To see it without installing it: gestion-plagas skill --ver.

Would you rather the agent used the MCP server? See how to connect your assistant.

We use our own and third-party cookies to analyse the use of the website. You can accept or reject them. Cookie policy

Chat on WhatsApp