ptero-deploy
v1.1.0
Published
CLI tool to bump version, create GitHub release and restart a Pterodactyl server
Maintainers
Readme
ptero-deploy
CLI tool to bump version, create a GitHub release, and restart a Pterodactyl server - all in one command.
Install
npm install -g ptero-deployUsage
ptero-deploy <--major|--minor|--patch> [options]Bump flags (required)
| Flag | Effect |
|------|--------|
| --major | 1.2.3 → 2.0.0 |
| --minor | 1.2.3 → 1.3.0 |
| --patch | 1.2.3 → 1.2.4 |
Options
| Flag | Description |
|------|-------------|
| --no-restart | Skip the Pterodactyl server restart |
| --dry-run | Show what would happen without making any changes |
| --version, -v | Print ptero-deploy version |
| --help, -h | Show help |
What it does
- Reads the current version from
package.json - Bumps to the next version using semver
- Writes
package.jsonandpackage-lock.json - Creates a git commit + annotated tag (
v1.2.3) - Pushes branch and tags to the remote
- Creates a GitHub release (requires
gh) - Sends a restart signal to your Pterodactyl server
Configuration
Create a .env file in your project root (see .env.example):
PTERO_PANEL_URL=https://panel.example.com
PTERO_SERVER_ID=your-server-id
PTERO_API_BEARER=your-client-api-tokenNot needed when using
--no-restart.
The Pterodactyl API token must have the Send power signals permission on the target server.
Examples
# Patch release with full deploy
ptero-deploy --patch
# Minor release without server restart
ptero-deploy --minor --no-restart
# Preview a major release without doing anything
ptero-deploy --major --dry-runPre-checks
Before making any changes, ptero-deploy verifies:
- You are inside a git repository
- The working tree is clean (uncommitted changes will abort)
- The target tag (
v1.2.3) does not already exist locally or on the remote
If anything goes wrong after the version bump, the changes are automatically rolled back (commit undone, tag deleted, files restored).
License
MIT © DylanDelobel
