harumi
Run your local optimization code on Harumi's infrastructure — straight from your terminal or IDE — via the project's self-hosted Gitea repo, instead of pasting it into the platform's notebook editor.
Optimization/solver code (Gurobi, OR-Tools, etc.) is often too heavy to run on a laptop. harumi binds a local directory to a Harumi project, runs your code (from a git ref) on Harumi's infrastructure, and lets you inspect/download the results — reusing the exact same backend endpoints the web app and AI agent already use. It can also manage the project's repo, datasources, schedules, secrets, and organizations end to end.
Install
pip install harumi
This installs the harumi CLI and the harumi Python package (import harumi).
Installing from source instead (for contributing, or an unreleased fix):
pip install -e .
Quick start
# 1. Log in (Supabase OTP — check your email for the code)
harumi login
# 2. Create a new project, or find an existing one
harumi projects create "My Project"
harumi projects list
# 3. Bind the current directory to a project (skip if `projects create` already bound it)
harumi init --project <PROJECT_ID>
# 4. See available kernel sizes (CPU/RAM, Gurobi vs plain Python)
harumi specs
# 5. Run the bound directory's code on the infra
harumi run --watch --output-dir ./out
# 6. Inspect runs later
harumi runs list
harumi runs get <RUN_ID>
# 7. Check the project's dashboard.toml renders the widgets you expect
harumi dashboard validate --latest
Everything else the CLI can do
harumi repo— browse, read, write, delete, move, and download files in the project's Gitea repo; create/delete/promote branches (versions);repo dirfor a GitHub-style folder-at-a-time browse.harumi dashboard— look up thedashboard.tomlwidget reference (widgets) and validate a project's dashboard, including itsoutput.jsondot-paths, before pushing (validate).harumi share— turn the project's public, unauthenticated dashboard link on/off, rotate it, and password-protect it.harumi templates— list project templates to pass asprojects create --template-id.harumi datasources— CRUD project database connections, test them, and run read-only SQL queries against them.harumi schedules— CRUD cron schedules that trigger git-ref runs.harumi secrets— CRUD project-scoped environment variables.harumi org— CRUD organizations and manage their members.harumi profile— view/update your account profile.
Run harumi --help or any subcommand with --help for the full flag reference, or see the command reference for endpoint-level detail.
Execution model
Every run is git-ref based: code lives in the project's Harumi Git (Gitea) repo. If your working tree is dirty or has unpushed commits when you run harumi run, the CLI transparently pushes a throwaway scratch branch so you can iterate without committing manually — your real branches are never touched. Pass --branch/--commit to run a specific ref instead.
Configuration & environments
The CLI targets one of two environments (each with its own Supabase, so each has its own login):
| Env | API | Gitea | Access |
|---|---|---|---|
production (default) |
https://api.harumi.io/api |
https://git.harumi.io |
public |
staging |
https://api.dev.harumi.io/api |
https://git.dev.harumi.io |
internal, VPN-only |
harumi env list # production only (staging hidden unless --all / HARUMI_INTERNAL=1)
harumi env use staging # internal devs; requires VPN + a staging account
harumi --env staging run # override for a single command
Selection precedence: --env > HARUMI_ENV > harumi env use (saved default) > production. Within an environment you can still override endpoints for local development:
| Env var | Purpose |
|---|---|
HARUMI_API_URL |
Override harumi-api base URL (e.g. http://localhost:8000/api) |
HARUMI_GIT_URL |
Override the Harumi Git (Gitea) base URL |
HARUMI_ORG |
Organization ID sent as X-Organization |
HARUMI_INTERNAL |
Set to 1 to reveal internal environments in harumi env list |
Credentials (JWT + refresh token + Gitea token) are stored per-environment under ~/.harumi/environments/<env>/credentials.json (mode 0600) after harumi login. An older flat ~/.harumi/credentials.json is migrated into production automatically on first run.
Library usage
from harumi import Client
from harumi.config import ProjectBinding
binding = ProjectBinding.load() # reads .harumi/config.json in cwd (or a parent)
client = Client() # loads stored credentials
response = client.execute_project(binding.project_id, branch="main")
See the command reference for more examples (polling, repo edits, datasources, schedules, secrets, orgs).
Development
pip install -e ".[dev]"
pytest
All tests are offline (SSE parser + mocked HTTP transport) — no live backend required.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file harumi-0.4.1.tar.gz.
File metadata
- Download URL: harumi-0.4.1.tar.gz
- Upload date:
- Size: 82.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ecb71b190924b5b8e2bd0aa9b0e3e5ccfaa1b79bb85f332e3060ea17211058bb
|
|
| MD5 |
f95fd45d38b2debf5a2f51ddfcec53cc
|
|
| BLAKE2b-256 |
ec832ac9f7f4ce8c0a31de3696426606e66ac753b997fe64dce3270888576269
|
Provenance
The following attestation bundles were made for harumi-0.4.1.tar.gz:
Publisher:
release.yml on harumi-io/harumi-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
harumi-0.4.1.tar.gz -
Subject digest:
ecb71b190924b5b8e2bd0aa9b0e3e5ccfaa1b79bb85f332e3060ea17211058bb - Sigstore transparency entry: 2467561507
- Sigstore integration time:
-
Permalink:
harumi-io/harumi-cli@29adc2a49106234f3a342855da7de8e20f1aacb8 -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/harumi-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@29adc2a49106234f3a342855da7de8e20f1aacb8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file harumi-0.4.1-py3-none-any.whl.
File metadata
- Download URL: harumi-0.4.1-py3-none-any.whl
- Upload date:
- Size: 52.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69a56f64778d0845e01b7a86586cc2def263cdf47a812a88a60a0d60614fef1f
|
|
| MD5 |
058aa55f59724e5f64a83abee8cd230a
|
|
| BLAKE2b-256 |
d3ae9c0c8a4be1509cebf7077446b350aafb988c58652fbd49eabbc4e731ab57
|
Provenance
The following attestation bundles were made for harumi-0.4.1-py3-none-any.whl:
Publisher:
release.yml on harumi-io/harumi-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
harumi-0.4.1-py3-none-any.whl -
Subject digest:
69a56f64778d0845e01b7a86586cc2def263cdf47a812a88a60a0d60614fef1f - Sigstore transparency entry: 2467561517
- Sigstore integration time:
-
Permalink:
harumi-io/harumi-cli@29adc2a49106234f3a342855da7de8e20f1aacb8 -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/harumi-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@29adc2a49106234f3a342855da7de8e20f1aacb8 -
Trigger Event:
release
-
Statement type: