# Trellis:init

> Initialize a project for Trellis by creating trellis.json, the specs directory, and guidelines. Use when setting up Trellis for the first time.

- Skill: `robmclarty/trellis-init` (Agent Skill)
- Install (CLI): `npx skillmds@latest add robmclarty/trellis-init`
- Raw SKILL.md: https://api.skillmd.com/api/skills/robmclarty/trellis-init/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: robmclarty (https://skillmd.com/u/robmclarty)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/robmclarty/trellis-init

---


# Init

## When to use

- "initialize trellis", "set up trellis", "init"
- First time using Trellis in a project

Initialize a project for Trellis by creating `trellis.json` and the specs directory, then run `/trellis:guidelines` to establish project guidelines.

**Recommended effort: minimal.** Single question, two file operations, then hand off to guidelines.

## Behavior

Check whether `trellis.json` exists at the project root.

### If `trellis.json` does not exist

Ask the user: "Where should Trellis store spec artifacts? The default is `.specs/` — press Enter to accept or provide a custom path (e.g., `docs/specs`, `design`)."

Write their choice (or the default) to `trellis.json` at the project root:

```json
{
  "specsDir": ".specs"
}
```

Create the specs directory if it doesn't exist.

Confirm to the user: "Trellis initialized — specs directory set to `<specsDir>/`."

### If `trellis.json` already exists

Read `specsDir` from it. Confirm to the user: "Trellis is already initialized — specs directory is `<specsDir>/`."

Create the specs directory if it doesn't exist.

Do not re-ask or overwrite.

## Next step

After `trellis.json` and the specs directory are in place, run the `/trellis:guidelines` skill to create or update project guidelines.

