zapdev 0.3.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/LICENSE +21 -0
- package/README.md +65 -0
- package/dist/index.js +3355 -0
- package/package.json +61 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Matthieu Vagnon
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# zapdev
|
|
2
|
+
|
|
3
|
+
**zapdev** — a lightweight TypeScript/Bun CLI that makes small, repetitive git chores fast and precise.
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
zapdev runs on the [Bun](https://bun.sh) runtime. Install Bun first.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
bun add -g zapdev # installs the `zapdev` command globally
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Or run it once without installing:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
bunx zapdev commit
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
### `zapdev commit`
|
|
24
|
+
|
|
25
|
+
Stages all changes (`git add -A`), asks an Ollama model for a one-line Conventional Commits message, then lets you commit, edit or cancel, and optionally push.
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
zapdev commit # `zapdev` alone works too — commit is the default command
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
| Flag | Description |
|
|
32
|
+
| --- | --- |
|
|
33
|
+
| `-m, --model <model>` | Override the Ollama model |
|
|
34
|
+
| `-p, --push` | Push after committing without asking |
|
|
35
|
+
| `-y, --yes` | Skip prompts and commit directly |
|
|
36
|
+
|
|
37
|
+
Without a TTY (piped / CI), it commits automatically and only pushes when `--push` is set.
|
|
38
|
+
|
|
39
|
+
## Configuration
|
|
40
|
+
|
|
41
|
+
| Variable | Default | Description |
|
|
42
|
+
| --- | --- | --- |
|
|
43
|
+
| `OLLAMA_URL` | `http://localhost:11434` | Ollama base URL |
|
|
44
|
+
| `OLLAMA_MODEL` | `deepseek-v4-flash:cloud` | Model used to generate messages |
|
|
45
|
+
|
|
46
|
+
## Development
|
|
47
|
+
|
|
48
|
+
From a clone:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
bun install
|
|
52
|
+
bun run zapdev # run the CLI in dev
|
|
53
|
+
bun run typecheck # tsc --noEmit
|
|
54
|
+
bun run lint # eslint
|
|
55
|
+
bun run test # vitest
|
|
56
|
+
bun run build # bundle to dist/
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
`bun link` (after `bun run build`) exposes the local `zapdev` binary on your PATH.
|
|
60
|
+
|
|
61
|
+
## Project structure
|
|
62
|
+
|
|
63
|
+
- `src/index.ts` — CLI entry (Citty); registers subcommands, defaults to `commit`.
|
|
64
|
+
- `src/commands/` — one file per command.
|
|
65
|
+
- `src/lib/` — pure logic (`config`, `commit-message`, unit-tested) and side effects (`git`, `ollama`).
|