Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Carbonara - CO2 Assessment & Sustainability Platform
Carbonara - assessment questionnaire & Sustainability Platform
Copyright (C) 2025 Carbonara team

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Expand Down
55 changes: 37 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Carbonara - CO2 Assessment & Sustainability Platform
# Carbonara - assessment questionnaire & Sustainability Platform

A comprehensive monorepo containing CLI tools, VS Code extension, and multi-editor plugin architecture for CO2 assessment and web sustainability analysis.
A comprehensive monorepo containing CLI tools, VS Code extension, and multi-editor plugin architecture for assessment questionnaire and web sustainability analysis.

## 🌱 Overview

Carbonara provides tools to measure, track, and optimize the environmental impact of digital projects through interactive assessments and automated analysis.

### Key Features

- **🔍 CO2 Assessment**: Interactive questionnaires to evaluate project sustainability
- **🔍 assessment questionnaire**: Interactive questionnaires to evaluate project sustainability
- **🌐 Web Analysis**: Pluggable analyzer architecture with built-in and external tools
- **📊 Data Lake**: SQLite-based storage with JSON flexibility and import/export
- **🛠️ CLI Tool**: Command-line interface for all operations
Expand Down Expand Up @@ -58,7 +58,7 @@ npm install -g @carbonara/cli
# Initialize project
carbonara init

# Run CO2 assessment
# Run assessment questionnaire
carbonara assess

# List available analysis tools
Expand Down Expand Up @@ -95,24 +95,26 @@ npm test

### Core Commands

| Command | Description | Example |
|---------|-------------|---------|
| `init` | Initialize new project | `carbonara init` |
| `assess` | Run CO2 assessment questionnaire | `carbonara assess` |
| `analyze <tool> <url>` | Run analysis with registered tool | `carbonara analyze greenframe https://example.com --save` |
| `tools` | Manage analysis tools | `carbonara tools --list` |
| `data` | Manage stored assessment data | `carbonara data --list` |
| `import` | Import data from files/databases | `carbonara import --file data.json` |
| Command | Description | Example |
| ---------------------- | ------------------------------------------ | --------------------------------------------------------- |
| `init` | Initialize new project | `carbonara init` |
| `assess` | Run assessment questionnaire questionnaire | `carbonara assess` |
| `analyze <tool> <url>` | Run analysis with registered tool | `carbonara analyze greenframe https://example.com --save` |
| `tools` | Manage analysis tools | `carbonara tools --list` |
| `data` | Manage stored assessment data | `carbonara data --list` |
| `import` | Import data from files/databases | `carbonara import --file data.json` |

### Detailed Command Reference

#### Project Management

```bash
carbonara init [--path <path>] # Initialize project with config and database
carbonara assess [--interactive] # Interactive CO2 assessment questionnaire
carbonara assess [--interactive] # Interactive assessment questionnaire questionnaire
```

#### Analysis Tools

```bash
carbonara tools --list # List all available tools and status
carbonara tools --install <tool-id> # Install external analysis tool
Expand All @@ -127,6 +129,7 @@ carbonara analyze <tool-id> <url> # Run analysis with specified tool
```

#### Data Management

```bash
carbonara data --list # List all stored assessment data
carbonara data --show # Show detailed project analysis
Expand All @@ -142,23 +145,27 @@ carbonara import --database <path> # Import from another Carbonara databas
### Analysis Tools

#### Built-in Tools

- **greenframe**: Website carbon footprint analysis

#### External Tools

- **greenframe**: Website carbon footprint (`@marmelab/greenframe-cli`)
- **if-webpage-scan**: Impact Framework webpage analysis with CO2 estimation
- **if-green-hosting**: Check if website is hosted on green energy
- **if-cpu-metrics**: Monitor local CPU utilization and energy consumption during analysis
- **if-e2e-cpu-metrics**: Monitor CPU utilization while running E2E tests (Cypress, Playwright, etc.)

#### Tool Management

```bash
carbonara tools --list # List all tools and status
carbonara tools --install greenframe # Install external tool
carbonara tools --refresh # Refresh installation status
```

### Data Management

```bash
carbonara data --list # List stored data
carbonara data --show # Show detailed analysis
Expand All @@ -170,16 +177,18 @@ carbonara import --database other.db # Import from database
## 📝 VS Code Extension

### Features

- **Status Bar Integration**: Real-time project status
- **Command Palette**: Access all Carbonara commands
- **Interactive Menus**: Visual interface for operations
- **Project Management**: Initialize and configure projects

### Usage

1. Click **Carbonara** in status bar
2. Select from quick-pick menu:
- 🚀 Initialize Project
- ✅ Run CO2 Assessment
- ✅ Run assessment questionnaire
- 🌐 Analyze Website
- 🗄️ View Data
- ⚙️ Open Configuration
Expand All @@ -195,13 +204,15 @@ carbonara import --database other.db # Import from database
## 🔧 Development

### CLI Development

```bash
cd packages/cli
npm install && npm link
npm run build && npm test
```

### VS Code Extension Development

```bash
cd plugins/vscode
npm install && npm run build
Expand All @@ -210,6 +221,7 @@ npm run package # Create .vsix
```

### Testing

```bash
npm test # All tests
npm run test:cli # CLI tests only
Expand All @@ -224,6 +236,7 @@ External tools are automatically tested by generic test suites. To add a new too
3. **Run tests**: Your tool is automatically included in test coverage

**Impact Framework tools** use manifest templates with placeholder replacement:

```json
{
"id": "if-webpage-scan",
Expand All @@ -239,13 +252,17 @@ External tools are automatically tested by generic test suites. To add a new too
},
"display": {
"fields": [
{ "key": "carbon", "path": "data.tree.children.child.outputs[0]['operational-carbon']" }
{
"key": "carbon",
"path": "data.tree.children.child.outputs[0]['operational-carbon']"
}
]
}
}
```

**Generic tools** work with any CLI tool:

```json
{
"id": "my-tool",
Expand All @@ -267,7 +284,7 @@ Monitor the environmental impact of running your existing E2E test suites:
# Monitor CPU usage while running Cypress tests
carbonara analyze if-e2e-cpu-metrics https://myapp.com --test-command "npx cypress run" --save

# Monitor CPU usage while running Playwright tests
# Monitor CPU usage while running Playwright tests
carbonara analyze if-e2e-cpu-metrics https://myapp.com --test-command "npx playwright test" --save

# Monitor CPU usage while running custom test script
Expand All @@ -285,11 +302,13 @@ This project follows [Semantic Versioning (SemVer)](https://semver.org/) princip
- **PATCH** version: Bug fixes (backward compatible)

### Current Versions

- **Monorepo**: 0.1.0
- **CLI**: 0.1.0
- **CLI**: 0.1.0
- **VS Code Extension**: 0.1.0

### Pre-1.0 Development

During pre-1.0 development (0.x.x), minor versions may include breaking changes. The API is considered unstable until 1.0.0 release.

## 📄 License
Expand All @@ -306,4 +325,4 @@ While the public project remains under AGPL-3.0-or-later, the Carbonara team res

### Contributing

By contributing to this project, you agree to the terms outlined in [CONTRIBUTING.md](CONTRIBUTING.md), including granting the Carbonara team perpetual rights to relicense your contributions under additional terms.
By contributing to this project, you agree to the terms outlined in [CONTRIBUTING.md](CONTRIBUTING.md), including granting the Carbonara team perpetual rights to relicense your contributions under additional terms.
123 changes: 0 additions & 123 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading