Python CLI for interacting with a Huly workspace from the terminal.
This repo is currently a Python typer CLI, not a Node or pnpm project.
It has been checked against hcengineering/platform@v0.6.504 and smoke-tested against
https://huly.example.com workspace my-ws.
What is verified today:
- Authentication flow via
/_accounts - Read access for projects, issues, components, documents, templates, members, labels, and issue descriptions
- Live CRUD for issues, documents, components, and milestones on
https://huly.example.comworkspacemy-ws - Live template description update and restore flow
- Workspace-specific issue status display and status filtering
- Local unit/CLI test suite
- CI-equivalent local checks:
uv sync --extra dev,uv run ruff check .,uv run ruff format --check .,uv run pytest tests/ -v,uv run python -m build, anduv run twine check dist/*
What is not fully verified yet:
- Automated live-workspace CI has not been added
- You should still prefer a disposable project or disposable teamspace for release-time live smoke tests
Known live compatibility gaps at the time of writing:
- No known read-path breakage remains from the
v0.6.504comparison and smoke tests - No known CLI CRUD gap remains on the currently implemented issue, document, component, and milestone surfaces
- The test suite now patches auth correctly; it no longer depends on a developer's local cached login state
- Huly platform tag:
v0.6.504 - Example workspace URL used during verification:
https://huly.example.com/workbench/my-ws/tracker/PROJECT_ID/issues
Important distinction:
my-wsis the workspace slugDEMOis the project identifier in that workspace
If you run huly issues list --project MY-WS, it will fail because MY-WS is not a project ID.
- Python
3.11+ uv(only needed for source-checkout development)- A Huly account with access to the target workspace
Use this if you only want the CLI and are not modifying the source:
pip install huly-cli
huly --helpUpgrade an existing install:
pip install --upgrade huly-cliThe package name is huly-cli. The executable is huly.
If huly is not found after installing, the install directory may not be on your
PATH. Common fixes:
# Check where pip installed it
python -m site --user-base
# Typical paths to add:
# macOS/Linux: ~/.local/bin
# Windows: %APPDATA%\Python\PythonXY\Scripts
# macOS / Linux — add to your shell profile (~/.zshrc, ~/.bashrc, etc.):
export PATH="$HOME/.local/bin:$PATH"
# Or install with pipx, which handles PATH automatically:
pipx install huly-cliUse this if you are developing in this repository:
- Install dependencies, including dev tools:
uv sync --extra dev- Copy the example environment file:
cp .env.example .env- Edit
.envwith at least:
HULY_URLHULY_WORKSPACE
- Choose one auth approach:
- Interactive login: preferred for local use
- Environment-based login: useful for non-interactive runs and token refresh
The CLI loads config in this order:
- CLI flags
- Environment variables
.envin the current directory~/.config/huly/config.toml
Supported variables:
HULY_URLHULY_WORKSPACEHULY_EMAILHULY_PASSWORD
Auth cache location:
- Config:
~/.config/huly/config.toml - Tokens:
~/.config/huly/auth.json
The token cache is reused automatically. If the cached token expires, the CLI needs
HULY_EMAIL and HULY_PASSWORD available in order to re-authenticate automatically.
Source checkout? Replace
hulybelow withuv run huly.
This is the simplest flow if you are testing locally and do not want to keep your password
in .env.
huly --url https://huly.example.com --workspace my-ws auth loginYou will be prompted for:
- Password
- Workspace slug, if it was not passed on the command line or set in
.env
Then confirm auth is valid:
huly auth statusPut all four values in .env:
HULY_URL=https://huly.example.com
HULY_WORKSPACE=my-ws
HULY_EMAIL=you@example.com
HULY_PASSWORD=your-passwordThen run:
huly auth login
huly auth statusThis repo includes a Codex skill for agents that need to install or operate the CLI:
- skill path:
skills/huly-cli - explicit invocation:
$huly-cli
If you want to install that skill into a Codex skills directory outside this
repo, copy or symlink it into ${CODEX_HOME:-$HOME/.codex}/skills:
mkdir -p "${CODEX_HOME:-$HOME/.codex}/skills"
ln -s "$(pwd)/skills/huly-cli" "${CODEX_HOME:-$HOME/.codex}/skills/huly-cli"If you prefer a copy instead of a symlink:
mkdir -p "${CODEX_HOME:-$HOME/.codex}/skills"
cp -R skills/huly-cli "${CODEX_HOME:-$HOME/.codex}/skills/"Source checkout? Replace
hulybelow withuv run huly. The repo also has an automated smoke runner:uv run python scripts/live_smoke.py(add--allow-writesfor CRUD checks with automatic cleanup).
- Confirm auth:
huly auth status- List projects:
huly projects list- Inspect a project:
huly projects get DEMO- List a few issues from that project:
huly issues list --project DEMO --limit 5- Inspect one issue:
huly issues get DEMO-1- Read the issue description:
huly issues describe DEMO-1- List project components:
huly components list --project DEMO --limit 5- Inspect a component by internal ID:
huly components get COMPONENT_ID- List a few documents:
huly documents list --limit 5- List issue templates:
huly templates list --limit 5- Verify status filtering:
huly issues list --status backlog --limit 5- List workspace members:
huly members list- List labels:
huly labels listIf you want machine-readable output for quick inspection:
huly --json projects list
huly --json issues list --project DEMO --limit 5
huly --json auth statusThe CLI write paths were exercised live during verification, but you should still prefer a disposable project or disposable teamspace when doing release-time smoke tests against a real workspace.
Run the unit and CLI regression tests with:
uv run --extra dev pytest -qExpected result at the time of verification:
155 passed
The package is published on PyPI as huly-cli.
Install it with:
pip install huly-cliThe repo also builds a wheel and sdist cleanly and CI validates the distribution metadata.
For the maintainer release checklist and publisher configuration notes, see RELEASE.md.
Top-level help:
huly --helpAuth help:
huly auth login --helpMIT