CLI

Agent Workflows

JSON-first and schema-driven workflows for agents, scripts, and automation

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 a project from a single JSON payload instead of many flags.

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

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

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 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

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

See tristack.jsonc for the file format.

On this page