Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 1, 2026

Added documentation for the new codecarbon run CLI command that enables emissions tracking for any executable.

Changes

  • docs/edit/usage.rst: Added "Running Any Command with CodeCarbon" section
    • Command syntax and usage examples (shell scripts, Python, Node.js, etc.)
    • Sample output showing emissions report format
    • Machine-level vs process-level tracking clarification

Example Usage

# Run any command with emissions tracking
codecarbon run -- bash -c 'echo "Processing..."; sleep 30; echo "Done!"'

# Output includes emissions report
🌱 CodeCarbon: Starting emissions tracking...
   Command: bash -c echo "Processing..."; sleep 30; echo "Done!"
   
Processing...
Done!

============================================================
🌱 CodeCarbon Emissions Report
============================================================
   Emissions: 0.0317 g CO2eq
   Saved to: /home/user/emissions.csv
============================================================

Documentation positioned after codecarbon monitor section for logical flow with other CLI commands.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Add CLI ability to run codecarbon with any command docs: Add usage documentation for codecarbon run command Feb 1, 2026
Copilot AI requested a review from benoit-cty February 1, 2026 10:18
@benoit-cty
Copy link
Contributor

Duplicate

@benoit-cty benoit-cty closed this Feb 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants