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. When it starts the CLI sign-in, open the URL it shows, enter the code, and approve access in your browser. An API key configured privately in the agent’s environment works too.
Configures this folder and coding agent for future context edits.
Commands behind this step
cassis login --no-browser prints a URL and a short code: open the URL on your own computer and approve access. The login needs a credential store where the CLI runs. Without one, the CLI reads CASSIS_API_KEY from its environment; the authentication instructions cover both.
python3 -m venv .venv
source .venv/bin/activate
python -m pip install "cassis-cli~=3.1"
cassis version
cassis login --no-browser
# 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.