onequery
July 22, 2026 ยท View on GitHub
Query any connected data source from your terminal.
Install
brew install wordbricks/tap/onequery
npm install -g @onequery/cli
Or run directly:
npx @onequery/cli --help
Usage
onequery auth login
onequery org use <org>
onequery source list
onequery source update sentry://<key> --input credentials-patch.json
onequery source delete sentry://<key> --yes
onequery query exec --source postgres://<key> --sql "SELECT * FROM users LIMIT 10"
Source updates accept a partial credential document such as
{"credentials":{"organizationSlug":"wordbricks"}}. OneQuery retains omitted
secrets, validates and tests the merged credentials, and persists them only when
the connection test succeeds. Source deletion requires --yes.
Profiles
OneQuery stores the default CLI auth session and config in ~/.onequery/auth.json
and ~/.onequery/config.toml, or under ONEQUERY_HOME when it is set. Named
profiles keep separate local auth/config state under
~/.onequery/profiles/<profile>/.
onequery --profile work auth login
ONEQUERY_PROFILE=work onequery auth whoami
--profile takes precedence over ONEQUERY_PROFILE. ONEQUERY_ACCESS_TOKEN
remains invocation-only and takes precedence over the selected profile's stored
auth session without implicitly writing to it.
Self-host
onequery gateway start
Upgrade
onequery upgrade
Platforms
macOS, Linux (glibc and musl), Windows.