{"id":49126674,"url":"https://github.com/chrisjwalk/zwift-log-parser","last_synced_at":"2026-04-21T15:38:44.724Z","repository":{"id":350894666,"uuid":"1132522882","full_name":"chrisjwalk/zwift-log-parser","owner":"chrisjwalk","description":"Parse and visualize your Zwift ride logs — FPS graphs, route tracking, and system info in your terminal. Built with Bun + React Ink.","archived":false,"fork":false,"pushed_at":"2026-04-12T17:00:10.000Z","size":392,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-12T18:08:03.626Z","etag":null,"topics":["bun","cli","cycling","fps","log-parser","react-ink","terminal","typescript","zwift"],"latest_commit_sha":null,"homepage":"https://github.com/chrisjwalk/zwift-log-parser","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chrisjwalk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-01-12T04:39:26.000Z","updated_at":"2026-04-12T16:59:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/chrisjwalk/zwift-log-parser","commit_stats":null,"previous_names":["chrisjwalk/zwift-log-parser"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/chrisjwalk/zwift-log-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisjwalk%2Fzwift-log-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisjwalk%2Fzwift-log-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisjwalk%2Fzwift-log-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisjwalk%2Fzwift-log-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisjwalk","download_url":"https://codeload.github.com/chrisjwalk/zwift-log-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisjwalk%2Fzwift-log-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32098523,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T11:25:29.218Z","status":"ssl_error","status_checked_at":"2026-04-21T11:25:28.499Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bun","cli","cycling","fps","log-parser","react-ink","terminal","typescript","zwift"],"created_at":"2026-04-21T15:38:43.776Z","updated_at":"2026-04-21T15:38:44.713Z","avatar_url":"https://github.com/chrisjwalk.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zwift Log Parser\n\nA TypeScript command-line tool for parsing and analyzing Zwift activity log files. Built with [Bun](https://bun.sh) and [React Ink](https://github.com/vadimdemedes/ink).\n\n## Features\n\n- 📊 **FPS Analysis** — Visualize frame rate performance with ASCII graphs and statistics\n- 🗺️ **Route Tracking** — Identify routes/activities with duration, distance, and elevation data\n- 🌍 **World Sessions** — Track world changes and activity segments\n- 💻 **System Information** — Extract GPU, CPU, RAM, resolution, and graphics settings\n- 🎮 **Session Metadata** — View game version, launcher version, device info, and timestamps\n- 📤 **JSON Export** — Output data as JSON for further processing\n- 🔧 **Flexible Options** — Enable/disable specific analysis sections as needed\n- 📁 **Interactive File Picker** — Browse and select log files if no path is provided\n\n## Installation\n\n### From npm\n\n```bash\nnpm install -g zwift-log-parser\nzwift-log-parser /path/to/your/Log.txt\n```\n\n### Local Development\n\n```bash\ngit clone https://github.com/chrisjwalk/zwift-log-parser.git\ncd zwift-log-parser\nbun install\nbun run build\nnpm link          # makes the zwift-log-parser command available globally\nzwift-log-parser /path/to/your/Log.txt\n```\n\n## Usage\n\n### Basic Usage\n\n```bash\nzwift-log-parser /path/to/Log.txt\n```\n\nIf no file path is provided, an interactive file picker will launch:\n\n```bash\nzwift-log-parser\n```\n\n### Command-Line Options\n\n```\nzwift-log-parser [logfile] [options]\n\nArguments:\n  logfile            Path to Zwift log file to parse\n\nOptions:\n  -V, --version      Output the version number\n  --no-fps           Skip FPS analysis and graphs\n  --no-routes        Skip route/activity information\n  --no-metadata      Skip session and system metadata\n  --json             Output results as JSON instead of formatted display\n  -h, --help         Display help information\n```\n\n### Examples\n\n```bash\n# Analyze everything (default)\nzwift-log-parser ~/Documents/Zwift/Logs/Log.txt\n\n# Routes and metadata only, no FPS graph\nzwift-log-parser ~/Documents/Zwift/Logs/Log.txt --no-fps\n\n# Export to JSON for further processing\nzwift-log-parser ~/Documents/Zwift/Logs/Log.txt --json \u003e output.json\n\n# FPS analysis only\nzwift-log-parser ~/Documents/Zwift/Logs/Log.txt --no-routes --no-metadata\n```\n\n## Sample Output\n\n```\n🚴 Zwift Log Parser v0.0.1\n\nSession Information\n  Log Date/Time:  21:09:07 2026-01-08\n  Game Version:   1.104.4(157262) rc/1.104.4\n  Device:         PC\n\nSystem Information\n  GPU:            NVIDIA GeForce RTX 5060/PCIe/SSE2\n  Driver:         4.6.0 NVIDIA 591.74\n  CPU:            12th Gen Intel(R) Core(TM) i5-12600KF\n  RAM:            64GB\n  Resolution:     1920x1080\n  Graphics:       ultra\n\nWorlds\n  Watopia\n  • Triple Flat Loops\n  • The Big Ring\n\nFPS Analysis\n\n  📍 Watopia\n\n     126.00 ┤\n     121.33 ┤  ╭───╮                     ╭──────╮\n     116.67 ┼──╯   │        ╭╮           │      ╰╮\n     ...\n\n  Time: 1h 48m 52s | Average: 99.76 | Min: 61.73 | Max: 120.97\n```\n\n## Development\n\n### Project Structure\n\nThis is a Bun workspace monorepo with two packages:\n\n```\ncore/                       # Parser library (@zwift-log-parser/core)\n├── src/\n│   ├── index.ts            # Library entry point\n│   └── lib/\n│       ├── parser.ts       # ZwiftLogParser class\n│       ├── file-picker.ts  # Interactive file picker\n│       └── __fixtures__/   # Test data (real log files)\n└── package.json\n\ncli/                        # CLI application\n├── src/\n│   ├── main.tsx            # Entry point — argument parsing\n│   ├── App.tsx             # Root React Ink component\n│   └── components/         # Individual UI panel components\n│       ├── Banner.tsx\n│       ├── MetadataPanel.tsx\n│       ├── WorldsPanel.tsx\n│       ├── FpsPanel.tsx\n│       └── Section.tsx\n└── package.json\n\nscripts/\n└── build.ts                # Bun build script (bundles CLI via esbuild)\n\nbin/\n└── zwift-log-parser.js     # npm bin wrapper\n```\n\n### Available Commands\n\n```bash\nbun install              # Install dependencies\nbun run build            # Build CLI bundle to dist/\nbun run dev              # Run CLI directly with Bun (no build needed)\nbun start                # Run the built CLI from dist/\nbun test                 # Run all tests\nbun lint                 # Lint all source files with ESLint\nbun run clean            # Remove build artifacts\nbun run pack             # Create npm tarball in dist/\n```\n\n### Development Workflow\n\n```bash\n# 1. Install dependencies\nbun install\n\n# 2. Run directly without building (fastest iteration)\nbun run dev /path/to/Log.txt\n\n# 3. Build for production\nbun run build\n\n# 4. Test the built bundle\nbun start /path/to/Log.txt\n\n# 5. Run tests\nbun test\n\n# 6. Lint\nbun lint\n```\n\n### Publishing to npm\n\n```bash\n# Bump version, build, and publish\nnpm version patch\nbun run build\nnpm publish --access public\n```\n\nTo test the package locally before publishing:\n\n```bash\nbun run pack\nnpm install -g dist/zwift-log-parser-\u003cversion\u003e.tgz\n```\n\n## Technology Stack\n\n- **Runtime**: [Bun](https://bun.sh)\n- **Language**: TypeScript 6.0\n- **UI**: [React Ink](https://github.com/vadimdemedes/ink) 7 (terminal UI, React 19)\n- **Bundler**: esbuild (via Bun build API)\n- **CLI Arg Parsing**: Commander.js\n- **FPS Graphs**: asciichart\n- **File Picker**: @inquirer/prompts\n- **Testing**: Vitest\n- **Linting**: ESLint 10 + typescript-eslint\n\n## Architecture\n\n### Core Library (`@zwift-log-parser/core`)\n\nProvides the `ZwiftLogParser` class and `pickFile()` utility:\n\n- `parseMetadata(content)` — session and system info\n- `parseRouteSessions(content)` — routes and world sessions with timing\n- `parseFPSLines(content)` — raw FPS sample array\n- `parseFpsPerWorld(content)` — FPS data grouped by world, with timestamps\n- `calculateFpsStats(fps)` — average, min, max statistics\n- `downsampleData(data, width)` — reduce data points for graph rendering\n\n### CLI Application\n\nBuilt with React Ink — the terminal output is a rendered React component tree. Commander.js handles argument and option parsing before React renders.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit issues or pull requests.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisjwalk%2Fzwift-log-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisjwalk%2Fzwift-log-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisjwalk%2Fzwift-log-parser/lists"}