Author with Claude Code
Let a coding agent pull your Hashi model, change it, test it and open a Proposal with hashictl. A person approves the change.
Updated
A coding agent can write your semantic model YAML. hashictl gives it a safe way to do that. The agent never writes the Draft. It opens a Proposal, and an editor approves it in Studio.
login -> model pull -> (agent edits) -> validate -> test -> diff -> propose
|
editor approves in Studio
Install the skills and the CLI
In Claude Code, add the Hashi plugin:
/plugin marketplace add datahashi/agent-skills
/plugin install hashi@datahashi
For Cursor or another agent, copy the folders under skills/ from datahashi/agent-skills to where your agent reads skills.
The skills call hashictl. Download it from the Releases of the same repository: hashictl_<tag>_<os>_<arch>.tar.gz (.zip on Windows), with a checksums file. Put the binary on your PATH.
Sign in
hashictl login --url http://localhost:8080 --email you@example.com
Hashi sends a login code to your email. In a local community install the code is in the server log. The CLI stores the session in ~/.config/hashictl/config.json, readable only by you. For an agent running in CI, set HASHI_URL, HASHI_TOKEN and HASHI_TENANT instead.
Change the model
hashictl model pull --dir model # copy the Draft into ./model
# ask your agent to edit model/entities/order.yaml
hashictl validate --dir model # compile on the server; writes nothing
hashictl test --dir model # would publish refuse this edit?
hashictl diff --dir model # what changed against the Draft
hashictl propose --dir model --title "Add peak_order_share"
validate prints one line per problem: severity, file and line, a stable code, and a message. It exits with 1 when there is an error, so an agent can loop until it is clean.
test sends your folder to the server, which checks it the way a publish would. It reports:
- model tests that fail, with the rows that differ;
- evals that passed on the published model and fail now (hosted plans; the community edition skips evals);
- members you removed that stored dashboards or threads still use.
It writes nothing and exits with 1 when a publish would refuse the change.
hashictl query --json '{...}' runs a governed query as you, so the agent can check a number.
Move in from dbt and other tools
hashictl import --format metricflow --file semantic_models.yml
hashictl bootstrap --dbt target/manifest.json
import also reads ossie, snowflake, databricks and cube. Both commands open a Proposal and print what did not carry over. After an editor approves it, the agent pulls the model and maps the rest by hand.
Publish
Publishing is a person’s decision. hashictl publish --yes works only for an owner or editor, and it refuses a Draft that does not compile.
The skills
| Skill | Use it to |
|---|---|
hashi-add-metric |
add a measure or a governed metric |
hashi-add-dimension |
add a column, a calculated field or a time grain |
hashi-add-rollup |
pre-aggregate a hot query |
hashi-fix-model |
fix validate errors, a failing model test, a lost eval or a removed member |
hashi-write-evals |
add agent evals to model.yaml |
hashi-import-dbt |
move a dbt semantic layer into Hashi |
hashi-debug-query |
find why a query returns the wrong rows or is refused |
In Claude Code they show as /hashi:hashi-add-metric and so on, but you rarely call them by name. Ask:
Add a metric for the share of revenue from the largest order, and open a Proposal.
The agent picks the skill. It pulls the model, edits it, validates and tests it, and proposes it.