just-ship-it 0.0.3 → 1.0.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 CHANGED
@@ -1,444 +1,34 @@
1
1
  # just-ship-it
2
2
 
3
- Automate changeset-based releases with AI-generated descriptions powered by OpenRouter.
4
-
5
- ## Features
6
-
7
- - 🤖 **AI-Powered Descriptions**: Automatically generate meaningful changeset descriptions using AI
8
- - 🔄 **Automated Release Workflow**: Create changesets, open PRs, merge, and publish releases automatically
9
- - 🎯 **Smart Version Suggestions**: AI analyzes your changes to suggest appropriate version bumps (patch/minor/major)
10
- - 🔧 **Multi-Repository Support**: Configure and manage releases for multiple repositories
11
- - 📦 **Monorepo Support**: Full support for npm, pnpm, yarn, and bun workspaces with lockstep or selective versioning
12
- - 🎨 **Model Selection**: Choose from 300+ AI models via OpenRouter
13
- - ✅ **CI/CD Integration**: Waits for checks to pass before merging PRs
14
- - 🔀 **Changeset Compatible**: Works with existing changeset-based workflows
3
+ A motivational package to remind you to just ship it! 🚀
15
4
 
16
5
  ## Installation
17
6
 
18
- For end users:
19
-
20
7
  ```bash
21
- # Using bun (recommended)
22
- bun add -g just-ship-it
23
-
24
- # Or using npm
25
8
  npm install -g just-ship-it
26
9
  ```
27
10
 
