@jbrejner/cli
v2.11.1
Published
Kosli CLI - Record and query software delivery events
Maintainers
Readme
Kosli CLI
The Kosli CLI is a command-line tool for recording and querying software delivery events. This npm package provides an easy way to install and use the Kosli CLI in JavaScript/TypeScript projects.
Installation
Global Installation
Install globally to use the CLI anywhere:
npm install -g @jbrejner/cliProject Installation
Install as a development dependency in your project:
npm install --save-dev @jbrejner/cliUsage
After installation, you can use the kosli command:
# Check version
kosli version
# Get help
kosli --help
# Example: Report a deployment
kosli report deployment <deployment-name> \
--environment <environment-name> \
--api-token <your-api-token>Using with npx
You can run Kosli without installing it:
npx @jbrejner/cli versionUsing in npm scripts
Add Kosli commands to your package.json:
{
"scripts": {
"kosli:version": "kosli version",
"kosli:report": "kosli report deployment production --environment prod"
}
}Then run:
npm run kosli:versionHow It Works
This npm package downloads the appropriate platform-specific Kosli CLI binary during installation:
- Supported Platforms: macOS (darwin), Linux, Windows
- Supported Architectures: x64 (amd64), arm64
The binary is downloaded from the official Kosli CLI releases.
Requirements
- Node.js: >= 14.0.0
- Internet connection: Required during installation to download the binary
Documentation
For full documentation, visit:
Troubleshooting
Installation Issues
If the binary download fails during installation, you can:
- Manually download the binary from GitHub releases
- Place it in
node_modules/@jbrejner/cli/bin/ - Make it executable:
chmod +x node_modules/@jbrejner/cli/bin/kosli
Version Mismatch
To verify the installed version:
kosli versionThe version should match the npm package version.
CI/CD Integration
GitHub Actions
- name: Install Kosli CLI
run: npm install -g @jbrejner/cli
- name: Report deployment
run: |
kosli report deployment ${{ github.sha }} \
--environment production \
--api-token ${{ secrets.KOSLI_API_TOKEN }}GitLab CI
deploy:
before_script:
- npm install -g @jbrejner/cli
script:
- kosli report deployment $CI_COMMIT_SHA
--environment production
--api-token $KOSLI_API_TOKENSupport
License
MIT License - See the LICENSE file for details.
About Kosli
Kosli provides complete visibility and change tracking for your software delivery pipelines. Learn more at kosli.com.
