Docs
The khepra model step by step — every formula and default it uses.
Forecast
- Pick a sample shape to try the planner, or choose “Paste my own forecast”. Samples are made up to show typical day shapes; they are not any grid's real data.
- A pasted forecast is 2 to 72 numbers in gCO₂e/kWh, one per hour, separated by commas, spaces, semicolons or new lines. Values must be between 0 and 2,000.
- Set “First hour” to the clock hour (0–23) of the first value so start times read as real times. Times past midnight show “+1 day”.
- Public sources that publish hourly forecasts include grid operators (for example the National Grid ESO Carbon Intensity API in Great Britain) and data providers; copy the forecast column and paste it.
Job
- Job length is the run time in whole hours (1–48). The window is always one contiguous run — khepra does not pause or split jobs.
- Average power is what the job draws while running, in kW — for example the GPU and server draw of a training node, or a measured rack average.
- “Finish within” is the deadline in hours from the first forecast hour. It cannot be longer than the forecast, and the job cannot be longer than the deadline.
- A field out of range turns red with the reason under it and the result waits until it is fixed. “Reset to defaults” puts every field back.
Window search
- For every start hour s from 0 to deadline − length, khepra averages the forecast values s … s + length − 1.
- The window with the lowest average wins. On a tie the earliest start wins, so nothing waits longer than it has to.
- “Run now” is the window that starts at the first forecast hour.
Emissions
- Energy (kWh) = average power (kW) × job length (h). It is the same for both windows.
- Emissions (kg CO₂e) = average intensity of the window (g/kWh) × energy (kWh) ÷ 1,000.
- Saved = run-now kg − best-window kg; the percentage is saved ÷ run-now.
- This uses the average intensity of the grid mix you pasted, not the marginal plant that answers your extra load, and ignores data-center overhead (PUE). Multiply power by your PUE first if you want it included.
Workspace, saved plans and CSV
- Choose Sign up, then enter your name, email and a password with at least 8 characters, one letter and one number.
- You land in your workspace at /app. The planner there remembers your last inputs in this browser (localStorage).
- Name a plan and choose “Save plan” to keep it in the list below the planner (up to 200, newest first). Delete removes one; clearing site data removes all.
- “Export CSV” downloads every saved plan. Text cells that start with = + - @ get a leading apostrophe so a spreadsheet does not run them as formulas.
- Use Log out in the top bar when you are done on a shared device. To delete your account, email [email protected].
Account API
- POST /api/auth/signup with JSON { name, email, password } → 201 and a session cookie; 409 if the email is taken, 400 on invalid input.
- POST /api/auth/login with JSON { email, password } → 200 and a session cookie; 401 on a wrong password, 429 after too many tries.
- GET /api/auth/me → 200 with the signed-in user, or 401 when signed out. POST /api/auth/logout ends the session.
- Requests that change data must come from the same origin (cookie session, no API keys). The planner itself has no API — it runs in your browser.
khepra is a planning aid, not a measurement: results are only as good as the forecast you paste, and the sample shapes are made up. Check real emissions against your provider's data.