---
name: appspec
appspec: { version: 0.001 }
title: Utilities for spec files for App::Spec cli apps
class: App::AppSpec
markup: pod
description: |
  This script is a collection of tools for authors of L<App::Spec> command line
  scripts.

    # generate completion
    % appspec completion --bash path/to/spec.yaml
    # generate pod
    % appspec pod path/to/spec.yaml
    # validate your spec file
    % appspec validate path/to/spec.yaml
    # generate a new App::Spec app skeleton
    % appspec new --class App::foo --name foo --with-subcommands
options: []

subcommands:
  completion:
    summary: Generate completion for a specified spec file
    description: |
      This command takes a spec file and outputs the corresponding
      shell script for tab completion.
    op: cmd_completion
    options:
    - name=s --name of the program (optional, override the value from the spec)
    - zsh --for zsh
    - bash --for bash
    parameters:
    - &param_spec_file
      +spec_file= +file --Path to the spec file (use '-' for standard input)

  new:
    summary: Create new app
    op: cmd_new
    description: |
      This command creates a skeleton for a new app.
      It will create a directory for your app and write a skeleton
      spec file.

      Example:

        appspec new --name myprogram --class App::MyProgram App-MyProgram

    parameters:
      - path= +dirname --Path to the distribution directory (default is 'Dist-Name' in current directory)
    options:
    - +name|n=s --The (file) name of the app
    - +class|c=s --The main class name for your app implementation
    - overwrite|o --Overwrite existing dist directory
    - with-subcommands|s --Create an app with subcommands

  pod:
    summary: Generate pod
    description: |
      This command takes a spec file and outputs the generated pod
      documentation.
    op: generate_pod
    parameters:
    - *param_spec_file

  validate:
    summary: Validate spec file
    description: |
      This command takes a spec file and validates it against the current
      L<App::Spec> schema.
    op: cmd_validate
    parameters:
    - *param_spec_file
    options:
    - color|C --output colorized

# vim:et:sts=2:sws=2:sw=2:foldmethod=indent