Skip to content

Getting Started

llms.txt lists every page for an agent
Optional: hand this page to your coding agentThe steps work by hand too.
Show the whole prompt
Read https://intentius.io/chant/lexicons/github/getting-started/.
In this repository, install `@intentius/chant` and `@intentius/chant-lexicon-github`, write the workflow from the page in `src/ci.ts`, and run `npx chant build src/ --output .github/workflows/ci.yml` and `npx chant lint src/`.
Open a pull request with the source and the generated workflow.
Never deploy to a real cloud account or shared environment (with `chant run`, `chant components` or a platform's own CLI), approve (a pull request review, `chant approve` or `chant run approve`), override a policy denial (`chant approve policy-override`), or merge; never cut or publish a release (`chant release cut --yes` or `chant release publish`), push or delete a `ci/*` tag (`chant ci tick` pushes them), or change the value of an existing flag; never touch `.chant/allowed_signers` or `chant/lifecycle`.
Terminal window
mkdir my-project && cd my-project
npm init -y
npm install --save-dev @intentius/chant @intentius/chant-lexicon-github typescript

Create src/ci.ts:

quickstart.ts
import { Workflow, Job, Step, Checkout, SetupNode } from "@intentius/chant-lexicon-github";
export const workflow = new Workflow({
name: "CI",
on: {
push: { branches: ["main"] },
pull_request: { branches: ["main"] },
},
permissions: { contents: "read" },
});
export const buildJob = new Job({
"runs-on": "ubuntu-latest",
timeoutMinutes: 15,
steps: [
Checkout({}).step,
SetupNode({ nodeVersion: "22", cache: "npm" }).step,
new Step({ name: "Install", run: "npm ci" }),
new Step({ name: "Build", run: "npm run build" }),
new Step({ name: "Test", run: "npm test" }),
],
});
Terminal window
chant build src/ --output .github/workflows/ci.yml

This produces .github/workflows/ci.yml:

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: '22'
cache: npm
- name: Install
run: npm ci
- name: Build
run: npm run build
- name: Test
run: npm test
Terminal window
chant lint src/

Lint reports missing timeouts, hardcoded secrets, raw expression strings and more. See the Lint Rules page for the full list.

Commit the generated YAML and push:

Terminal window
git add .github/workflows/ci.yml
git commit -m "Add CI workflow"
git push

GitHub runs every .github/workflows/*.yml file on its configured triggers.

  • Workflow Concepts — resource types, triggers, permissions
  • Expressions — typed expression system and condition helpers
  • Composites — pre-built action wrappers (Checkout, SetupNode, etc.)
  • Lint Rules — 13 lint rules and 45 post-synth checks

chant