---
title: "Get setup"
method: GET
path: "/v1/projects/{projectId}/setup"
tags: ["setup"]
---

# Get setup

`GET /v1/projects/{projectId}/setup`

Get Setup used for future project runs. Setup contains VM size, three automatic repository scripts, opt-in Commands, terminals, previews, and pre/post tool hooks. Environment variables are configured separately.

## Path parameters

- `projectId` string, required

## Response `200`

Success

- Setup
  - `source` 'legacy' | 'setup' | 'none', required
  - `legacyHooks` object, required
    - `status` 'active' | 'ignored' | 'none', required
    - `repositories` string[], required
    - `checkComplete` boolean, required
  - `setup` object, required
    - `vmSize` 'small' | 'medium' | 'large' | 'ultra' | 'hyper'
    - `repositories` object[], required
      - `repository` string, required
      - `branch` string, required
      - `scripts` object, required
        - `initialize` string, nullable, required
        - `updateAfterCheckout` string, nullable, required
        - `startup` string, nullable, required
      - `timeouts` object
        - `initialize` integer
        - `updateAfterCheckout` integer
        - `startup` integer
      - `commands` object[], required
        - `name` string, required
        - `command` string, required
    - `hooks` object
      - `pre` object — Commands to run BEFORE a tool executes. Keys are tool names (bash_run, edit, write, etc.), values are arrays of shell commands or objects with commands and agents filter
      - `post` object — Commands to run AFTER a tool executes. Keys are tool names, values are arrays of shell commands or objects with commands and agents filter. Can use ${variable} interpolation from tool args/results
      - `context` object
        - `maxOutputLength` integer — Maximum characters of hook output to include in context (default: 2000)
        - `truncateStrategy` 'head' | 'tail' | 'middle' — How to truncate output exceeding maxOutputLength: 'head' keeps start, 'tail' keeps end, 'middle' keeps both ends

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `422` — Validation error
- `500` — Internal error

---

[API](https://skmtc.dev/capy/apis/capy-api.md) · [All operations](https://skmtc.dev/capy/apis/capy-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/capy/capy-api/revisions/c9ea28cb32b6/schema)
