Skip to content

Commit 1ef47ff

Browse files
committed
refactor: rename to zod-command
1 parent 82e4121 commit 1ef47ff

File tree

6 files changed

+1300
-1937
lines changed

6 files changed

+1300
-1937
lines changed

README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# MyDevTool
1+
# ZodCommand
22

33
A Zod-powered CLI framework for building command-line tools in TypeScript.
44

@@ -17,25 +17,25 @@ A Zod-powered CLI framework for building command-line tools in TypeScript.
1717
## Installation
1818

1919
```bash
20-
npm install mydevtool
20+
npm install zod-command
2121
# or
22-
yarn add mydevtool
22+
yarn add zod-command
2323
# or
24-
pnpm add mydevtool
24+
pnpm add zod-command
2525
```
2626

2727
## Quick Start
2828

2929
### Basic CLI Setup
3030

3131
```typescript
32-
import MyDevTool, { z } from 'mydevtool';
32+
import ZodCommand, { z } from 'zod-command';
3333

34-
const cli = new MyDevTool({
34+
const cli = new ZodCommand({
3535
name: "my-cli",
3636
version: "1.0.0",
3737
description: "My awesome CLI tool",
38-
aliases: ["mycli", "mc"]
38+
aliases: ["zod-command", "zc"]
3939
});
4040

4141
// Add a simple command
@@ -61,9 +61,9 @@ cli.run();
6161
### Advanced Example with Subcommands
6262

6363
```typescript
64-
import MyDevTool, { z } from 'mydevtool';
64+
import ZodCommand, { z } from 'zod-command';
6565

66-
const cli = new MyDevTool({
66+
const cli = new ZodCommand({
6767
name: "devtool",
6868
version: "2.0.0",
6969
description: "A development toolkit"
@@ -109,10 +109,10 @@ cli.run();
109109

110110
## Configuration Management
111111

112-
MyDevTool supports multiple configuration file formats and environment variables:
112+
ZodCommand supports multiple configuration file formats and environment variables:
113113

114114
```typescript
115-
import MyDevTool, { z } from 'mydevtool';
115+
import ZodCommand, { z } from 'zod-command';
116116

117117
const configSchema = z.object({
118118
database: z.object({
@@ -123,7 +123,7 @@ const configSchema = z.object({
123123
debug: z.boolean().default(false)
124124
});
125125

126-
const cli = new MyDevTool({
126+
const cli = new ZodCommand({
127127
name: "my-app"
128128
});
129129

@@ -163,9 +163,9 @@ cli.run();
163163
Add cross-cutting functionality with middleware:
164164

165165
```typescript
166-
import MyDevTool, { z, createMiddleware } from 'mydevtool';
166+
import ZodCommand, { z, createMiddleware } from 'zod-command';
167167

168-
const cli = new MyDevTool({ name: "my-cli" });
168+
const cli = new ZodCommand({ name: "my-cli" });
169169

170170
// Create authentication middleware
171171
const authMiddleware = createMiddleware().define(async ({ parsedInput, ctx, next }) => {
@@ -212,7 +212,7 @@ Extend functionality with plugins:
212212

213213
```typescript
214214
// plugin.ts
215-
import { Plugin, CliBuilder } from 'mydevtool';
215+
import { Plugin, CliBuilder } from 'zod-command';
216216

217217
const myPlugin: Plugin = {
218218
name: "my-plugin",
@@ -234,7 +234,7 @@ export default myPlugin;
234234
```
235235

236236
```json
237-
// mydevtool-plugin.json
237+
// zod-command-plugin.json
238238
{
239239
"name": "my-plugin",
240240
"version": "1.0.0",
@@ -247,7 +247,7 @@ export default myPlugin;
247247
Load plugins:
248248

249249
```typescript
250-
const cli = new MyDevTool({ name: "my-cli" });
250+
const cli = new ZodCommand({ name: "my-cli" });
251251

252252
cli.run({
253253
pluginsDir: "./plugins"
@@ -278,7 +278,7 @@ cli.add({
278278

279279
## Built-in Commands
280280

281-
MyDevTool automatically provides:
281+
ZodCommand automatically provides:
282282

283283
- `help` - Display help information
284284
- `version` - Show version information
@@ -318,10 +318,10 @@ export MYAPP_DEBUG=true
318318

319319
## TypeScript Support
320320

321-
MyDevTool is built with TypeScript and provides full type safety:
321+
ZodCommand is built with TypeScript and provides full type safety:
322322

323323
```typescript
324-
import MyDevTool, { z, CommandHandler } from 'mydevtool';
324+
import ZodCommand, { z, CommandHandler } from 'zod-command';
325325

326326
// Type-safe input/output schemas
327327
const inputSchema = z.object({
@@ -356,7 +356,7 @@ cli.add({
356356

357357
## API Reference
358358

359-
### MyDevTool Class
359+
### ZodCommand Class
360360

361361
- `constructor(metadata?: CliMetadata)` - Create new CLI instance
362362
- `add(config: CommandConfig)` - Add a command

examples/wikipedia.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Use require for wikipedia since there might not be type definitions
22
import wikipedia from "wikipedia";
3-
import { MyDevTool, z } from "../src";
3+
import { ZodCommand, z } from "../src";
44

55
// Create the CLI instance with metadata
6-
const cli = new MyDevTool({
6+
const cli = new ZodCommand({
77
name: "wikipedia-cli",
88
description: "A CLI tool to search and retrieve information from Wikipedia",
99
version: "1.0.0",

package.json

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "mydevtool",
2+
"name": "zod-command",
33
"description": "A Zod-powered CLI framework for building command-line tools in TypeScript.",
44
"version": "0.0.1",
55
"author": "Tim Mikeladze <tim.mikeladze@gmail.com>",
@@ -11,12 +11,12 @@
1111
"typescript",
1212
"command-line",
1313
"tool",
14-
"mydevtool",
14+
"zod-command",
1515
"devtool"
1616
],
1717
"repository": {
1818
"type": "git",
19-
"url": "https://github.com/timmikeladze/mydevtool"
19+
"url": "https://github.com/timmikeladze/zod-command"
2020
},
2121
"scripts": {
2222
"dev": "concurrently \"pnpm build --watch\" \"pnpm test\"",
@@ -73,37 +73,37 @@
7373
"@biomejs/biome": "1.9.4",
7474
"@ryansonshine/commitizen": "4.2.8",
7575
"@ryansonshine/cz-conventional-changelog": "3.3.4",
76-
"@storybook/addon-essentials": "8.6.8",
77-
"@storybook/addon-interactions": "8.6.8",
78-
"@storybook/addon-links": "8.6.8",
76+
"@storybook/addon-essentials": "8.6.14",
77+
"@storybook/addon-interactions": "8.6.14",
78+
"@storybook/addon-links": "9.0.6",
7979
"@storybook/addon-webpack5-compiler-swc": "3.0.0",
80-
"@storybook/blocks": "8.6.8",
81-
"@storybook/react": "8.6.8",
82-
"@storybook/react-webpack5": "8.6.8",
83-
"@storybook/test": "8.6.8",
80+
"@storybook/blocks": "8.6.14",
81+
"@storybook/react": "9.0.6",
82+
"@storybook/react-webpack5": "9.0.6",
83+
"@storybook/test": "8.6.14",
8484
"@testing-library/jest-dom": "6.6.3",
85-
"@testing-library/react": "16.2.0",
85+
"@testing-library/react": "16.3.0",
8686
"@types/js-yaml": "4.0.9",
87-
"@types/node": "22.13.11",
88-
"@types/react": "19.0.12",
89-
"@types/react-dom": "19.0.4",
90-
"@types/react-test-renderer": "19.0.0",
91-
"@vitest/coverage-v8": "3.0.9",
87+
"@types/node": "24.0.0",
88+
"@types/react": "19.1.7",
89+
"@types/react-dom": "19.1.6",
90+
"@types/react-test-renderer": "19.1.0",
91+
"@vitest/coverage-v8": "3.2.3",
9292
"concurrently": "9.1.2",
93-
"jsdom": "26.0.0",
94-
"lefthook": "1.11.3",
93+
"jsdom": "26.1.0",
94+
"lefthook": "1.11.13",
9595
"prop-types": "15.8.1",
96-
"react": "19.0.0",
97-
"react-dom": "19.0.0",
98-
"react-test-renderer": "19.0.0",
99-
"release-it": "18.1.2",
100-
"storybook": "8.6.8",
96+
"react": "19.1.0",
97+
"react-dom": "19.1.0",
98+
"react-test-renderer": "19.1.0",
99+
"release-it": "19.0.3",
100+
"storybook": "9.0.6",
101101
"ts-node": "10.9.2",
102102
"tsconfig-paths": "4.2.0",
103-
"tsup": "8.4.0",
104-
"tsx": "4.19.3",
105-
"typescript": "5.8.2",
106-
"vitest": "3.0.9",
103+
"tsup": "8.5.0",
104+
"tsx": "4.19.4",
105+
"typescript": "5.8.3",
106+
"vitest": "3.2.3",
107107
"wikipedia": "2.1.2"
108108
},
109109
"peerDependencies": {
@@ -122,8 +122,8 @@
122122
]
123123
},
124124
"dependencies": {
125-
"chalk": "5.4.1",
126-
"js-yaml": "4.1.0",
127-
"zod": "3.24.2"
125+
"chalk": "^5.4.1",
126+
"js-yaml": "^4.1.0",
127+
"zod": "^3.25.57"
128128
}
129129
}

0 commit comments

Comments
 (0)