Copy .env.example to .env and set DEVTO_API_KEY and other variables.
This project requires Ruby 3.4+. Use the wrapper scripts to ensure the correct Ruby version:
PowerShell:
.\run.ps1 <command> [options]CMD:
run.bat <command> [options]The wrapper scripts automatically select Ruby 3.4, even if your system default is a different version.
Run the CLI to fetch analytics and write CSV:
With wrapper (recommended):
.\run.ps1 fetch --org your_org_slug --since 2025-06-01 --format csv --out-dir dataDirect (only if Ruby 3.4+ is your system default):
ruby ./bin/devto-analytics fetch --org your_org_slug --since 2025-06-01 --format csv --out-dir data
List articles for the organization:
.\run.ps1 list-articles --org your_org_slugVisualize analytics in a web dashboard:
.\run.ps1 visualizeRake tasks:
rake devto:collect[your_org_slug,2025-06-01]
rake devto:dry_run[your_org_slug,2025-06-01]
Outputs are written under data/YYYY-MM-DD/ by default.
If you see errors about Ruby version requirements:
- Verify Ruby 3.4+ is installed:
C:\Ruby34-x64\bin\ruby --version - Use the wrapper scripts (
run.ps1orrun.bat) instead of callingrubydirectly - If using a Ruby version manager like
uru, make sure both Ruby versions are registered