cricinfo is a Go-powered Cricinfo CLI published on npm as cricinfo-cli-go. It is designed for both human workflows and agent workflows, with readable text output by default and structured JSON or JSONL for automation.
Install the latest published package globally:
npm i -g cricinfo-cli-go
cricinfo --version
cricinfo --helpIf you are working from source, the repo also ships local build targets:
make build
make install-localThe npm package installs a platform-specific binary when available and falls back to a local Go build during postinstall if needed.
Start at the root help, then drill into the family you need:
cricinfo --help
cricinfo matches --help
cricinfo players --help
cricinfo teams --help
cricinfo leagues --help
cricinfo analysis --helpCommon command families include:
matches
players
teams
leagues
seasons
standings
competitions
search
analysis
Typical workflows:
# Discover current or recent match data
cricinfo matches list
cricinfo matches live
cricinfo matches show 1529474
cricinfo matches scorecard 1529474
# Explore players and teams
cricinfo players profile 1361257
cricinfo players match-stats 1361257 --match 1529474
cricinfo teams roster 789643 --match 1529474
# Traverse leagues and seasons
cricinfo leagues show 19138
cricinfo leagues seasons 19138
cricinfo seasons show 19138 --season 2025
# Derived analysis
cricinfo analysis dismissals --league 19138 --seasons 2025
cricinfo analysis bowling --metric economy --scope match:1529474
cricinfo analysis batting --metric strike-rate --scope season:2025 --league 19138
cricinfo analysis partnerships --scope season:2025 --league 19138Use --format text|json|jsonl to match the consumer:
cricinfo matches show 1529474 --format json
cricinfo matches list --format jsonl
cricinfo players profile 1361257 --format jsonHelpful global flags:
--verbosefor richer summaries--all-fieldsto retain extended entity data in structured output--format jsonlfor list-oriented machine processing
Use the checked-in Makefile targets whenever possible:
make fmt
make test
make vet
make lint
make check
make build
make build-all
make npm-smoke
make acceptance
make test-live
make test-live-smoke
make fixtures-refreshmake check runs format, tests, vet, and lint. make acceptance performs a live end-to-end traversal across install/help, matches, players, teams, leagues, analysis, and JSON rendering.
Releases are tag-driven. Push a vX.Y.Z tag and GitHub Actions will:
- run Go and Node quality checks
- build release binaries for the supported platforms
- publish the GitHub release assets
- publish the npm package at the tag version
Release artifact conventions:
- binary name:
cricinfo - GitHub release assets:
cricinfo_<goos>_<goarch>[.exe] - npm shim:
bin/cricinfo.js - install fallback:
scripts/postinstall.js
If you change the CLI name or release artifact layout, update package.json, bin/cricinfo.js, scripts/postinstall.js, Makefile, and .github/workflows/release.yml together.