chassis

command module
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2025 License: MIT Imports: 1 Imported by: 0

README

Chassis

Build Release Go Version Go Report Card

Scaffold project directory structures from layout definition files.

Installation

go install github.com/pyzamo/chassis@latest

Or download from releases.

Usage

# Build from layout file
chassis build layout.txt my-project

# Analyze existing project (requires GEMINI_API_KEY env var)
chassis analyze ./existing-project > template.txt
chassis build template.txt new-project

# From stdin
echo -e "src/\n  main.go" | chassis build - .

Commands

build

Creates directory structure from a layout file.

chassis build <layout-file> [target-dir]
  • Supports plain text (indented), YAML, and JSON formats
  • Auto-detects format from file extension
  • Skips existing files/directories
analyze

Extracts project structure into a reusable template using AI.

chassis analyze <source> [--format tree|yaml|json] [--max-depth N]
  • Works with local directories or GitHub repos
  • Filters out common artifacts (node_modules, .git, etc.)
  • Requires GEMINI_API_KEY environment variable

Layout Formats

Plain Text
project/
  src/
    main.go
    utils/
  tests/
  go.mod
YAML
project:
  src:
    main.go: null
    utils: {}
  tests: {}
  go.mod: null
JSON
{
  "project": {
    "src": {
      "main.go": null,
      "utils": {}
    },
    "tests": {},
    "go.mod": null
  }
}

Example Workflow

# Analyze and recreate a Go project structure
export GEMINI_API_KEY='your-key'  # Get from https://aistudio.google.com/app/apikey
chassis analyze https://github.com/gin-gonic/gin --max-depth 2 > gin.txt
chassis build gin.txt my-gin-app

# Quick scaffolding
cat > layout.yaml << EOF
backend:
  cmd:
    server:
      main.go: null
  internal:
    handlers: {}
    models: {}
  go.mod: null
frontend:
  src:
    App.tsx: null
  package.json: null
EOF
chassis build layout.yaml my-fullstack-app

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
ai
Package ai provides AI integration for analyzing and extracting project skeletons
Package ai provides AI integration for analyzing and extracting project skeletons
analyze
Package analyze provides functionality for analyzing directory structures
Package analyze provides functionality for analyzing directory structures
fsutil
Package fsutil provides filesystem utility functions
Package fsutil provides filesystem utility functions
generate
Package generate handles creation of the actual filesystem structure
Package generate handles creation of the actual filesystem structure
github
Package github provides GitHub repository analysis functionality
Package github provides GitHub repository analysis functionality
parse
Package parse handles parsing of various layout file formats
Package parse handles parsing of various layout file formats
validate
Package validate handles validation of the parsed tree structure
Package validate handles validation of the parsed tree structure

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL