Releases: Moikapy/kapy
kapy 0.4.0
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/kapyQuick Start
npx @moikapy/kapy init my-cli
cd my-cli
bun devkapy 0.3.0
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/kapyQuick Start
npx @moikapy/kapy init my-cli
cd my-cli
bun devv0.2.1 — Homebrew Validator
🛡️ 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,envPrefixtypes - Validates that
extensionsarray items are strings - Called automatically by config loader on load
validateExtensionMeta(meta) — Validate extension metadata
- Checks
nameandversionare required strings - Validates
dependenciesandpermissionsare 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 --jsonto 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 --jsonnow includesconfigSchemaswithdescribeSchema()outputkapy 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
🚀 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 bufferingenv/cwd— custom environment and working directoryabortOnError— auto-kill process onctx.abort(), registers teardownsuppressOutput— control stdout/stderr in--jsonmode- Returns
{ exitCode, stdout, stderr, aborted }
ctx.isInteractive — Computed getter
!noInput && !json && !!process.stdout.isTTY- Replaces scattered
!ctx.noInputchecks
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 supportCommandContext.isInteractive— computed TTY + mode checkCommandContext.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
What's Changed
🐛 Bug Fixes
- Extensions from project config now load —
kapy.config.tsextensions array was silently ignored at runtime.loadConfig()now returnsprojectConfigandrunCLI()uses it when the builder didn't specify one (#3) - Extensions from global config now load —
~/.kapy/config.jsonextensions were parsed but never passed to the extension loader._extensionsarray is now built from global config entries (#4) kapy updateuses shared PM detection — replaced hardcodedbun add -gwith auto-detected package managerkapy removeactually uninstalls packages — was only removing from manifest, now calls the package manager to uninstall globallykapy upgradeuses@moikapy/kapy— barekapycaused 404 on npm, now uses the scoped package name- Type declarations fixed —
_exitCodeand_spinnerdeclared as private class properties inCommandContext
🧪 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
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 upgradenow auto-detects bun, npm, yarn, or pnpm instead of hardcoding bun→npm fallbackkapy installuses the same PM auto-detection for npm packages- New
--pmflag on upgrade:kapy upgrade --pm npmto force a specific package manager - Extracted shared
package-managers.tsutility
🐛 Bug fixes
- Fixed
@moikapy/kapypackage name in upgrade (was using barekapy, causing 404 errors) - Declared
_exitCodeand_spinneras private class properties inCommandContext(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
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/kapyQuick Start
npx @moikapy/kapy init my-cli
cd my-cli
bun devkapy 0.1.0
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 frameworkkapy-components@0.1.0— TUI componentscreate-kapy@0.1.0— Project scaffolding
Install
bun add -g kapy
# or
npm install -g kapyQuick Start
bunx create-kapy my-cli
cd my-cli
bun dev