# pgcli Interactive PostgreSQL Client with Autocompletion

> pgcli is an interactive PostgreSQL CLI with context-aware autocompletion, syntax highlighting, and multi-line query editing. Part of the dbcli project with 13k+ GitHub stars, it makes database exploration and query writing dramatically more productive.

- Skill: `agentskillexchange/pgcli-interactive-postgresql-client-with-autocompletion` (Agent Skill)
- Install (CLI): `npx skillmds@latest add agentskillexchange/pgcli-interactive-postgresql-client-with-autocompletion`
- Raw SKILL.md: https://api.skillmd.com/api/skills/agentskillexchange/pgcli-interactive-postgresql-client-with-autocompletion/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: agentskillexchange (https://skillmd.com/u/agentskillexchange)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/agentskillexchange/pgcli-interactive-postgresql-client-with-autocompletion

---


# pgcli Interactive PostgreSQL Client with Autocompletion

pgcli is an interactive PostgreSQL CLI with context-aware autocompletion, syntax highlighting, and multi-line query editing. Part of the dbcli project with 13k+ GitHub stars, it makes database exploration and query writing dramatically more productive.

## Installation

Use the upstream install or setup path that matches your environment:
- $ pip install -U pgcli
- $ brew install pgcli # Only on macOS
- $ brew install pgcli
- $ pip install pgcli

Requirements and caveats from upstream:
- If you already know how to install python packages, then you can simply do:
- If you don't know how to install python packages, please check the
- .. _prompt_toolkit: https://github.com/jonathanslenders/python-prompt-toolkit

Basic usage or getting-started notes:
- -----------
- ::
- or

- Source: https://github.com/dbcli/pgcli
- Extracted from upstream docs: https://raw.githubusercontent.com/dbcli/pgcli/HEAD/README.rst

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/pgcli-interactive-postgresql-client/)

