Integrate

Run Crystal Code from a script or CI job, drive it from an editor or another program, or reference the engine from a front end of your own.

crystal server

Serve one session over HTTP. Open the recommended Crystal Code Web front end, then enter your server address and token. Your server requires a token by default.

Open Crystal Code Web

Set up a server for browser access

crystal web

Serve the session API and a browser front end together from your machine. Use the front end supplied by the installer or provide your own.

Set up Web mode

Run one task

crystal run runs one task and exits. Use it from a script or from CI. On Windows the command is CrystalCode.

Shell
crystal run --workspace . "Fix the failing test."

GitHub Actions

crystal run needs no terminal, so a workflow can install Crystal Code, give it a task, and fail the job when the turn exits non-zero.

For a direct run without the integration package, the workflow below installs Crystal Code and gives it one task. Keep the provider key in repository secrets. It calls CrystalCode directly because a CI runner does not load the installer's shell alias.

GitHub Actions
name: Crystal Code review
on: pull_request
permissions:
  contents: read
jobs:
  review:
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - uses: actions/checkout@v4
      - name: Install Crystal Code
        run: |
          curl --fail --location --show-error https://crystalcode.ink/install.sh | sh -s -- --skip-web
          echo "$HOME/.crystal/binaries/code" >> "$GITHUB_PATH"
      - name: Review changes
        env:
          DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}
        run: |
          CrystalCode run --workspace . --workspace-trust off \
            --plan --duration 600 \
            "Review the changes on this branch and list the risks."

The example uses --plan for a read-only review, and --workspace-trust off because a CI directory cannot answer the trust prompt. It does not record the directory as trusted.

Headless run in the user guide

Provider credentials in the user guide

Work from your editor

An editor that speaks the Agent Client Protocol, such as Zed, can start Crystal Code and drive a session from its own agent panel. Approval and the workspace boundary stay with Crystal Code.

Bridge in the user guide

Build on the engine

The engine is a library. Another front end references it and does not copy it. You bring the model endpoint.