git clone <repo-url>
cd karya
bun install
bun link # Makes `karya` available as a global commandRequires Bun v1.2.5+. Node.js 22+ works as a fallback
(npm install + bun run dev:node), but bun link requires Bun.
karya <command> # Run via global link
bun run dev -- <command> # Run without linking
bun run test # Run unit tests
bun run test:e2e # Run end-to-end tests
bun run lint # Type-check with tsc
bun run build # Compile to dist/See AGENTS.md for full architecture, source layout, and coding patterns.
- Create a feature branch from
main - Make changes following existing patterns
- Ensure
bun run lintandbun run testpass - Submit a pull request
Prepare a release bump on a feature branch:
bun run release -- patchThe release script runs local validation, bumps the version, moves
CHANGELOG.md entries out of [Unreleased], smoke-tests the packaged tarball,
and creates a chore: prepare release vX.Y.Z commit.
After that commit is merged to main, GitHub Actions detects whether the
current package.json version already has a matching tag and GitHub Release. If
not, it runs the release pipeline automatically: lint, tests, npm pack,
smoke-test the installed tarball, create the tag if needed, publish the GitHub
Release, optionally publish to npm when NPM_TOKEN and the NPM_PUBLISH_ENABLED
repository variable are configured, and notify
ealt/homebrew-tap after the release is published.
- TypeScript strict mode
- ES2022 target with NodeNext module resolution
- All imports use
.jsextensions - Zod schemas in
src/core/schema.tsare the source of truth for types - One file per CLI command in
src/cli/commands/ - Tests mirror the
src/directory structure undertests/
- Unit tests:
tests/core/— test domain logic in isolation - E2E tests:
tests/e2e/— test CLI commands end-to-end - Test runner: Vitest (not Bun's built-in runner)
To run a specific test file:
bun run test -- tests/core/schema.test.ts