ana-cli

module
v0.3.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT

README

ana-cli

ana is a command-line client for TextQL. It speaks the Connect-RPC endpoints that power the TextQL web app and exposes them as a scriptable CLI for automation, CI pipelines, and power-user workflows.

Installation

Install script (linux / macOS)
curl -fsSL https://raw.githubusercontent.com/highperformance-tech/ana-cli/main/install.sh | sh

Installs the latest release into /usr/local/bin/ana. Override with INSTALL_DIR=$HOME/.local/bin.

go install
go install github.com/highperformance-tech/ana-cli/cmd/ana@latest
Download a release archive

Grab the matching ana_<version>_<os>_<arch>.tar.gz (or .zip on Windows) from the releases page, extract the ana binary, and drop it on your PATH. Each release ships a checksums.txt you can verify with sha256sum -c checksums.txt.

Build from source
git clone https://github.com/highperformance-tech/ana-cli.git
cd ana-cli
make build
./bin/ana --version
Windows SmartScreen

The Windows binary is unsigned. On first run SmartScreen may block it with "Windows protected your PC". Click More info → Run anyway. To avoid the prompt altogether, unblock the executable before running:

Unblock-File -Path .\ana.exe

Usage

ana [global flags] <command> [args]

Global flags:

Flag Description
--endpoint <url> Override the API endpoint
--token-file <path> Path to a bearer-token file
--profile <name> Select a config profile
--json Emit JSON output
--version, -V Print version info
Getting started
ana auth login --endpoint https://app.textql.com
ana org show
ana connector list
ana chat send "show me last month's revenue"

Run ana --help or ana <verb> --help for command-specific flags.

Configuration

ana stores tokens and per-profile endpoints at $XDG_CONFIG_HOME/ana/config.json (falling back to ~/.config/ana/config.json). Override with --token-file or the ANA_TOKEN_FILE environment variable.

Development

make test          # go test -race ./...
make cover         # enforces 100% coverage on internal/...
make lint          # gofmt, go vet, staticcheck
make build         # -> ./bin/ana
make release-local # goreleaser check + snapshot (requires goreleaser)

Conventional commits drive the release pipeline: a feat: or fix: landing on main causes release-please to open a PR; merging that PR tags the release and triggers GoReleaser to publish binaries, archives, checksums, and SBOMs to GitHub Releases.

CI scope

PRs are gated by a single required check, CI Complete. To keep runner time proportional to impact, docs-only PRs skip the Go lint / test / build / goreleaser jobs and CI Complete reports green immediately. A PR counts as "code" when it touches any of:

  • **/*.go, go.mod, go.sum
  • Makefile, .goreleaser.yml, install.sh
  • .github/workflows/**

Everything else — README.md, LICENSE, docs/**, api-catalog/**, .claude/**, .gitignore — skips the heavy jobs. Release-please likewise ignores doc-only merges on main.

License

MIT — see LICENSE.

Directories

Path Synopsis
cmd
ana command
Command ana is the TextQL platform CLI.
Command ana is the TextQL platform CLI.
e2e
harness
Package harness wires the ana CLI against a real TextQL endpoint for live smoke tests.
Package harness wires the ana CLI against a real TextQL endpoint for live smoke tests.
internal
audit
Package audit provides the `ana audit` verb tree: tail.
Package audit provides the `ana audit` verb tree: tail.
auth
Package auth provides the `ana auth` verb tree: login, logout, whoami, and the nested `keys` and `service-accounts` groups.
Package auth provides the `ana auth` verb tree: login, logout, whoami, and the nested `keys` and `service-accounts` groups.
chat
Package chat provides the `ana chat` verb tree: new/list/show/history/send (streaming) plus rename, bookmark/unbookmark, duplicate, delete, and share.
Package chat provides the `ana chat` verb tree: new/list/show/history/send (streaming) plus rename, bookmark/unbookmark, duplicate, delete, and share.
cli
Package cli provides argument-dispatch glue for the ana CLI.
Package cli provides argument-dispatch glue for the ana CLI.
config
Package config reads and writes the ana CLI configuration file.
Package config reads and writes the ana CLI configuration file.
connector
Package connector provides the `ana connector` verb tree: list, get, create, update, delete, test, tables, examples.
Package connector provides the `ana connector` verb tree: list, get, create, update, delete, test, tables, examples.
dashboard
Package dashboard provides the `ana dashboard` verb tree: list, folders, get, spawn, health.
Package dashboard provides the `ana dashboard` verb tree: list, folders, get, spawn, health.
feed
Package feed provides the `ana feed` verb tree: show (posts) and stats.
Package feed provides the `ana feed` verb tree: show (posts) and stats.
ontology
Package ontology provides the `ana ontology` verb tree: list and get.
Package ontology provides the `ana ontology` verb tree: list and get.
org
Package org provides the `ana org` verb tree: show, members, roles, and permissions.
Package org provides the `ana org` verb tree: show, members, roles, and permissions.
playbook
Package playbook provides the `ana playbook` verb tree: list, get, reports, and lineage.
Package playbook provides the `ana playbook` verb tree: list, get, reports, and lineage.
profile
Package profile provides the `ana profile` verb tree: list, add, use, remove, and show.
Package profile provides the `ana profile` verb tree: list, add, use, remove, and show.
testcli
Package testcli provides helpers for verb-package unit tests.
Package testcli provides helpers for verb-package unit tests.
transport
Package transport provides a Connect-RPC-over-JSON client used by ana-cli to talk to the TextQL backend.
Package transport provides a Connect-RPC-over-JSON client used by ana-cli to talk to the TextQL backend.

Jump to

Keyboard shortcuts

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