sh4dcnv2 · atlas
← libraries

@cligentic

Copy-paste TypeScript primitives for agent-first CLIs: trust ladders, killswitches, JSON mode, audit logs, and cross-platform utilities.

24 components react shadcn-cli MIT

Install this registry

shadcn (npm) npx shadcn@latest add https://cligentic.railly.dev/r/registry.json
pnpm pnpm dlx shadcn@latest add https://cligentic.railly.dev/r/registry.json
bun bunx shadcn@latest add https://cligentic.railly.dev/r/registry.json
fetch registry curl -s https://cligentic.railly.dev/r/registry.json

Components

24 total
detect file

Environment detection helpers: `isWsl`, `isCi`, `isHeadlessLinux`, `hasCommand`, `detectMode`, `shouldColor`. Shared across platform and agent blocks. Auto-ins…

npx shadcn@latest add https://cligentic.railly.dev/r/detect.json
open-url file

Open a URL in the user's default browser across macOS, Linux, Windows, WSL, SSH, and headless CI. Respects `BROWSER` env var. Fallback chain with manual print.…

npx shadcn@latest add https://cligentic.railly.dev/r/open-url.json
json-mode file

Dual-rendering output for CLIs serving humans and agents. Auto-detects TTY vs piped, enforces `stdout`/`stderr` discipline, respects `NO_COLOR`. Never calls `p…

npx shadcn@latest add https://cligentic.railly.dev/r/json-mode.json
next-steps file

Post-command guidance for agents and humans. Emit structured `next-step` hints to `stderr` as NDJSON for agents, formatted block for humans. Chains with `json-…

npx shadcn@latest add https://cligentic.railly.dev/r/next-steps.json
trust-ladder file

Approval gate and structured preview renderer for T2/T3 CLI actions. Handles `--yes`, T3 `--confirm`, JSON/non-TTY refusal, and machine-readable AppError failu…

npx shadcn@latest add https://cligentic.railly.dev/r/trust-ladder.json
copy-clipboard file

Copy text to the system clipboard across macOS, Linux (X11 + Wayland), Windows, and WSL. Detects `pbcopy`, `xclip`, `xsel`, `wl-copy`, `clip.exe` automatically…

npx shadcn@latest add https://cligentic.railly.dev/r/copy-clipboard.json
notify-os file

Fire a system notification across macOS (`osascript`), Linux (`notify-send`), Windows and WSL (PowerShell). Silently skips in CI. Typed verdict, never throws.

npx shadcn@latest add https://cligentic.railly.dev/r/notify-os.json
xdg-paths file

XDG Base Directory Spec resolver with macOS (`~/Library`) and Windows (`%APPDATA%`) fallbacks. Gives your CLI canonical `config`/`state`/`cache`/`audit`/`sessi…

npx shadcn@latest add https://cligentic.railly.dev/r/xdg-paths.json
atomic-write file

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

npx shadcn@latest add https://cligentic.railly.dev/r/atomic-write.json
audit-log file

Append-only JSONL audit trail with per-day rotation. Every action gets a timestamped record. Mode `0o600`. Includes `tailAudit` for reading recent records. Bat…

npx shadcn@latest add https://cligentic.railly.dev/r/audit-log.json
audit-lifecycle file

Two-phase append-only audit lifecycle for dangerous or retryable operations: `beginAudit()` writes pending, then `complete()` or `fail()` appends the final rec…

npx shadcn@latest add https://cligentic.railly.dev/r/audit-lifecycle.json
banner file

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

npx shadcn@latest add https://cligentic.railly.dev/r/banner.json
config file

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

npx shadcn@latest add https://cligentic.railly.dev/r/config.json
session file

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

npx shadcn@latest add https://cligentic.railly.dev/r/session.json
error-map file

Typed `AppError` class with `code`, `name`, `human` message, and `hint`. Maps upstream API errors to actionable messages. `fromHttp()` maps status codes direct…

npx shadcn@latest add https://cligentic.railly.dev/r/error-map.json
argv file

Minimal POSIX argv parser for zero-framework CLIs. Zero dependencies. Handles `--flag`, `--flag value`, `--flag=value`, `-f`, combined short flags, positional …

npx shadcn@latest add https://cligentic.railly.dev/r/argv.json
global-flags file

Standard global flags for agent-first CLIs: `--json`, `--dry-run`, `--profile`, `--no-input`, `--quiet`, `--verbose`. Normalizes raw argv into typed `GlobalFla…

npx shadcn@latest add https://cligentic.railly.dev/r/global-flags.json
telemetry file

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. Disable…

npx shadcn@latest add https://cligentic.railly.dev/r/telemetry.json
doctor file

Health-check pattern for CLI `doctor` commands. Run named checks sequentially with per-check error isolation. Dual output via `json-mode`: structured JSON for …

npx shadcn@latest add https://cligentic.railly.dev/r/doctor.json
killswitch file

Binary safety gate. If `~/.app/KILLSWITCH` exists, all write operations refuse. File exists = stopped. File gone = resumed. One `existsSync` call. Battle-teste…

npx shadcn@latest add https://cligentic.railly.dev/r/killswitch.json
api-key-wizard file

Interactive first-run wizard for API-key-authenticated CLIs. Masked prompt, live validation against your API, then save via your callback. Generic over validat…

npx shadcn@latest add https://cligentic.railly.dev/r/api-key-wizard.json
skill-installer-prompt file

Post-init hook that offers to install a companion agent skill (Claude Code / Cursor / MCP-aware). Clack confirm plus a subprocess spawn with inherited stdio. R…

npx shadcn@latest add https://cligentic.railly.dev/r/skill-installer-prompt.json
prompt-secret file

Read a secret from the TTY without echoing it. Raw mode, one dot per keystroke, handles backspace and Ctrl-C. Returns null when there is no TTY so the caller c…

npx shadcn@latest add https://cligentic.railly.dev/r/prompt-secret.json
style file

Terminal styling that respects NO_COLOR and non-TTY in one place, plus the width helpers a table needs once cells contain escape codes: visibleWidth, padVisibl…

npx shadcn@latest add https://cligentic.railly.dev/r/style.json