| name | autoship |
| description | CLI tool for automated changeset-based releases with AI-generated descriptions. Use when the user needs to release a package, create changesets, bump versions, or automate npm publishing workflows. Triggers include requests to "release a package", "create a changeset", "publish to npm", "bump the version", "automate releases", or any task involving version management and package publishing for repositories using the changesets workflow. |
| allowed-tools | Bash(autoship:*), Bash(npx autoship:*) |
Automated Releases with autoship
Core Workflow
Every release follows this pattern:
- Configure:
autoship add <name> (one-time setup)
- Release:
autoship <name> (interactive) or autoship <name> -t patch -y (automated)
The tool handles the complete release cycle:
- Clone repository
- Analyze changes and suggest release type (patch/minor/major)
- Generate AI-powered changeset description
- Create and merge changeset PR
- Wait for and merge Version Packages PR
- Trigger npm publish
Requirements
Before using autoship, ensure:
gh auth login
export AI_GATEWAY_API_KEY="your-key"
Essential Commands
autoship add myproject
autoship list
autoship myproject
autoship myproject -t patch -y
autoship myproject -t minor -y
autoship myproject -t major -y
autoship myproject -t patch -m "Fixed login bug" -y
Command Options
autoship [repo]
-t, --type <type>
-m, --message <message>
-y, --yes
-h, --help
Common Patterns
Fully Automated Patch Release
autoship myproject -t patch -y
AI-Assisted Interactive Release
autoship myproject
Custom Message Release
autoship myproject -t minor -m "Added new authentication providers" -y
CI/CD Integration
export AI_GATEWAY_API_KEY="${{ secrets.AI_GATEWAY_API_KEY }}"
npx autoship myproject -t patch -y
What autoship Does (10 Steps)
- Clone - Clones the repository from the base branch
- Analyze - Finds latest version tag, analyzes commits and diff
- Suggest - AI suggests release type based on changes
- Generate - AI generates changeset description
- Branch - Creates release branch with changeset file
- PR - Creates pull request for the changeset
- Wait - Waits for CI checks to pass
- Merge - Merges the changeset PR
- Version PR - Waits for changesets action to create Version Packages PR
- Publish - Merges Version Packages PR to trigger npm publish
Output Format
autoship provides clear step-by-step output:
[1/10] Cloning repository from main...
> Repository cloned
> Package: my-package @ 1.2.3
[2/10] Creating release branch...
> Branch created: release/patch-1706123456789
[3/10] Generating changeset...
> Changeset created: fluffy-pants-dance.md
...
Release Complete!
The patch release has been published.
Configuration
Config is stored at ~/.autoship/config.json:
{
"repos": {
"myproject": {
"owner": "vercel-labs",
"repo": "myproject",
"baseBranch": "main",
"cloneUrl": "https://github.com/vercel-labs/myproject.git"
}
}
}
Deep-Dive Documentation
Ready-to-Use Templates
./templates/automated-release.sh myproject patch
./templates/setup-repo.sh myproject vercel-labs myproject main
Troubleshooting
"No repositories configured"
Run autoship add <name> to configure a repository first.
"Repository not found"
Check autoship list for available repos. The name is case-sensitive.
CI checks failing
The tool will show which checks failed. Fix the issues in the target repository, then retry.
AI generation failed
If AI fails, autoship falls back to manual input. Ensure AI_GATEWAY_API_KEY is set.