Secure, scriptable CLI for Amazon Bedrock Claude models via the AWS Strands Agents SDK.
Project description
haru-cli
A secure, scriptable command line interface for interacting with Amazon Bedrock Claude models through governed, observable, multi-agent workflows. haru-cli is a thin, functional orchestration layer over the AWS Strands Agents SDK, talking to Bedrock through the Converse API with streaming, tool use, MCP client support, multi-agent orchestration, session persistence, OpenTelemetry observability, and Bedrock Guardrails.
Requirements
- Python 3.13+ (tested on 3.13 and 3.14)
- uv
- AWS access via IAM Identity Center (SSO)
Install
pipx install haru-cli
Or from a clone:
uv sync
Commands
| Command | Purpose |
|---|---|
haru config init |
Create a starter configuration (interactive) |
haru config show |
Show the resolved configuration (no secrets) |
haru login |
Browser sign-in to IAM Identity Center (OAuth 2.0 + PKCE) |
haru chat |
Interactive streaming chat REPL |
haru chat --session-id <id> |
Persist and restore the conversation under a session id |
haru chat --agent <name> |
Chat with a specific configured agent |
haru run "<prompt>" |
One-shot prompt; prints the answer and exits |
haru agents |
List configured agents (model, prompt, tools, MCP) |
haru session list |
List stored session ids |
haru --version |
Print the installed version |
Configuration is resolved from --config, then $HARU_CONFIG, then
./config/haru.yaml, then ~/.config/haru/haru.yaml.
Inside haru chat, slash commands switch targets mid-session:
| REPL command | Purpose |
|---|---|
/help |
Show REPL commands |
/model |
List configured models (default and active marked) |
/model <name> |
Switch the default agent to that model (resets the chat) |
/agent |
List configured agents |
/agent <name> |
Switch to that agent (resets the chat) |
Quickstart
haru config init # writes ~/.config/haru (asks for your SSO start URL)
export HARU_AWS_ACCOUNT_ID=<your AWS account id>
haru login
haru run "Summarise the Converse API in two sentences."
haru chat --agent supervisor --session-id demo
Authentication uses the same PKCE authorization-code flow as aws sso login,
caching tokens in the botocore-compatible schema under ~/.aws/sso/cache
(0600) so standard AWS tooling can consume and refresh the same cache. Access
tokens are refreshed automatically; when a fresh login is needed, commands say
so plainly.
Configuration
Declarative YAML under config/ — models, agents, orchestration
(supervisor/swarm/graph), MCP servers, guardrails, sessions, logging, and
OpenTelemetry. No secrets in YAML: values reference environment variables with
${env:VAR}. See docs/configuration.md.
Development
All quality gates must pass before a change is considered done:
uv run ruff check
uv run ruff format
uv run mypy src
uv run pytest
Coverage is gated at 90% (--cov-fail-under=90). CI runs the full gate set on
Python 3.13 and 3.14; releases are built with uv build and published to PyPI
via Trusted Publishing on v* tags.
Install the pre-commit hooks once per clone:
uv tool run pre-commit install
Project layout
src/haru/— the package (auth, config, models, agents, tools, steering, sessions, observability, commands)config/— declarative YAML configuration and steering promptstests/unit,tests/integration— pytest suites (coverage gate: 90%).kiro/steering/— authoritative engineering steering documents
License
Apache-2.0. See LICENSE.
Project details
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 haru_cli-0.1.1.tar.gz.
File metadata
- Download URL: haru_cli-0.1.1.tar.gz
- Upload date:
- Size: 183.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db2c0bcecdfbd90775923104a0563ce4ad7db0a5b0f2fb06401f3f38048fd715
|
|
| MD5 |
48ab72ebcf60c7fc11399046ceeed863
|
|
| BLAKE2b-256 |
41a49ce7c410cfcc4ecd925f9c28d7e2722973366365abff998ddd00ba9bb98f
|
Provenance
The following attestation bundles were made for haru_cli-0.1.1.tar.gz:
Publisher:
release.yml on SCGIS-Wales/haru-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
haru_cli-0.1.1.tar.gz -
Subject digest:
db2c0bcecdfbd90775923104a0563ce4ad7db0a5b0f2fb06401f3f38048fd715 - Sigstore transparency entry: 2255816129
- Sigstore integration time:
-
Permalink:
SCGIS-Wales/haru-cli@606293f3a7092417bd8a9c307c9b655c0e8c0a98 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/SCGIS-Wales
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@606293f3a7092417bd8a9c307c9b655c0e8c0a98 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file haru_cli-0.1.1-py3-none-any.whl.
File metadata
- Download URL: haru_cli-0.1.1-py3-none-any.whl
- Upload date:
- Size: 45.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c092b0321ee1cf58a0a1bdddc89591199baf94155faff85e222e8a3b7126c9a
|
|
| MD5 |
2b0c7b527ccdf39d3ae7d6ac0fa1b93c
|
|
| BLAKE2b-256 |
bf82ab63651fe0cba7b1768d3cf22277998684554ba68a6b10c6317de6a473a4
|
Provenance
The following attestation bundles were made for haru_cli-0.1.1-py3-none-any.whl:
Publisher:
release.yml on SCGIS-Wales/haru-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
haru_cli-0.1.1-py3-none-any.whl -
Subject digest:
3c092b0321ee1cf58a0a1bdddc89591199baf94155faff85e222e8a3b7126c9a - Sigstore transparency entry: 2255816148
- Sigstore integration time:
-
Permalink:
SCGIS-Wales/haru-cli@606293f3a7092417bd8a9c307c9b655c0e8c0a98 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/SCGIS-Wales
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@606293f3a7092417bd8a9c307c9b655c0e8c0a98 -
Trigger Event:
workflow_dispatch
-
Statement type: