Skip to content

Releases: Moikapy/kapy

kapy 0.4.0

19 May 16:56

Choose a tag to compare

What's Changed

  • feat: v0.4.0 — positional args, type coercion, --version, required arg validation, bug fixes
  • chore: bump to 0.3.1 for polish release
  • chore: polish - add spawn tests, error classification, JSDoc
  • docs: add codebase wiki section to AGENTS.md
  • fix: type/slug validation bugs in command names, hooks, and extension API
  • fix: QA review fixes for @moikapy/kapy
  • feat: add @moikapy/kapy-pub — npm package publish CLI
  • fix: extension loader resolves from kapy's own node_modules first

Packages

  • @moikapy/kapy@0.4.0 — CLI framework
  • @moikapy/kapy-components@0.4.0 — TUI components

Install

bun add @moikapy/kapy
# or globally
bun add -g @moikapy/kapy

Quick Start

npx @moikapy/kapy init my-cli
cd my-cli
bun dev

kapy 0.3.0

28 Apr 22:47

Choose a tag to compare

What's Changed

  • v0.3.0: strip TUI and AI from core — clean CLI framework
  • fix: add spacing between KAPY logo and input on home screen
  • fix: add bottom padding to welcome page input box
  • refactor: remove redundant model indicator under prompt
  • feat: ASCII art logo on home screen using OpenTUI ascii_font
  • fix: clean terminal exit — destroy renderer before process.exit
  • feat: distinct tool call/result styling in TUI
  • fix: Ctrl+C/D exit via global useKeyboard handler
  • feat: tool calling in TUI + OllamaAdapter reasoning/tool_call support
  • feat: chat-backend module, /tools command, tool count in sidebar
  • feat: 5 built-in tools + /help command + reasoning display
  • docs: ADR-014 + systematic-debugging skill
  • feat(tui): streaming indicator, auto-scroll, model switching, AGENTS.md
  • feat(tui): streaming Ollama chat with message display
  • docs: ADR-014 — For each={signal()} causes blank TUI render
  • chore: install systematic-debugging skill from obra/superpowers
  • feat(tui): proven working base + WIP full chat TUI
  • chore: clean up test TUI files
  • feat(tui): proven working TUI foundation with route, sidebar, prompt
  • fix(tui): working TUI with keyboard input, exit, and prompt
  • refactor(tui): restore bare-minimum working TUI, add separate minimal.tsx
  • feat(tui): use glm-5.1:cloud as default model + fix Ctrl+C exit
  • fix(tui): Ctrl+C exits via global useKeyboard handler + SIGINT signal
  • fix(tui): register SIGINT/SIGTERM handlers — Ctrl+C now exits the TUI
  • fix(tui): Enter submits, Shift+Enter newlines — add keyBindings to textarea
  • fix(tui): explicitly focus textarea on mount — 'focused' prop alone doesn't auto-focus
  • fix(tui): keyboard input works — add focused prop to textarea + autoFocus renderer
  • fix(tui): Ctrl+C exits app — OpenCode pattern
  • refactor(tui): simplify logo to KAPY wordmark + tagline
  • refactor(tui): spec-aligned prompt, ASCII capybara logo, clean exit
  • fix(tui): prevent borked tmux — SIGHUP handler + Promise-based exit + real textarea prompt
  • fix(tui): proper terminal cleanup on exit — prevent borked tmux
  • feat(ai): MemoryStore — key-value persistence for project and global scopes
  • feat(ai): ContextTracker — token estimation, auto-compaction, context usage
  • feat(ai): ChatSession — wire AgentLoop to TUI Session route
  • feat(ai): Phase 8 — Wire it all together: AgentLoop + ADR-007 + Slash Commands
  • feat(tui): Phase 6 — OpenCode-inspired TUI with Solid + @opentui/solid
  • feat: AI harness Phases 2-5 — providers, permissions, sessions, agent loop
  • feat: AI harness Phase 1 — tool system, event hooks, schema serialization

Packages

  • @moikapy/kapy@0.3.0 — CLI framework
  • @moikapy/kapy-components@0.3.0 — TUI components

Install

bun add @moikapy/kapy
# or globally
bun add -g @moikapy/kapy

Quick Start

npx @moikapy/kapy init my-cli
cd my-cli
bun dev

v0.2.1 — Homebrew Validator

13 Apr 04:46

Choose a tag to compare

🛡️ Homebrew Validator

No external dependencies. Runtime validation that integrates with kapy's existing ConfigField/ConfigSchema types.

New Functions

validate(schema, data, namespace) — Core validation

  • Type checking (string, number, boolean, array, object)
  • Required field enforcement
  • Enum validation
  • Arrays vs objects distinguished
  • Collects all errors, not just the first
  • Namespaced error messages: deploy.region: expected string, got number

validateProjectConfig(config) — Validate kapy.config.ts

  • Checks name, extensions, envPrefix types
  • Validates that extensions array items are strings
  • Called automatically by config loader on load

validateExtensionMeta(meta) — Validate extension metadata

  • Checks name and version are required strings
  • Validates dependencies and permissions are string arrays
  • Called automatically by extension loader on registration

describeSchema(schema) — Schema introspection for agents

  • Returns structured field descriptions (type, required, description, default, enum)
  • Used by kapy inspect --json to expose config schemas

formatErrors(errors) — Human-readable error formatting

  • Single error: Configuration error: deploy.region: required but missing
  • Multiple errors: bulleted list

What Changed

  • Config loader warns on invalid kapy.config.ts
  • Extension loader warns on invalid extension metadata
  • kapy inspect --json now includes configSchemas with describeSchema() output
  • kapy inspect (text mode) shows config schema field details

Why Not Zod?

Kapy's schemas are flat key-value stores with 5 types. A 150-line validator that integrates directly with existing types beats a 13KB dependency that introduces a parallel schema system.

20 new tests for the validator. 153 total tests passing.

v0.2.0 — Process-Aware CommandContext

13 Apr 03:45

Choose a tag to compare

🚀 Process-Aware CommandContext

This release adds subprocess management, TTY awareness, and cleanup lifecycle to CommandContext — unlocking extensions like kapy-tmux that need to spawn and manage external processes.

New Features

ctx.spawn(cmd, opts?) — Blessed subprocess helper

  • tty: true — pass through stdin/stdout/stderr for interactive processes (tmux, shells)
  • stream: true — real-time output instead of buffering
  • env / cwd — custom environment and working directory
  • abortOnError — auto-kill process on ctx.abort(), registers teardown
  • suppressOutput — control stdout/stderr in --json mode
  • Returns { exitCode, stdout, stderr, aborted }

ctx.isInteractive — Computed getter

  • !noInput && !json && !!process.stdout.isTTY
  • Replaces scattered !ctx.noInput checks

ctx.exitCode — Writable exit code

  • User-set takes priority over abort code
  • CLI runner propagates via process.exit()

ctx.teardown(fn) — Cleanup registration

  • LIFO order (last registered, first run)
  • Async-safe, error-resilient
  • runTeardowns() called by CLI runner after command execution (success and error)

What This Unlocks

Extensions can now:

  • Spawn interactive processes with TTY passthrough (tmux attach, bash)
  • Clean up resources on abort or exit
  • Propagate subprocess exit codes
  • Gate commands behind ctx.isInteractive

Full Changelog

  • CommandContext.spawn() — Bun.spawn wrapper with TTY, abort, streaming support
  • CommandContext.isInteractive — computed TTY + mode check
  • CommandContext.exitCode — priority-based exit code (user > abort > 0)
  • CommandContext.teardown() — LIFO async cleanup callbacks
  • CLI runner: teardowns on success/error, exit code propagation, AbortError handling
  • ADR-006: Process-Aware CommandContext

