
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
🌱 Analyze the environmental impact of your Node.js code with beautiful dashboards and actionable insights
Analyze the environmental impact of your Node.js code with beautiful dashboards and actionable insights
GayaCode is a powerful CLI tool that measures and visualizes the environmental impact of your Node.js applications. Get detailed insights into energy consumption, CO₂ emissions, and receive actionable recommendations to make your code more sustainable.
npm install -g gayacode
npm install gayacode
npx gayacode <script>
# Analyze a script and open dashboard
gayacode your-script.js
# Analyze without opening browser
gayacode your-script.js --no-open
# Custom output directory
gayacode your-script.js -o ./my-reports
# Custom emission factor
gayacode your-script.js --emission-factor 500
gayacode --help
Usage: gayacode [options] <script>
🌱 Analyze the environmental impact of your Node.js code
Arguments:
script Path to the Node.js script to analyze
Options:
-V, --version output the version number
-o, --output <path> Output directory for the dashboard (default: "./gayacode-report")
--no-open Skip opening the dashboard in browser
--emission-factor <factor> CO₂ emission factor (g/kWh) (default: "400")
--timeout <ms> Maximum execution time (ms) (default: "60000")
-h, --help display help for command
GayaCode follows SOLID principles with a clean, modular architecture:
src/
├── core/interfaces/ # Core interfaces and types
├── monitoring/ # Process monitoring strategies
├── calculations/ # Environmental calculation strategies
├── utils/ # Utility functions and formatters
├── dashboard/
│ ├── components/ # Modular dashboard components
│ ├── templates/ # HTML template engine
│ └── DashboardGenerator.js
├── analyzer/ # Main environmental analyzer
└── cli/ # Command-line interface
GayaCode provides a comprehensive eco score (0-100) with letter grades:
🌱 GayaCode - Environmental Impact Analyzer v2.0
✅ Analysis complete
📊 Quick Results:
⚡ Energy: 0.59 µWh
🌍 CO₂: 0.0002 g
⏱️ Time: 1242 ms
🖥️ Peak CPU: 160.0%
💾 Peak Memory: 156.7 MB
🎯 Eco Score: 61/100 (B)
📁 Report saved to: ./gayacode-report/index.html
You can also use GayaCode programmatically in your Node.js applications:
import { EnvironmentalAnalyzer } from 'gayacode'
const analyzer = new EnvironmentalAnalyzer({
emissionFactor: 400,
maxExecutionTime: 60000
})
const result = await analyzer.analyzeScript('./my-script.js')
console.log(`Eco Score: ${result.ecoScore.overall}/100`)
console.log(`CO₂ Emissions: ${result.metrics.co2Grams}g`)
We welcome contributions! Please see our Contributing Guide for details.
git clone https://github.com/shalevo13/GayaCode.git
cd GayaCode
npm install
npm run dev test-script.js
MIT © GayaCode Contributors
Made with 🌱 by developers who care about the planet
Made with 🌱 for sustainable software development
FAQs
🌱 Analyze the environmental impact of your Node.js code with beautiful dashboards and actionable insights
We found that gaya-code demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.