Hexbus

From inthhq/inrepo · View interactive version

Hexbus is an AI agent skill from the GitHub repository inthhq/inrepo. Use when creating, improving, or reviewing high-quality CLIs with hexbus, including command design, argument parsing, CliContext services, help/version output, telemetry, errors, spinners, testing, and package manager/framework detection.

How to use this skill

Skill file

Hexbus

Use this skill to create good CLIs with hexbus, the opinionated TypeScript ESM CLI framework from https://github.com/inthhq/hexbus.

Start Here

Consumer Pattern

Build CLIs around a small command table and one resolved context:

import {
  createCliContext,
  displayIntro,
  globalFlags,
  isVersionRequest,
  printVersionInfo,
  showHelpMenu,
  startBackgroundUpdateCheck,
} from "hexbus";
import type { CliCommand } from "hexbus";
  1. Define CliCommand[] with stable name, label, hint, description, and an async action(context).
  2. Handle -v / --version early with isVersionRequest and printVersionInfo.
  3. Call createCliContext({ rawArgs, commands, appName, configName }) once.
  4. Start update checks with startBackgroundUpdateCheck during normal command execution.
  5. Render --help with showHelpMenu(context, appInfo, commands, globalFlags).
  6. Route to the matched command via context.commandName; show help for unknown commands.

Context Services

Prefer existing CliContext services over ad hoc utilities:

Extend CliContext<TPackage> when a product CLI injects app-specific services, but keep command implementations typed against the smallest context they need.

Errors And UX

Editing Hexbus

Bundled Resources

Commands

When working in an upstream hexbus checkout, use Bun from that repo root:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.