Skip to main content

Local setup

Install dependencies with Poetry:
poetry install
poetry run hevn --help
Run commands against a selected environment:
poetry run hevn --env dev account get
poetry run hevn --env local login

Tests and lint

Run tests:
poetry run pytest
Run lint:
poetry run ruff check .

Build

Build source and wheel distributions:
poetry build
Smoke test a local wheel:
pipx install dist/hevn_cli-0.1.0-py3-none-any.whl
hevn --help
Local wheel installs are useful for smoke testing, but they are not a good long-term pipx source because pipx upgrade hevn-cli reinstalls from the same local artifact.

Publishing

PyPI publishing is handled by the Publish to PyPI GitHub Actions workflow. Run it manually from main. The workflow:
  • runs lint and tests,
  • checks hevn --help on Ubuntu, macOS, and Windows,
  • builds the package once from Ubuntu,
  • publishes to PyPI with trusted publishing.
Configure the PyPI trusted publisher for:
FieldValue
Ownerhevn
Repositoryhevn-cli
Workflow.github/workflows/publish-pypi.yml
Environmentpypi

Homebrew formula guidance

The Homebrew formula should install the PyPI package inside Homebrew’s isolated Python virtualenv. Do not shell out to system pip install hevn-cli from the formula.
class HevnCli < Formula
  include Language::Python::Virtualenv

  desc "Command-line client for the HEVN backend API and MCP transfers"
  homepage "https://github.com/hevn/hevn-cli"
  url "https://files.pythonhosted.org/packages/source/h/hevn-cli/hevn_cli-0.1.0.tar.gz"
  sha256 "<sha256>"
  license "MIT"

  depends_on "python@3.12"

  def install
    virtualenv_install_with_resources
  end

  test do
    assert_match "HEVN backend CLI", shell_output("#{bin}/hevn --help")
  end
end