cligentic
The catalog

All blocks, every cluster.

16 blocks shipped, 4 clusters active. Each block is a single file you copy into your CLI. No npm dep on cligentic, no framework, no lock-in.

CLUSTER 1 · 4 blocks

Cross-OS without tears

Open URLs, copy to clipboard, fire notifications. macOS, Linux, Windows, WSL, SSH, CI. Never throws.

CLUSTER 3 · 2 blocks

Agent-ready output

`--json` dual mode. Next-step hints on stderr. The loop that lets agents operate CLIs.

CLUSTER 2 · 9 blocks

State done right

XDG paths. Atomic writes. Append-only audit logs. Config with profiles. Session tokens.

xdg-paths

XDG Base Directory Spec resolver with macOS (`~/Library`) and Windows (`%APPDATA%`) fallbacks. Gives your CLI canonical `config`/`state`/`cache`/`audit`/`sessions` paths. `APP_HOME` env override for testing.

zero deps
atomic-write

Write files atomically: temp file, `fsync`, rename. Prevents corruption from crashes or concurrent CLI processes. Windows-aware (unlink before rename). Includes `atomicWriteJson` convenience.

zero deps
audit-log

Append-only JSONL audit trail with per-day rotation. Every action gets a timestamped record. Mode `0o600`. Includes `tailAudit` for reading recent records. Battle-tested in hapi-cli and sunat-cli.

zero deps
banner

Gradient ASCII wordmark for your CLI. Shown on bare invoke or `--help`. Vertical gradient between two hex colors. Respects `NO_COLOR`. Includes minimal block-letter renderer.

zero depschained
config

Profile-aware JSON config loader. Reads from the app's config directory with multi-profile support (`--profile production`). Merge precedence: defaults < profile overrides.

zero depschained
session

Auth token persistence. Load on boot, save after login, clear on logout, check expiry. Atomic writes, `0o600` permissions. The companion of every `login` command.

zero depschained
error-map

Typed `AppError` class with `code`, `name`, `human` message, and `hint`. Maps upstream API errors to actionable messages. Agents read the `hint` field to self-correct.

zero deps
global-flags

Standard global flags for agent-first CLIs: `--json`, `--dry-run`, `--profile`, `--no-input`, `--quiet`, `--verbose`. Normalizes raw argv into typed `GlobalFlags`. Includes flag definitions for any parser.

zero deps
telemetry

Anonymous usage tracking. Opt-out via `CLI_NO_TELEMETRY=1` or `DO_NOT_TRACK=1`. Local JSONL logging + optional remote POST. Never throws, never blocks. Disabled in CI automatically.

zero deps
CLUSTER 4 · 1 block

Safety flagship

Killswitches. Trust ladders and intent tokens in v0.1. Battle-tested in hapi-cli.