Skip to main content

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>

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).
  • 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

harumi-0.3.1.tar.gz (63.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

harumi-0.3.1-py3-none-any.whl (45.1 kB view details)

Uploaded Python 3

File details

Details for the file harumi-0.3.1.tar.gz.

File metadata

  • Download URL: harumi-0.3.1.tar.gz
  • Upload date:
  • Size: 63.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for harumi-0.3.1.tar.gz
Algorithm Hash digest
SHA256 e60be4d3b6ed521eb92f5f7264e78e580e8a018f7e6d0691cd65336cb47857ae
MD5 8520e9ef07514955810e79f47cf54be3
BLAKE2b-256 70cdb4b6720d2d77302d49a4b1a2648c60d5db3cbd6523cf4fe76e680423291f

See more details on using hashes here.

Provenance

The following attestation bundles were made for harumi-0.3.1.tar.gz:

Publisher: release.yml on harumi-io/harumi-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file harumi-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: harumi-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 45.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for harumi-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c3e8653d16889c96a261cf19e0b69aaac7c33d18ff6a5c79fe6e109ec261fb79
MD5 092c1c82afb029a050d81027ee7a3f10
BLAKE2b-256 0895b4d0d4a22ba1d900590cd5d006860b8f7c6c2429c7f63a4ec65be1a2b04c

See more details on using hashes here.

Provenance

The following attestation bundles were made for harumi-0.3.1-py3-none-any.whl:

Publisher: release.yml on harumi-io/harumi-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.4.1

2 files

0.3.2

2 files

This release

0.3.1 This release

2 files

0.3.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page