Skip to main content Link Search Menu Expand Document (external link)

CliApp overview

Added in v1.0.0


Table of contents


constructors

make

Signature

export declare const make: <A>(config: {
  name: string
  version: string
  command: Command<A>
  summary?: Span | undefined
  footer?: HelpDoc | undefined
}) => CliApp<A>

Added in v1.0.0

execution

run

Signature

export declare const run: {
  <R, E, A>(
    args: ReadonlyArray<string>,
    execute: (a: A) => Effect<R, E, void>
  ): (self: CliApp<A>) => Effect<CliApp.Environment | R, ValidationError | E, void>
  <R, E, A>(
    self: CliApp<A>,
    args: ReadonlyArray<string>,
    execute: (a: A) => Effect<R, E, void>
  ): Effect<CliApp.Environment | R, ValidationError | E, void>
}

Added in v1.0.0

models

CliApp (interface)

A CliApp<A> is a complete description of a command-line application.

Signature

export interface CliApp<A> extends Pipeable {
  readonly name: string
  readonly version: string
  readonly command: Command<A>
  readonly summary: Span
  readonly footer: HelpDoc
}

Added in v1.0.0

utils

CliApp (namespace)

Added in v1.0.0

Environment (type alias)

Signature

export type Environment = FileSystem | Path | Terminal

Added in v1.0.0