Install dependencies:
npm install
Run a build:
npm run build
-
Unit tests are executed with:
npm run test:unit
-
Jest is configured via
jest.unit.config.jsto run all*.test.tsfiles under**/__tests__/**. -
Each plugin keeps its own test suite under its
__tests__/directory (for example,src/plugins/account/__tests__/unit/). -
Coverage reports are written to
coverage/unit/.
-
Use ESLint to catch common issues:
npm run lint
-
Automatically fix lint issues where possible:
npm run lint:fix
-
Enforce consistent formatting with Prettier:
npm run format:check npm run format
Please run linting and formatting checks before opening a PR.
Most feature work lives in the built‑in plugins under src/plugins/ (for example, src/plugins/account, src/plugins/token, etc.).
- Follow the structure and patterns described in
PLUGIN_ARCHITECTURE_GUIDE.md. - When you change a plugin’s behaviour or commands, update that plugin’s
README.mdto match and other documentation files if needed. - Add or update tests under the plugin’s
__tests__/directory to cover new or changed behaviour.
The CLI stores per‑plugin state as JSON files under the user‑specific .hiero-cli/state/ directory (see the main README.md for details). For an up‑to‑date description of configuration and state behavior, refer to the Configuration & State Storage section in the root README.md.
- Keep patches focused; unrelated formatting churn makes review harder.
- Prefer small, composable utility helpers when test logic starts repeating (e.g., temp file creation, logger control).
- Run the full unit suite before opening a PR.
- When you change behaviour, add or update tests to cover the new logic.
- Keep documentation in sync with code changes (for example, plugin
README.mdfiles or relevant docs underdocs/).
Open an issue or PR if you see an opportunity to simplify the test setup, improve state handling, or extend configuration validation.