tekir
All Packages
Utilitiesv0.1.4

@tekir/commands

CLI framework with args, flags, prompts, and terminal UI.

Installation

$bun add @tekir/commands

Features

  • BaseCommand class with typed args and flags
  • Interactive prompts (input, confirm, select)
  • Rich terminal UI: tables, stickers, tasks, colors
  • Kernel for registering and dispatching commands
  • Built-in help and argument parsing

Quick Example

TypeScript
import { BaseCommand } from '@tekir/commands'

export class Greet extends BaseCommand {
  static commandName = 'greet'
  static args = [{ name: 'name', required: true }]

  async run() {
    this.logger.info(`Hello, ${this.args.name}!`)
  }
}

Changelog

v0.1.4LatestSeptember 16, 2026
  • Published output now uses the shared Node-targeted ESM bundle pipeline with external dependencies and generated TypeScript declarations, while Bun consumers keep the native source export.
v0.1.3July 23, 2026
  • Package metadata now follows the shared compatible 0.1.x dependency range used by this coordinated Tekir release.
v0.1.2July 16, 2026
  • Command discovery is confined against escaping symlinks, prompt retries create clean readline sessions, and command failures no longer leave dead control flow.
v0.1.1June 13, 2026
  • Command discovery now resolves the target directory to an absolute base and verifies every file stays under it, so a .. segment or symlink cannot load code from outside the intended folder. Import failures are surfaced with console.error instead of being swallowed.
  • Parsed flags and args are built on null-prototype objects and reject __proto__/constructor/prototype definition keys, closing a prototype pollution vector.
  • Negative numbers like -5 and -0.5 are now accepted as flag values; real flags are still rejected. An invalid choice prompt answer re-prompts with a clear message instead of silently falling back to the first option.
  • Ctrl+C in a prompt now restores raw mode and exits with code 130, and the secure prompt no longer double-consumes stdin.
  • Found and fixed with Fable.
v0.1.0April 1, 2026
  • Initial release

Other Utilities packages