28
- For development:
29
-
30
- ```bash
31
- # Clone the repository
32
- git clone https://github.com/mattapperson/just-ship-it
33
- cd just-ship-it
34
-
35
- # Install bun if you haven't already
36
- curl -fsSL https://bun.sh/install | bash
37
-
38
- # Install dependencies
39
- bun install
40
-
41
- # Build
42
- bun run build
43
-
44
- # Run tests
45
- bun test
46
- ```
47
-
48
- ## Prerequisites
49
-
50
- - **Node.js 18+**: Required for running the CLI
51
- - **Bun** (for development only): Fast JavaScript runtime and package manager
52
- - Install: `curl -fsSL https://bun.sh/install | bash`
53
- - Or visit [bun.sh](https://bun.sh) for other installation methods
54
- - Note: End users do NOT need bun installed to use just-ship-it
55
- - **GitHub CLI**: Must be installed and authenticated
56
-
57
- ```bash
58
- gh auth login
59
- ```
60
-
61
- - **OpenRouter API Key**: Required for AI features
62
- - Sign up at [openrouter.ai](https://openrouter.ai)
63
- - Set your API key as an environment variable:
64
-
65
- ```bash
66
- export OPENROUTER_API_KEY='your_api_key_here'
67
- ```
68
-
69
- ## Setup
70
-
71
- ### 1. Install GitHub CLI
72
-
73
- ```bash
74
- # macOS
75
- brew install gh
76
-
77
- # Windows
78
- winget install GitHub.cli
79
-
80
- # Linux
81
- # See https://github.com/cli/cli#installation
82
- ```
83
-
84
- ### 2. Authenticate with GitHub
85
-
86
- ```bash
87
- gh auth login
88
- ```
89
-
90
- ### 3. Get OpenRouter API Key
91
-
92
- 1. Visit [openrouter.ai](https://openrouter.ai) and create an account
93
- 2. Generate an API key from your dashboard
94
- 3. Add it to your environment:
95
-
96
- ```bash
97
- # Add to ~/.bashrc, ~/.zshrc, or equivalent
98
- export OPENROUTER_API_KEY='sk-or-v1-...'
99
- ```
100
-
101
- ### 4. Add a Repository
102
-
103
- ```bash
104
- just-ship-it add my-project
105
- ```
106
-
107
- Follow the prompts to configure:
108
-
109
- - GitHub owner (organization or user)
110
- - Repository name
111
- - Base branch (typically `main`)
112
- - AI model (optional, defaults to `anthropic/claude-opus-4.5`)
113
-
114
11
  ## Usage
115
12
 
116
- ### Interactive Mode
117
-
118
- Run without arguments to select a repository and configure the release interactively:
13
+ ### CLI
119
14
 
120
15
  ```bash
121
16
  just-ship-it
122
17
  ```
123
18
 
124
- The CLI will:
125
-
126
- 1. Show you a list of configured repositories
127
- 2. Analyze your changes since the last release
128
- 3. Suggest a version bump type (patch/minor/major)
129
- 4. Generate an AI-powered changeset description
130
- 5. Create a changeset and open a PR
131
- 6. Wait for CI checks to pass
132
- 7. Merge the PR and publish the release
133
-
134
- ### Automated Mode
135
-
136
- Specify all options via flags for CI/CD integration:
137
-
138
- ```bash
139
- just-ship-it my-project --type minor --message "Add new authentication feature" --yes
140
- ```
141
-
142
- ### With Custom Model
143
-
144
- Override the default model for a specific release:
145
-
146
- ```bash
147
- just-ship-it my-project --model openai/gpt-4o
148
- ```
149
-
150
- ## Commands
151
-
152
- ### `just-ship-it [repo]`
153
-
154
- Run a release for the specified repository (or select interactively).
155
-
156
- **Options:**
157
-
158
- - `-t, --type <type>`: Release type (`patch`, `minor`, or `major`)
159
- - `-m, --message <message>`: Release message (overrides AI generation)
160
- - `-y, --yes`: Skip confirmation prompts
161
- - `--model <model>`: AI model to use for this release
162
-
163
- **Example:**
164
-
165
- ```bash
166
- just-ship-it my-app --type patch --yes
167
- ```
168
-
169
- ### `just-ship-it add <name>`
170
-
171
- Add a new repository configuration.
172
-
173
- **Options:**
174
-
175
- - `--model <model>`: Default model for this repository
176
- - `--monorepo`: Configure as monorepo (will prompt for versioning mode)
177
- - `--lockstep`: Use lockstep versioning (all packages bump together)
178
- - `--selective`: Use selective versioning (only changed packages bump)
179
-
180
- **Examples:**
181
-
182
- ```bash
183
- # Single package repository
184
- just-ship-it add my-project --model anthropic/claude-opus-4.5
185
-
186
- # Monorepo with interactive setup
187
- just-ship-it add my-monorepo --monorepo
188
-
189
- # Monorepo with lockstep versioning
190
- just-ship-it add design-system --lockstep
191
-
192
- # Monorepo with selective versioning
193
- just-ship-it add platform --selective
194
- ```
195
-
196
- ### `just-ship-it list`
197
-
198
- List all configured repositories.
199
-
200
- **Example:**
201
-
202
- ```bash
203
- just-ship-it list
204
- ```
205
-
206
- ## Model Configuration
207
-
208
- You can configure which AI model to use at three levels (in order of precedence):
209
-
210
- ### 1. CLI Flag (Highest Priority)
211
-
212
- Override for a single release:
213
-
214
- ```bash
215
- just-ship-it my-app --model openai/gpt-4o
216
- ```
217
-
218
- ### 2. Environment Variable
19
+ ### Programmatic
219
20
 
220
- Set a default model for all releases:
21
+ ```javascript
22
+ const justShipIt = require('just-ship-it');
221
23
 
222
- ```bash
223
- export OPENROUTER_MODEL='anthropic/claude-opus-4.5'
24
+ console.log(justShipIt());
25
+ // Output: 🚀 Just ship it!
224
26
  ```
225
27
 
226
- ### 3. Per-Repository Configuration
227
-
228
- Configure during `add` or update the config file (`~/.just-ship-it/config.json`):
229
-
230
- ```bash
231
- just-ship-it add my-project --model anthropic/claude-opus-4.5
232
- ```
233
-
234
- ### 4. Default
235
-
236
- If no model is specified, defaults to `anthropic/claude-opus-4.5`.
237
-
238
- ## Example Models
239
-
240
- OpenRouter provides access to 300+ models. Popular choices include:
241
-
242
- - `anthropic/claude-opus-4.5` - Best for complex reasoning (default)
243
- - `anthropic/claude-sonnet-4.5` - Fast and efficient
244
- - `openai/gpt-4o` - OpenAI's latest
245
- - `openai/o1` - Advanced reasoning
246
- - `google/gemini-2.5-pro-002` - Google's flagship model
247
- - `meta-llama/llama-3.3-70b` - Open source powerhouse
248
- - `deepseek/deepseek-r1-distill-llama-70b` - Cost-effective reasoning
249
-
250
- See [openrouter.ai/models](https://openrouter.ai/models) for the complete list.
251
-
252
- ## Monorepo Support
253
-
254
- just-ship-it provides comprehensive support for monorepos with multiple packages. It automatically detects workspace configurations and provides two versioning strategies:
255
-
256
- ### Supported Workspace Types
257
-
258
- - **npm workspaces** - Detected from `package.json` with `workspaces` field
259
- - **pnpm workspaces** - Detected from `pnpm-workspace.yaml`
260
- - **yarn workspaces** - Detected from `package.json` with `workspaces` field
261
- - **bun workspaces** - Detected from `package.json` with `workspaces` field and `bun.lockb`
262
-
263
- ### Versioning Modes
264
-
265
- #### Selective Versioning (Recommended)
266
-
267
- Only packages with changes are analyzed and released. Best for monorepos with independent packages.
268
-
269
- ```bash
270
- just-ship-it add my-monorepo --selective
271
- ```
272
-
273
- **How it works:**
274
-
275
- 1. Detects which packages have changes since the last release
276
- 2. AI analyzes each changed package independently
277
- 3. You can choose to skip or bump each package individually
278
- 4. Only changed packages are included in the changeset
279
-
280
- #### Lockstep Versioning
281
-
282
- All packages are bumped together, even if they have no changes. Best for tightly coupled packages that should always be on the same version.
283
-
284
- ```bash
285
- just-ship-it add design-system --lockstep
286
- ```
287
-
288
- **How it works:**
289
-
290
- 1. All packages in the workspace are included
291
- 2. AI suggests a single version bump based on all changes
292
- 3. All packages receive the same version bump
293
- 4. All packages are included in the changeset
294
-
295
- ### Per-Package AI Analysis
296
-
297
- For monorepos, just-ship-it analyzes each package's changes independently:
298
-
299
- - Examines commits that touched each package
300
- - Reviews files changed within each package
301
- - Suggests appropriate version bump (patch/minor/major) per package
302
- - Generates a unified changeset description covering all packages
303
-
304
- ### Example Workflows
305
-
306
- **Selective Release:**
307
-
308
- ```bash
309
- # Setup
310
- just-ship-it add platform --selective
28
+ ## Why?
311
29
 
312
- # Run release
313
- just-ship-it platform
314
-
315
- # The CLI will:
316
- # 1. Show you which packages have changes
317
- # 2. Let you review and adjust version bumps per package
318
- # 3. Generate a multi-package changeset
319
- # 4. Create a PR and handle the release
320
- ```
321
-
322
- **Lockstep Release:**
323
-
324
- ```bash
325
- # Setup
326
- just-ship-it add ui-library --lockstep
327
-
328
- # Run release
329
- just-ship-it ui-library
330
-
331
- # The CLI will:
332
- # 1. Include all packages in the workspace
333
- # 2. Suggest a single version bump for all
334
- # 3. Generate a multi-package changeset
335
- # 4. Create a PR and handle the release
336
- ```
337
-
338
- ## Configuration
339
-
340
- Configuration is stored in `~/.just-ship-it/config.json`:
341
-
342
- **Single Package:**
343
-
344
- ```json
345
- {
346
- "repos": {
347
- "my-project": {
348
- "owner": "myorg",
349
- "repo": "my-project",
350
- "baseBranch": "main",
351
- "cloneUrl": "https://github.com/myorg/my-project.git",
352
- "model": "anthropic/claude-opus-4.5"
353
- }
354
- }
355
- }
356
- ```
357
-
358
- **Monorepo (Selective):**
359
-
360
- ```json
361
- {
362
- "repos": {
363
- "my-monorepo": {
364
- "owner": "myorg",
365
- "repo": "my-monorepo",
366
- "baseBranch": "main",
367
- "cloneUrl": "https://github.com/myorg/my-monorepo.git",
368
- "model": "anthropic/claude-opus-4.5",
369
- "monorepo": {
370
- "mode": "selective"
371
- }
372
- }
373
- }
374
- }
375
- ```
376
-
377
- **Monorepo (Lockstep):**
378
-
379
- ```json
380
- {
381
- "repos": {
382
- "design-system": {
383
- "owner": "myorg",
384
- "repo": "design-system",
385
- "baseBranch": "main",
386
- "cloneUrl": "https://github.com/myorg/design-system.git",
387
- "monorepo": {
388
- "mode": "lockstep"
389
- }
390
- }
391
- }
392
- }
393
- ```
394
-
395
- ## Environment Variables
396
-
397
- | Variable | Required | Default | Description |
398
- |----------|----------|---------|-------------|
399
- | `OPENROUTER_API_KEY` | **Yes** | - | Your OpenRouter API key |
400
- | `OPENROUTER_MODEL` | No | `anthropic/claude-opus-4.5` | Default AI model to use |
401
-
402
- ## How It Works
403
-
404
- 1. **Clone Repository**: Creates a temporary clone of your repository
405
- 2. **Analyze Changes**: Uses `git log` and `git diff` to analyze changes since the last release
406
- 3. **AI Analysis**: Sends change context to OpenRouter for analysis
407
- 4. **Generate Changeset**: Creates a changeset file with AI-generated description
408
- 5. **Create PR**: Opens a pull request with the changeset
409
- 6. **CI Checks**: Waits for all GitHub checks to pass
410
- 7. **Merge & Publish**: Merges the PR and publishes the release
411
-
412
- ## Troubleshooting
413
-
414
- ### "OPENROUTER_API_KEY environment variable is required"
415
-
416
- Make sure your API key is set:
417
-
418
- ```bash
419
- export OPENROUTER_API_KEY='your_key_here'
420
- ```
421
-
422
- ### "GitHub CLI not authenticated"
423
-
424
- Run `gh auth login` to authenticate with GitHub.
425
-
426
- ### "No repositories configured"
427
-
428
- Add a repository with:
429
-
430
- ```bash
431
- just-ship-it add my-project
432
- ```
433
-
434
- ## Credits
435
-
436
- Based on [autoship](https://github.com/vercel-labs/autoship) v0.2.0 by Vercel Labs, adapted to use OpenRouter for model flexibility and broader AI provider access.
30
+ Sometimes you just need a reminder that done is better than perfect. Stop overthinking and start shipping!
437
31
 
438
32
  ## License
439
33
 
440
- Apache-2.0
441
-
442
- ## Repository
443
-
444
- <https://github.com/openrouterteam/just-ship-it>
34
+ MIT
package/bin/cli.js ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+
3
+ const justShipIt = require('../index');
4
+
5
+ console.log('\n' + justShipIt() + '\n');
package/index.js ADDED
@@ -0,0 +1,11 @@
1
+ module.exports = function justShipIt() {
2
+ const messages = [
3
+ "🚀 Just ship it!",
4
+ "✨ Done is better than perfect!",
5
+ "🎯 Ship now, iterate later!",
6
+ "💪 Stop overthinking, start shipping!",
7
+ "🔥 The best code is shipped code!"
8
+ ];
9
+
10
+ return messages[Math.floor(Math.random() * messages.length)];
11
+ };
package/package.json CHANGED
@@ -1,44 +1,24 @@
1
1
  {
2
2
  "name": "just-ship-it",
3
- "version": "0.0.3",
4
- "description": "Automate changeset-based releases with AI-generated descriptions powered by OpenRouter",
5
- "type": "module",
6
- "main": "./dist/index.js",
3
+ "version": "1.0.0",
4
+ "description": "A motivational package to remind you to just ship it",
5
+ "main": "index.js",
7
6
  "bin": {
8
- "just-ship-it": "./bin/just-ship-it.js"
9
- },
10
- "files": ["dist", "bin"],
11
- "engines": {
12
- "node": ">=18.0.0"
7
+ "just-ship-it": "./bin/cli.js"
13
8
  },
14
9
  "scripts": {
15
- "build": "tsc",
16
- "dev": "tsc --watch",
17
- "test": "vitest run",
18
- "test:watch": "vitest",
19
- "test:coverage": "vitest run --coverage",
20
- "prepublishOnly": "bun run build"
21
- },
22
- "dependencies": {
23
- "@clack/prompts": "^0.11.0",
24
- "@openrouter/sdk": "^0.5.1",
25
- "chalk": "^5.6.2",
26
- "commander": "^14.0.2",
27
- "fast-glob": "3.3.3",
28
- "ora": "^9.1.0",
29
- "simple-git": "^3.30.0",
30
- "yaml": "2.8.2"
31
- },
32
- "devDependencies": {
33
- "@types/node": "^20.0.0",
34
- "typescript": "^5.9.3",
35
- "vitest": "^4.0.18"
10
+ "test": "echo \"Error: no test specified\" && exit 1"
36
11
  },
37
- "keywords": ["release", "automation", "changesets", "ai", "openrouter", "cli"],
12
+ "keywords": [
13
+ "motivation",
14
+ "productivity",
15
+ "shipping",
16
+ "deployment"
17
+ ],
38
18
  "author": "Matt Apperson",
39
- "license": "Apache-2.0",
19
+ "license": "MIT",
40
20
  "repository": {
41
21
  "type": "git",
42
- "url": "https://github.com/openrouterteam/just-ship-it"
22
+ "url": "https://github.com/mattapperson/just-ship-it"
43
23
  }
44
24
  }