CLI tool to check open-deal hygiene metrics in Pipedrive.
Current release: v0.2.0a1.
See CHANGELOG.md for release notes.
Based on Pipedrive OpenAPI v1 spec (https://developers.pipedrive.com/docs/api/v1/openapi.yaml):
GET /dealswithstatus=opento retrieve open deals (includesactivities_count,last_activity_date,next_activity_dateper deal).GET /stagesto determine the latest stages per funnel (configurable with--stages).GET /pipelinesto show funnel names in output.
- Python 3.11+
uv
Install dependencies and register a global terminal command:
bash scripts/install.shThis makes pipedrive-checker callable from your terminal.
The tool is installed in editable mode, so any source change is immediately reflected without reinstalling.
If ~/.local/bin is missing from PATH, the installer will prompt to update your shell config automatically.
Set your token in environment variable PIPEDRIVE_API_TOKEN:
export PIPEDRIVE_API_TOKEN="your_token_here"If the variable is not exported, the CLI also tries to read PIPEDRIVE_API_TOKEN from a local .env file.
Run the command:
pipedrive-checker deals_checkShow extended list of non-conforming late-stage deals by funnel:
pipedrive-checker deals_check --extendedUse a custom number of latest stages for the funnel checks:
pipedrive-checker deals_check --stages 3Alternative (without global install):
uv run pipedrive-checker deals_checkThe CLI prints two Rich tables:
-
Late-stage deals summary (scoped to the same N stages selected with
--stages):- Open deals (total)
- Open deals in last N stages
- Open deals in last N stages with no activities
- % of late-stage deals with no activities
-
Funnel late-stage quality metrics (per funnel, same N-stage scope):
- Number of open deals in the selected late stages
- % without probability
- % without expected close date
- % with past expected close date
- % without activities with expected close date set in the future
With --extended, the CLI also prints all non-conforming late-stage deals by funnel, including deal owner and issue details.
If --stages is greater than the number of stages in any funnel, the command exits with an error.
The CLI writes logs to logs/pipedrive_checker.log with rotation.
Storage policy is bounded to under 1MB total (450KB x 2 files max).
Build package artifacts:
uv buildInstall locally from the built wheel (example):
uv tool install --force dist/pipedrive_checker-0.2.0a1-py3-none-any.whlbash scripts/validate.sh