@coderpass/cli v1.0.17
coderpass
A simple CLI tool that commits (even when there are no changes) and forces a git push in the current repository. Perfect for triggering CI pipelines without code changes.
Key Features
- Commits all changes in the entire repository regardless of which directory you run it from
- Creates empty commits when there are no changes (great for triggering CI)
- Force pushes to ensure the remote is updated
- Configurable options for remote, branch, commit message, etc.
Installation
Install the package globally, useful for debugging and iterating on changes
npm linkInstall the package globally, one off
npm install -g coderpass-cliOr run it directly with npx:
npx coderpass-cliUsage
coderpass [options]Options
-r, --remote <remote>: The remote to push to (default: "origin")-b, --branch <branch>: The branch to push (default: current branch)-v, --verbose: Show verbose output-m, --message <message>: Commit message (default: "Auto-commit by coderpass")--no-commit: Skip committing changes--no-empty-commit: Skip creating empty commit when no changes are detected-h, --help: Display help information-V, --version: Output the version number
Examples
Commit (even if empty) and push the current branch to origin:
coderpassTrigger CI with a custom message:
coderpass -m "Trigger CI build"Push a specific branch with custom commit message:
coderpass --branch main --message "Updated documentation"Push to a different remote without committing changes:
coderpass --remote upstream --no-commitPush only if there are real changes (no empty commits):
coderpass --no-empty-commitCommands
The CLI provides different commands for different purposes:
Test Command
Run tests locally using Jest:
coderpass testYou can pass additional Jest arguments:
coderpass test --watch
coderpass test --coverageSubmit Command
Submit your code by pushing to the repository and streaming test logs:
coderpass submitThis will: 1. Commit your changes (or create an empty commit) 2. Force push to the repository 3. Stream the test logs from the remote CI system
You can customize the submit behavior:
coderpass submit -m "Testing feature X" -b developPush Command (Default)
The default behavior when running coderpass with no command:
coderpassThis commits changes and force pushes to your repository without streaming logs.
Development
Clone the repository and install dependencies:
git clone <repository-url>
cd coderpass-cli
npm installBuild the project:
npm run buildRun in development mode:
npm run devWatch Mode for Development
This project uses tsx for development, which offers several advantages:
- Much faster execution and startup time
- Built-in watch mode for automatic restarting
- Better ESM support
- Native source map support
To run the CLI in watch mode during development:
npm run watchThis will automatically restart the application whenever you make changes to the source code.
License
ISC
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago