{"id":27625,"library":"build-stats","title":"build-stats","description":"A CLI tool that fetches and analyzes build pipeline history from Travis CI or Bitbucket Pipelines. Current stable version is 1.8.0. It offers commands to download, calculate averages, display history, and show success/failure stats. Designed for continuous integration environments, it supports private repositories via auth tokens, branch filtering, and customizable time periods. The tool caches data locally to avoid repeated API calls.","status":"active","version":"1.8.0","language":"javascript","source_language":"en","source_url":"https://github.com/ajaymathur/build-stats","tags":["javascript","build","stats","ci","continous integration","perf"],"install":[{"cmd":"npm install build-stats","lang":"bash","label":"npm"},{"cmd":"yarn add build-stats","lang":"bash","label":"yarn"},{"cmd":"pnpm add build-stats","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[],"quickstart":{"code":"yarn global add build-stats\nbuild-stats travis:boltpkg/bolt download --auth $TRAVIS_TOKEN\nbuild-stats travis:boltpkg/bolt calculate --period 7 --last 90","lang":"javascript","description":"Install and run build-stats CLI to download and calculate build statistics for a Travis CI repository."},"warnings":[{"fix":"Provide a valid authentication token using --auth <token>.","message":"The --auth flag is required for private repos but optional for public; missing token on private repo causes authentication errors.","severity":"gotcha","affected_versions":"*"},{"fix":"Use a larger period like 7 or 30 for smoother trends.","message":"The --period flag defaults to 1 day, which may produce noisy data for repos with many builds.","severity":"gotcha","affected_versions":"*"},{"fix":"Set --last to the total number of periods (e.g., --period 30 --last 12 for 1 year).","message":"The --last flag defaults to 30 periods; if period is 1 day, it fetches only the last 30 days. Combine with --period for longer timeframes.","severity":"gotcha","affected_versions":"*"},{"fix":"Run build-stats from the directory where you want the .data cache folder.","message":"The download command saves data to a .data folder in the current working directory; not running from the expected directory may cause confusion.","severity":"gotcha","affected_versions":"*"},{"fix":"Refer to GENERATING_AUTH_TOKENS.md for Bitbucket token instructions.","message":"Bitbucket Pipelines support requires additional setup compared to Travis CI; auth token generation differs.","severity":"gotcha","affected_versions":">=1.6.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use --auth with a valid token (see GENERATING_AUTH_TOKENS.md).","cause":"Missing or invalid --auth token for a private repository.","error":"Error: Authentication failed. Please provide a valid token."},{"fix":"Use format like travis:owner/repo or bitbucket:owner/repo.","cause":"Incorrect repository specifier format (service:user/repo).","error":"Error: Cannot download history. Repo not found."},{"fix":"Run from a directory with write permissions or change directory.","cause":"Insufficient permissions to create .data folder in current directory.","error":"Error: Cache directory not writable."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}