https://github.com/joggrdocs/kidd
An opinionated CLI framework for Node.js. Convention over configuration, end-to-end type safety.
https://github.com/joggrdocs/kidd
Last synced: 2 months ago
JSON representation
An opinionated CLI framework for Node.js. Convention over configuration, end-to-end type safety.
- Host: GitHub
- URL: https://github.com/joggrdocs/kidd
- Owner: joggrdocs
- License: mit
- Created: 2026-02-28T03:44:53.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-03-04T00:26:29.000Z (4 months ago)
- Last Synced: 2026-03-04T03:40:13.278Z (4 months ago)
- Language: TypeScript
- Homepage:
- Size: 461 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
README
An opinionated CLI framework for Node.js. Convention over configuration, end-to-end type safety.
๐ Documentation ย ย ย ยทย ย ย ๐ Issues
## Features
- ๐งฐ **Batteries included** โ Config, auth, prompts, logging, output, and middleware built in
- ๐ **File-system autoloading** โ Drop a file in `commands/`, get a command
- โก **Build and compile** โ Bundle your command tree or produce cross-platform standalone binaries
- ๐ **Two files to a full CLI** โ Define a schema, write a handler, done
- ๐ ๏ธ **Developer experience** โ Scaffolding, hot reload, route inspection, and diagnostics out of the box
## Install
```bash
npm install @kidd-cli/core
```
## Usage
### Define your CLI
```ts
// index.ts
import { cli } from '@kidd-cli/core'
import { z } from 'zod'
await cli({
name: 'deploy',
version: '0.1.0',
config: {
schema: z.object({
registry: z.string().url(),
region: z.enum(['us-east-1', 'eu-west-1']),
}),
},
})
```
### Add a command
```ts
// commands/deploy.ts
import { command } from '@kidd-cli/core'
import { z } from 'zod'
export default command({
description: 'Deploy to the configured registry',
args: z.object({
tag: z.string().describe('Image tag to deploy'),
dry: z.boolean().default(false).describe('Dry run'),
}),
handler: async (ctx) => {
ctx.log.info(`Deploying ${ctx.args.tag} to ${ctx.config.region}`)
},
})
```
### Add a screen
```tsx
// commands/dashboard.tsx
import { screen, Box, Text, useScreenContext } from '@kidd-cli/core/ui'
import { z } from 'zod'
function Dashboard({ env }: { env: string }) {
const ctx = useScreenContext()
return (
Dashboard โ {env}
Region: {ctx.config.region}
)
}
export default screen({
description: 'Launch an interactive dashboard',
options: z.object({
env: z.string().default('staging').describe('Target environment'),
}),
render: Dashboard,
})
```
### Run it
```bash
kidd dev -- deploy --tag v1.2.3 # dev mode
kidd build # bundle
kidd compile # standalone binary
```
## License
[MIT](LICENSE)