@zactax/openzac
v0.3.0
Published
A CLI tool for interacting with the OpenZac API
Downloads
56
Readme
OpenZac CLI
A command-line tool for querying public sales tax allocation data from the OpenZac API. Currently supports Texas and California jurisdictions.
OpenZac also ships as an MCP server, so AI coding agents like Claude Code, Claude Desktop, Codex CLI, and Gemini CLI can query tax data on your behalf.
Installation
Requires Node.js >= 20.
npm install -g openzacUpdating
npm update -g openzacAuthentication
Get an API key
Sign up for a free API key at open.zactax.com.
Login
openzac loginYou'll be prompted to enter your API key via masked input. On macOS, your key is stored securely in the system keychain. On other platforms, it's stored at ~/.config/openzac/settings.json with restricted permissions.
Logout
openzac logoutThis removes your stored API key.
Agent Tools
OpenZac integrates with AI coding agents via MCP (Model Context Protocol).
Supported agents
| Agent | MCP Server | |-------|:----------:| | Claude Code | Yes | | Claude Desktop | Yes | | Codex CLI | Yes | | Gemini CLI | Yes |
Setup
Run the interactive setup wizard to configure MCP for any detected agent:
openzac agentsManual MCP setup
Claude Code:
claude mcp add --scope user openzac -- openzac mcpClaude Desktop — add to your claude_desktop_config.json:
{
"mcpServers": {
"openzac": {
"command": "openzac",
"args": ["mcp"]
}
}
}Codex CLI — add to ~/.codex/config.toml:
[mcp_servers.openzac]
command = "openzac"
args = ["mcp"]Gemini CLI — add to ~/.gemini/settings.json:
{
"mcpServers": {
"openzac": {
"command": "openzac",
"args": ["mcp"]
}
}
}Uninstall from all agents
openzac agents uninstallUsage
Jurisdictions
List jurisdictions:
openzac jurisdictions
openzac jurisdictions -q "Austin" --state tx --type city
openzac jurisdictions --near 30.267,-97.743 --radius 10Find a single jurisdiction by ID:
openzac jurisdictions find <id>Texas sales tax allocations
openzac texas sales-tax allocations [options]
openzac tx sales-tax allocations [options]Texas-specific options:
| Flag | Description |
|------|-------------|
| --jurisdictions <ids> | Filter by jurisdiction IDs (comma-separated) |
| --jurisdiction-type <type> | Filter by type (city, county, transit, special_district) |
| --allocation-period <date> | Filter by specific month (YYYY-MM-DD) |
| --between <range> | Date range (YYYY-MM-DD,YYYY-MM-DD) |
| --since <date> | Allocations since date (YYYY-MM-DD) |
California sales tax allocations
openzac california sales-tax allocations [options]
openzac ca sales-tax allocations [options]California-specific options:
| Flag | Description |
|------|-------------|
| --jurisdictions <ids> | Filter by jurisdiction IDs (comma-separated) |
| --jurisdiction-type <type> | Filter by type (city, county, transit, special_district) |
| --allocation-period <date> | Filter by specific month (YYYY-MM-DD) |
| --between <range> | Date range (YYYY-MM-DD,YYYY-MM-DD) |
Note: California uses
jurisdiction.*field names (e.g.jurisdiction.name), consistent with Texas.
Shared options
These flags work with jurisdictions, texas, and california commands:
Pagination:
| Flag | Description |
|------|-------------|
| --limit <n> | Results per page (max 1000, default 25) |
| --page <n> | Page number (default 1) |
| --all | Fetch all pages (hard cap 10,000 records) |
| --sort <value> | Sort field and direction (e.g. name:asc) |
Output:
| Flag | Description |
|------|-------------|
| --json | Output as JSON |
| --fields <fields> | Comma-separated list of fields for table columns |
| -o, --output <file> | Write to file (.json, .csv, .tsv, .yaml) |
| -f, --force | Overwrite output file without prompting |
Other commands
openzac docs # Open documentation in your browser
openzac agents # Manage agent integrations
openzac agents uninstall # Remove OpenZac from all agentsSecurity
On macOS, API keys are stored in the system keychain. On other platforms, keys are stored at ~/.config/openzac/settings.json with restricted file permissions (0600). Never commit this file to version control.
To report a security vulnerability, please email [email protected].
Contributing
Contributions are welcome. Please open an issue or submit a pull request at github.com/zactax/openzac-cli.
