Build and publish your first context
Have your agent draft the context for your question. You review the definitions before publishing.
Git-managed is the recommended default: your coding agent edits files in a repository. Choose App-managed to edit in Cassis instead.
1. Prepare your workspace
In a git-managed project:
Open your coding agent in an empty folder. Create an API key from your account menu; configure it privately when the agent asks.
Configures this folder and coding agent for future context edits.
Commands behind this step
The CLI reads CASSIS_API_KEY from the environment where it runs. Authentication instructions include a hidden terminal prompt; an agent started elsewhere needs the key in its own environment.
python3 -m venv .venv
source .venv/bin/activate
python -m pip install "cassis-cli~=3.1"
cassis version
# Only if this folder is not a repository:
git init
cassis projects list
cassis context pull --project <project-id>
cassis schema pullExpect cassis/project.yml, cassis/AGENTS.md and cassis/.schema.json. Keep supporting documents outside cassis/; the CLI excludes the schema snapshot from Git.
Configure the agent to use the generated modeling guide for future edits. For Claude Code, a root CLAUDE.md can import it with @cassis/AGENTS.md. Use your agent’s project-instruction mechanism for other clients. Keep that configuration outside cassis/ and confirm the guide is available before drafting.
In an app-managed project:
On Schema, select your first table and choose Model with assistant. Use one domain for the business area, then add the other table. Have your question and supporting documentation ready.
2. Draft and review the context
Fill in your question, tables and existing source files.
In a git-managed project:
Creates a local draft for you to review before publication.
Commands behind this step
cassis context fmt
cassis context check
git diff -- cassis
git status --shortYour agent also shows newly created files, which do not appear in git diff until staged. Format and check use the Cassis API; they do not publish the context. Structural checks do not confirm business meaning.
In an app-managed project:
Give the context Assistant your question, table names and supporting definitions or SQL. Ask it to propose the context and identify missing business rules. Inspect the proposal in Unpublished changes.
Check what each row represents, that the join does not multiply amounts, and that the calculation, filters and dates match your question.
3. Publish the reviewed context
In a git-managed project:
Publishes the reviewed context to your project.
Commands behind publication
For a new project without GitHub App or CI publication, the agent checks and commits the reviewed context, then uploads it. If publishing is already configured, use the existing Git workflow.
cassis context fmt
cassis context check
git add -- cassis
git diff --cached -- cassis
git commit --only -m "Publish reviewed Cassis context" -- cassis
cassis context upload
cassis status --watch The first upload publishes version 1. Each upload replaces the whole context with the committed files. A local repository is enough.
In an app-managed project:
In Versions, review the unpublished changes and choose Publish. Check that version 1 is published.
Your first published version is ready for asking and checking your question.