# Agent Workflows (/docs/cli/agent-workflows)



## Overview [#overview]

TriStack supports a JSON-first workflow for agents and automation:

* Raw JSON project creation with `create-json`
* Safe planning with `--dry-run`
* Runtime validation with the same Zod schemas that back interactive mode

If you are automating the CLI from an LLM, CI job, or another tool, start here instead of the interactive prompt flow.

## `create-json` [#create-json]

Create a project from a single JSON payload instead of many flags.

```bash
uvx tristack create-json --input '{
  "projectName": "my-api",
  "language": "python",
  "framework": "fastapi",
  "frontend": "htmx",
  "orm": "sqlmodel",
  "migrations": "alembic",
  "database": "postgres",
  "packageManager": "uv",
  "addons": ["docker", "ruff", "pytest"],
  "git": true,
  "install": false
}'
```

This is the best path when:

* Your input already exists as structured data
* You want to avoid shell flag expansion issues
* You are an agent building a payload programmatically

The input is validated against `CreateInputSchema` (strict mode). Unknown keys are rejected, so keep the payload to the documented fields:

* `projectName`, `yes`, `yolo`, `dryRun`, `verbose`
* `language`, `framework`, `frontend`, `orm`, `migrations`, `database`, `packageManager`, `addons`
* `git`, `install`
* `directoryConflict`, `disableAnalytics`

## Dry Runs [#dry-runs]

Use `--dry-run` (or `dryRun: true`) to validate inputs and target directories without writing files.

```bash
uvx tristack --yes --dry-run
uvx tristack create-json --input '{
  "projectName": "my-api",
  "yes": true,
  "dryRun": true
}'
```

This is especially useful for:

* Planning actions before mutation
* CI validation
* Agent reasoning loops

## Native agent plugin (later phase) [#native-agent-plugin-later-phase]

Native Claude Code / Codex plugins are scheduled for a later phase. Until then, any CLI-capable agent can drive TriStack through `create-json`.

## Stored in `tristack.jsonc` [#stored-in-tristackjsonc]

Every generated project records its stack in `tristack.jsonc`, including the `reproducibleCommand` that reproduces the exact setup.

See [`tristack.jsonc`](/docs/tristack-config) for the file format.
