@octozoo/hightide
v1.0.5
Published
HighTide command line client
Readme
HighTide CLI
The HighTide command-line tool makes it easy to submit code coverage results to the HighTide API on octozoo.com. Track your project's test coverage metrics over time and integrate seamlessly with your CI/CD pipeline.
Quick Start
1. Get Your API Token
Visit octozoo.com to create an account and get your API token. You'll need this to submit coverage data.
2. Set Up Your Token
Set your OctoZoo API token as an environment variable:
export OCTOZOO_TOKEN=your_api_token_hereOr add it to your CI/CD environment variables for automated submissions.
4. Submit Coverage Data
The easiest way to submit coverage is using the submit-coverage command, which automatically detects and parses common coverage formats:
# Submit line coverage from your coverage file
npx @octozoo/hightide submit-coverage --metric YOUR_METRIC_ID
# Or specify a custom coverage file path
npx @octozoo/hightide submit-coverage path/to/coverage.json --metric YOUR_METRIC_IDUsage Guide
Submitting Code Coverage
The submit-coverage command is the primary way to submit test coverage results:
npx @octozoo/hightide submit-coverage [coverage-file] [options]Options:
--metric <number>(required): Your metric ID from octozoo.com--type <type>: Coverage type to extract (lines,statements,functions,branches). Default:lines--format <format>: Coverage file format (istanbul-json,simplecov-json,auto). Default:auto--commit-identifier <hash>: Git commit SHA orautoto auto-detect. Default:auto--token <token>: API token (or useOCTOZOO_TOKENenv var)--dry-run: Preview what would be sent without submitting
Supported Coverage Formats:
- Istanbul/NYC JSON format (JavaScript/TypeScript projects)
- SimpleCov JSON format (Ruby projects)
- Auto-detection tries both formats if not specified
Examples:
# Basic usage - auto-detects coverage file and format
npx @octozoo/hightide submit-coverage --metric 123
# Specify coverage type (lines, statements, functions, or branches)
npx @octozoo/hightide submit-coverage --type functions --metric 123
# Use a specific coverage file
npx @octozoo/hightide submit-coverage ./coverage/coverage-final.json --metric 123
# Force a specific format
npx @octozoo/hightide submit-coverage --format istanbul-json --metric 123
# Preview without submitting
npx @octozoo/hightide submit-coverage --dry-run --metric 123Manual Metric Submission
For custom metrics or when you want full control over the values:
npx @octozoo/hightide submit --numerator 85 --denominator 100 --metric 123Options:
--numerator <number>(required): Covered items (integer >= 0)--denominator <number>(required): Total items (integer > 0)--metric <number>(required): Your metric ID from octozoo.com--commit-identifier <hash>: Git commit SHA orauto. Default:auto--token <token>: API token (or useOCTOZOO_TOKENenv var)--dry-run: Preview without submitting
CI/CD Integration
HighTide works great in CI/CD pipelines. Here are some examples:
GitHub Actions:
- name: Submit Coverage
run: npx @octozoo/hightide submit-coverage --metric ${{ secrets.HIGHTIDE_METRIC_ID }}
env:
OCTOZOO_TOKEN: ${{ secrets.OCTOZOO_TOKEN }}Utility Commands
Help
npx @octozoo/hightide --helpShows all available commands and options.
Version
npx @octozoo/hightide --versionDisplays the current version.
Common Coverage File Locations
HighTide automatically looks for coverage files in these common locations:
- Istanbul/NYC:
coverage/coverage-final.json - SimpleCov:
coverage/.resultset.json
If your coverage files are in different locations, specify the path explicitly:
npx @octozoo/hightide submit-coverage ./my-custom-path/coverage.json --metric 123Support
For questions, issues, or support:
- 📧 Email: [email protected]
- 🌐 Website: octozoo.com
License
See octozoo.com/terms .