Tests

20 new unit tests. All 123 passing.

kapy 0.1.3

13 Apr 02:43

Choose a tag to compare

What's Changed

🐛 Bug Fixes

  • Extensions from project config now loadkapy.config.ts extensions array was silently ignored at runtime. loadConfig() now returns projectConfig and runCLI() uses it when the builder didn't specify one (#3)
  • Extensions from global config now load~/.kapy/config.json extensions were parsed but never passed to the extension loader. _extensions array is now built from global config entries (#4)
  • kapy update uses shared PM detection — replaced hardcoded bun add -g with auto-detected package manager
  • kapy remove actually uninstalls packages — was only removing from manifest, now calls the package manager to uninstall globally
  • kapy upgrade uses @moikapy/kapy — bare kapy caused 404 on npm, now uses the scoped package name
  • Type declarations fixed_exitCode and _spinner declared as private class properties in CommandContext

🧪 Tests

  • 16 new tests for package-manager detection and upgrade command context (87 → 103)

📚 Docs

  • Package-level README for @moikapy/kapy
  • Monorepo README updated with new tagline and expanded sections

Full Changelog: v0.1.2...v0.1.3

kapy 0.1.2

13 Apr 01:09

Choose a tag to compare

What's Changed

🏷️ Repositioned tagline

  • Replaced "the pi.dev for CLI" with "the agent-first CLI framework" across CLI banner, help output, and TUI home screen

🔧 Package manager auto-detection

  • kapy upgrade now auto-detects bun, npm, yarn, or pnpm instead of hardcoding bun→npm fallback
  • kapy install uses the same PM auto-detection for npm packages
  • New --pm flag on upgrade: kapy upgrade --pm npm to force a specific package manager
  • Extracted shared package-managers.ts utility

🐛 Bug fixes

  • Fixed @moikapy/kapy package name in upgrade (was using bare kapy, causing 404 errors)
  • Declared _exitCode and _spinner as private class properties in CommandContext (tsc build fix)
  • Added VCS ignore config to biome.json so dist/ isn't linted

Full Changelog: v0.1.1...v0.1.2

kapy 0.1.1

12 Apr 23:44

Choose a tag to compare

What's Changed

  • fix: replace workspace:* with real version for npm publish
  • feat: merge create-kapy into kapy init, drop separate package

Packages

  • @moikapy/kapy@0.1.1 — CLI framework
  • @moikapy/kapy-components@0.1.1 — TUI components

Install

bun add @moikapy/kapy
# or globally
bun add -g @moikapy/kapy

Quick Start

npx @moikapy/kapy init my-cli
cd my-cli
bun dev

kapy 0.1.0

12 Apr 22:56

Choose a tag to compare

What's Changed

  • fix: lint, biome formatting, context.ts private field declarations
  • chore: npm publishing readiness — metadata, type declarations, build order, CHANGELOG
  • feat: close all spec gaps — lifecycle hooks, subpath exports, TUI screens, declarative components, universal flags, checksum, agentHints, help command, cache dir
  • feat: release workflow, OpenTUI integration, review fixes, and expanded tests
  • feat: integration test suite + precommit hooks 🐹
  • chore: biome lint/format fixes, migrate to biome 2.4 schema
  • feat: capybara mascot branding 🐹
  • feat: implement all TODOs — working builtins, config loader, extension loader, TUI, tests
  • feat: scaffold monorepo — packages/kapy, kapy-components, create-kapy
  • Initial commit: kapy extensible CLI framework spec and README

Packages

  • kapy@0.1.0 — CLI framework
  • kapy-components@0.1.0 — TUI components
  • create-kapy@0.1.0 — Project scaffolding

Install

bun add -g kapy
# or
npm install -g kapy

Quick Start

bunx create-kapy my-cli
cd my-cli
bun dev