chassis

command module
v0.1.0 Latest Latest
Warning

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

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

README

Chassis

Build Release Go Version Go Report Card

A lightweight CLI tool to scaffold project directory structures from layout definition files.

Installation

From Source
go install github.com/pyzamo/chassis@latest
Pre-built Binaries

Download the latest release for your platform from the Releases page.

Usage

Create a project structure in seconds:

chassis build <layout-file> <target-dir>
Arguments
  • <layout-file> - Path to layout definition file (or - for stdin)
  • <target-dir> - Target directory (defaults to current directory)
Options
  • -v, --verbose - Print every path created/skipped
  • --indent <int> - Expected space width for plain-text parser (default: 2)

Layout Formats

Plain-Text Tree
project/
  src/
    main.py
    utils/
      helpers.py
      constants.py
  tests/
    test_main.py
  requirements.txt
  README.md
YAML

Use null for files, {} for empty directories

backend:
  cmd:
    server:
      main.go: null
  internal:
    handlers: {}
    models: {}
  go.mod: null
frontend:
  src:
    App.tsx: null
    index.tsx: null
  package.json: null
JSON
{
  "webapp": {
    "client": {
      "src": {
        "App.tsx": null,
        "index.tsx": null
      },
      "package.json": null
    },
    "server": {
      "main.js": null,
      "package.json": null
    }
  }
}

Examples

Basic Usage
# From a file
chassis build layout.txt my-project

# From stdin
cat layout.yaml | chassis build - my-project

# With verbose output
chassis build -v structure.json app
Real-World Examples

Go Microservice

api:
  cmd:
    server:
      main.go: null
  internal:
    handlers:
      auth.go: null
      user.go: null
    models:
      user.go: null
  go.mod: null
  Dockerfile: null
  README.md: null

Save as microservice.yaml and run:

chassis build microservice.yaml my-service

Python Package

{
  "my_package": {
    "src": {
      "my_package": {
        "__init__.py": null,
        "core.py": null,
        "utils.py": null
      }
    },
    "tests": {
      "test_core.py": null,
      "test_utils.py": null
    },
    "setup.py": null,
    "requirements.txt": null,
    "README.md": null
  }
}

Save as python-package.json and run:

chassis build python-package.json

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
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
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