# internal/adapters/cli

Package cli is the scafld command line. Run parses a command and its flags, runs the matching lifecycle service, writes its output and returns the process exit code.

## ExitSuccess

```go
const (
	ExitSuccess    = 0
	ExitGeneric    = 1
	ExitInvalid    = 2
	ExitValidation = 3
	ExitReview     = 4
	ExitCancelled  = 5
	ExitWorkspace  = 6
)
```

## ExitGeneric

```go
const (
	ExitSuccess    = 0
	ExitGeneric    = 1
	ExitInvalid    = 2
	ExitValidation = 3
	ExitReview     = 4
	ExitCancelled  = 5
	ExitWorkspace  = 6
)
```

## ExitInvalid

```go
const (
	ExitSuccess    = 0
	ExitGeneric    = 1
	ExitInvalid    = 2
	ExitValidation = 3
	ExitReview     = 4
	ExitCancelled  = 5
	ExitWorkspace  = 6
)
```

## ExitValidation

```go
const (
	ExitSuccess    = 0
	ExitGeneric    = 1
	ExitInvalid    = 2
	ExitValidation = 3
	ExitReview     = 4
	ExitCancelled  = 5
	ExitWorkspace  = 6
)
```

## ExitReview

```go
const (
	ExitSuccess    = 0
	ExitGeneric    = 1
	ExitInvalid    = 2
	ExitValidation = 3
	ExitReview     = 4
	ExitCancelled  = 5
	ExitWorkspace  = 6
)
```

## ExitCancelled

```go
const (
	ExitSuccess    = 0
	ExitGeneric    = 1
	ExitInvalid    = 2
	ExitValidation = 3
	ExitReview     = 4
	ExitCancelled  = 5
	ExitWorkspace  = 6
)
```

## ExitWorkspace

```go
const (
	ExitSuccess    = 0
	ExitGeneric    = 1
	ExitInvalid    = 2
	ExitValidation = 3
	ExitReview     = 4
	ExitCancelled  = 5
	ExitWorkspace  = 6
)
```

## Run

```go
func Run(ctx context.Context, args []string, stdout io.Writer, stderr io.Writer) int
```
