pkg.soopen package index

brew / rank 4984

Install psql2csv with Homebrew, Nix

Run a query in psql and output the result as CSV. Version 0.12 via Homebrew; verified from local package data. Also installable with nix: nix profile install nixpkgs#psql2csv.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install psql2csv

local Homebrew formula metadata

Linux

Nixverified · 92%
nix profile install nixpkgs#psql2csv

nixpkgs package indexes · pkgs/by-name/ps/psql2csv/package.nix · source: api.github.com

overview

Package summary

Run a query in psql and output the result as CSV

Commands and aliases

  • psql2csv

history

Project history and usage

psql2csv is a command-line wrapper for running PostgreSQL queries with psql and writing the results as configurable CSV.

Project history

Philipe Fatio created psql2csv as a shell-based frontend that runs a PostgreSQL query through psql and emits CSV. The repository's official documentation presents it as a compact command-line utility rather than a separate database client.

Adoption history

The official README documents distribution through Homebrew, while the supplied package metadata also records Nix packaging. Its deliberately small, single-script form also supports manual installation into PATH.

How it is used

A query can be supplied as the final argument or through standard input, with CSV written to standard output. Users can control delimiters, quoting, escaping, NULL representation, headers, encoding, time zone, and search path; remaining arguments are forwarded to psql.

Why package nerds care

psql2csv exemplifies the Unix package tradition of wrapping a capable lower-level client with a narrowly focused command. It makes scripted PostgreSQL-to-CSV export convenient while preserving access to psql connection and variable options.

Timeline

  • Initial project phase: Published as a standalone shell script for psql-to-CSV export.
  • Homebrew adoption: The official README documents installation with brew.
  • 2019: The README's advanced example documents parameterized recurring-report workflows.

Related projects

  • PostgreSQL psql performs the database connection and query work.
  • PostgreSQL COPY provides the underlying export semantics documented by the project.

Sources

  • Official project README: https://github.com/fphilipe/psql2csv#readme

security posture

Risk level: blue

broad file, network, media, or database tool signal.

Risk classifier

blue risk · medium confidence · tool

Why

  • broad file, network, media, or database tool signal

Signals

  • text:sql

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 1 platform targets.
  • Installs with 1 runtime dependencies.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

local files

Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.

Credential files

Credential-bearing paths to review before unattended agent runs.

Unix
~/.pgpass

executables

Installed executables

CommandKindExposureNote
psql2csvcliglobal executable

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-09-19
manager version0.12
manager updated
local dataok
upstreamcurrent
latest detectedv0.12

https://github.com/fphilipe/psql2csv

  • infoNo package-manager update timestamp was available.low confidence

install metadata

Package metadata

Package keybrew:psql2csv
Version0.12
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/psql2csv
Homepagehttps://github.com/fphilipe/psql2csv
Repositoryhttps://github.com/fphilipe/psql2csv
LicenseMIT
Source archivehttps://github.com/fphilipe/psql2csv/archive/refs/tags/v0.12.tar.gz
Dependencieslibpq
Bottleavailable (on all)
Homebrew post-installnot defined
Servicenone declared

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namepsql2csv
Version Scheme0
Revision1
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • stable

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

Nix95%

psql2csv

nix profile install nixpkgs#psql2csv
  • normalized package name match
  • Matched by: Psql2csv
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/ps/psql2csv/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

  • Geiger risk classifier
  • cross-ecosystem install command graph
  • curated configuration and credential file locations
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment
  • pkg.so package database
  • pkgdb category and tag curation