rdsh

command module
v0.0.0-...-8550fa3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2026 License: MIT Imports: 2 Imported by: 0

README

rdsh

CI

A CLI that runs ad-hoc SQL on Redash and prints the result — one command per round trip, designed so AI coding agents can call it from a shell.

Install

go install github.com/178inaba/rdsh@latest

Setup

One-time interactive setup — the key is verified before saving:

rdsh auth login

Usage

# Run a query (CSV by default; also --format tsv or json)
rdsh query "SELECT 1"

# From stdin or a file, JSON output, explicit data source
echo "SELECT id FROM users LIMIT 10" | rdsh query --format json --data-source warehouse
rdsh query -f query.sql

Run rdsh --help for the full reference.

Profiles
rdsh profile list
rdsh profile use staging
rdsh data-source list
Environment variables
RDSH_URL=https://redash.example.com RDSH_API_KEY=... rdsh query "SELECT 1" --data-source 3
Timeouts

The default timeout is 90s; exceeding it exits with code 124, cancelling the server-side job.

rdsh query -f heavy.sql --timeout 30m

Agent Skill

The repository ships an Agent Skill that teaches AI coding agents how to use rdsh. In Claude Code, install it as a plugin:

claude plugin marketplace add 178inaba/rdsh
claude plugin install rdsh@rdsh

For other agents, use a skill installer that consumes GitHub repos directly, e.g. npx skills:

npx skills add 178inaba/rdsh

Development

go test -race ./...

# Lint runs in Docker so the version matches CI — see compose.yaml
docker compose run --rm lint

# Let golangci-lint apply the fixes it can make itself
docker compose run --rm lint --fix

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
cmd
Package cmd implements the rdsh command-line interface.
Package cmd implements the rdsh command-line interface.
config
Package config manages named connection profiles stored under $XDG_CONFIG_HOME/rdsh (default ~/.config/rdsh), the same location scheme gh uses.
Package config manages named connection profiles stored under $XDG_CONFIG_HOME/rdsh (default ~/.config/rdsh), the same location scheme gh uses.
format
Package format renders query results as CSV, TSV, or JSON.
Package format renders query results as CSV, TSV, or JSON.
redash
Package redash is a minimal Redash REST API client covering ad-hoc query execution: submit, poll, fetch, cancel, plus data-source listing and a session check for login verification.
Package redash is a minimal Redash REST API client covering ad-hoc query execution: submit, poll, fetch, cancel, plus data-source listing and a session check for login verification.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL