zapdev 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -19
- package/dist/cli.js +2786 -0
- package/dist/index.js +4 -3762
- package/package.json +12 -13
package/README.md
CHANGED
|
@@ -1,29 +1,25 @@
|
|
|
1
1
|
# zapdev
|
|
2
2
|
|
|
3
|
-
**zapdev** — a lightweight TypeScript
|
|
3
|
+
**zapdev** — a lightweight TypeScript CLI that makes small, repetitive git chores fast and precise.
|
|
4
4
|
|
|
5
5
|
## Requirements
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Node.js >= 20 and git.
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
|
|
12
|
+
npm install -g zapdev # installs the `zapdev` command globally
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
> If `zapdev: command not found`, Bun's global bin is not on your `PATH`. Add it (zsh):
|
|
16
|
-
>
|
|
17
|
-
> ```sh
|
|
18
|
-
> echo 'export PATH="$HOME/.bun/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
|
|
19
|
-
> ```
|
|
20
|
-
|
|
21
15
|
Or run it once without installing:
|
|
22
16
|
|
|
23
17
|
```bash
|
|
24
|
-
|
|
18
|
+
npx zapdev commit
|
|
25
19
|
```
|
|
26
20
|
|
|
21
|
+
> For daily use, prefer the global install: `npx` adds resolution overhead on every run.
|
|
22
|
+
|
|
27
23
|
## Usage
|
|
28
24
|
|
|
29
25
|
Run `zapdev` with no command to pick one from an interactive menu (falls back to usage output without a TTY).
|
|
@@ -78,20 +74,21 @@ Deletion uses `git branch -D` (force). Without a TTY (or with `--yes`), every no
|
|
|
78
74
|
From a clone:
|
|
79
75
|
|
|
80
76
|
```bash
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
77
|
+
npm install
|
|
78
|
+
npm run zapdev # build then run the CLI in dev
|
|
79
|
+
npm run typecheck # tsc --noEmit
|
|
80
|
+
npm run lint # eslint
|
|
81
|
+
npm run test # vitest
|
|
82
|
+
npm run build # bundle to dist/ (esbuild)
|
|
87
83
|
```
|
|
88
84
|
|
|
89
|
-
`
|
|
85
|
+
`npm link` (after `npm run build`) exposes the local `zapdev` binary on your PATH.
|
|
90
86
|
|
|
91
87
|
## Project structure
|
|
92
88
|
|
|
93
|
-
- `src/index.ts` —
|
|
89
|
+
- `src/index.ts` — bin launcher; enables the V8 compile cache, then loads `cli.js`.
|
|
90
|
+
- `src/cli.ts` — CLI entry (Citty); registers subcommands, defaults to `commit`.
|
|
94
91
|
- `src/commands/` — one file per command.
|
|
95
92
|
- `src/lib/` — pure logic (`config`, `commit-message`, `branches`, unit-tested) and side effects (`git`, `ollama`); shared helpers (`errors`).
|
|
96
|
-
- `src/prompts/` — LLM prompts as `.md` files, imported as text (`
|
|
93
|
+
- `src/prompts/` — LLM prompts as `.md` files, imported as text (esbuild `.md` text loader) and inlined into the bundle at build time.
|
|
97
94
|
- `src/types/` — shared type declarations (one file per domain) and ambient module declarations.
|