← ZIO Cli docs

Options

zio.cli.Options
See theOptions companion trait
object Options

Attributes

Companion
trait
Source
Options.scala
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Options.type

Members list

Type members

Classlikes

final case class Both[A, B](left: Options[A], right: Options[B]) extends Options[(A, B)]

Attributes

Source
Options.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Options[(A, B)]
class Object
trait Matchable
class Any
Show all
case object Empty extends Options[Unit]

Attributes

Source
Options.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Options[Unit]
class Object
trait Matchable
class Any
Show all
Self type
Empty.type
final case class KeyValueMap(argumentOption: Single[String]) extends Options[Map[String, String]]

Attributes

Source
Options.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
final case class Map[A, B](value: Options[A], f: A => Either[ValidationError, B]) extends Options[B]

Attributes

Source
Options.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Options[B]
class Object
trait Matchable
class Any
Show all
final case class OAuth2Options(provider: OAuth2Provider, scope: List[String], auxiliaryOptions: Options[OAuth2AuxiliaryOptions]) extends Options[OAuth2Token]

Attributes

Source
Options.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class OrElse[A, B](left: Options[A], right: Options[B]) extends Options[Either[A, B]]

Attributes

Source
Options.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Options[Either[A, B]]
class Object
trait Matchable
class Any
Show all
final case class Single[+A](name: String, aliases: Vector[String], primType: PrimType[A], description: HelpDoc = ..., pseudoName: Option[String] = ...) extends Options[A]

Attributes

Source
Options.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Options[A]
class Object
trait Matchable
class Any
Show all
Self type
Single[A]
final case class WithDefault[A](options: Options[A], default: A) extends Options[A]

Attributes

Source
Options.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Options[A]
class Object
trait Matchable
class Any
Show all

Inherited and Abstract types

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
Source
Mirror.scala

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

def boolean(name: String, ifPresent: Boolean = ...): Options[Boolean]

Creates a boolean flag with the specified name, which, if present, will produce the specified constant boolean value.

Creates a boolean flag with the specified name, which, if present, will produce the specified constant boolean value.

Attributes

Source
Options.scala
def boolean(name: String, ifPresent: Boolean, negationName: String, negationNames: String*): Options[Boolean]

Creates a boolean flag with the specified name, which, if present, will produce the specified constant boolean value. Negation names may be specified to explicitly invert the boolean value of this option.

Creates a boolean flag with the specified name, which, if present, will produce the specified constant boolean value. Negation names may be specified to explicitly invert the boolean value of this option.

Attributes

Source
Options.scala
def boolean(name: String, alias: String, ifPresent: Boolean, negationName: String, negationNames: String*): Options[Boolean]

Creates a boolean flag with the specified name, which, if present, will produce the specified constant boolean value. Negation names may be specified to explicitly invert the boolean value of this option. An alias might be specified to substitute the name.

Creates a boolean flag with the specified name, which, if present, will produce the specified constant boolean value. Negation names may be specified to explicitly invert the boolean value of this option. An alias might be specified to substitute the name.

Attributes

Source
Options.scala

Creates a parameter expecting a decimal number.

Creates a parameter expecting a decimal number.

Attributes

Source
Options.scala
def duration(name: String): Options[Duration]

Creates a parameter excepting a date-based amount of time in the ISO-8601 format, such as 'P1DT2H3M'.

Creates a parameter excepting a date-based amount of time in the ISO-8601 format, such as 'P1DT2H3M'.

Attributes

Source
Options.scala
def enumeration[A](name: String)(cases: (String, A)*): Options[A]

Creates a parameter accepting one valye from set of allowed elements.

Creates a parameter accepting one valye from set of allowed elements.

Attributes

Source
Options.scala
def instant(name: String): Options[Instant]

Creates a parameter expecting a parameter for instant in time in UTC format, such as 2007-12-03T10:15:30.00Z.

Creates a parameter expecting a parameter for instant in time in UTC format, such as 2007-12-03T10:15:30.00Z.

Attributes

Source
Options.scala
def integer(name: String): Options[BigInt]

Creates a parameter expecting an integer.

Creates a parameter expecting an integer.

Attributes

Source
Options.scala

Creates a property flag with the specified name. Property arguments may be repeated several times (-D key1=value -D key2=value) or specifying all key/values in one argument (-D key1=value key2=value).

Creates a property flag with the specified name. Property arguments may be repeated several times (-D key1=value -D key2=value) or specifying all key/values in one argument (-D key1=value key2=value).

Attributes

Source
Options.scala
def keyValueMap(argumentOption: Single[String]): Options[Map[String, String]]

Creates a property flag with from an argument option as Options.single.

Creates a property flag with from an argument option as Options.single.

Attributes

Source
Options.scala
def localDate(name: String): Options[LocalDate]

Creates a parameter excepting parameter for a date in ISO_LOCAL_DATE format, such as 2007-12-03.

Creates a parameter excepting parameter for a date in ISO_LOCAL_DATE format, such as 2007-12-03.

Attributes

Source
Options.scala
def localDateTime(name: String): Options[LocalDateTime]

Creates a parameter excepting a date-time without a time-zone in the ISO-8601 format, such as 2007-12-03T10:15:30.

Creates a parameter excepting a date-time without a time-zone in the ISO-8601 format, such as 2007-12-03T10:15:30.

Attributes

Source
Options.scala
def localTime(name: String): Options[LocalTime]

Creates a parameter excepting a time without a time-zone in the ISO-8601 format, such as 10:15:30.

Creates a parameter excepting a time without a time-zone in the ISO-8601 format, such as 10:15:30.

Attributes

Source
Options.scala
def monthDay(name: String): Options[MonthDay]

Creates a parameter excepting a month-day in the ISO-8601 format such as 12-03.

Creates a parameter excepting a month-day in the ISO-8601 format such as 12-03.

Attributes

Source
Options.scala
def offsetDateTime(name: String): Options[OffsetDateTime]

Creates a parameter excepting a date-time with an offset from UTC/Greenwich in the ISO-8601 format, such as 2007-12-03T10:15:30+01:00.

Creates a parameter excepting a date-time with an offset from UTC/Greenwich in the ISO-8601 format, such as 2007-12-03T10:15:30+01:00.

Attributes

Source
Options.scala
def offsetTime(name: String): Options[OffsetTime]

Creates a parameter excepting a time with an offset from UTC/Greenwich in the ISO-8601 format, such as 10:15:30+01:00.

Creates a parameter excepting a time with an offset from UTC/Greenwich in the ISO-8601 format, such as 10:15:30+01:00.

Attributes

Source
Options.scala
def period(name: String): Options[Period]

Creates a parameter excepting a date-based amount of time in the ISO-8601 format, such as 'P1Y2M3D'.

Creates a parameter excepting a date-based amount of time in the ISO-8601 format, such as 'P1Y2M3D'.

Attributes

Source
Options.scala
def text(name: String): Options[String]

Creates a parameter expecting an arbitrary text.

Creates a parameter expecting an arbitrary text.

Attributes

Source
Options.scala
def validate[A](options: Options[A], args: List[String], conf: CliConfig): IO[ValidationError, (Option[ValidationError], List[String], A)]

Options.validate parses args for options and returns an Option[ValidationError], the leftover arguments and the constructed value of type A. The possible error inside Option[ValidationError] would only be triggered if there is an error when parsing the Args of a Command. This is because ValidationErrors are used to control the end of the args corresponding to options.

Options.validate parses args for options and returns an Option[ValidationError], the leftover arguments and the constructed value of type A. The possible error inside Option[ValidationError] would only be triggered if there is an error when parsing the Args of a Command. This is because ValidationErrors are used to control the end of the args corresponding to options.

Attributes

Source
Options.scala
def year(name: String): Options[Year]

Creates a parameter expecting a year in the ISO-8601 format, such as 2007.

Creates a parameter expecting a year in the ISO-8601 format, such as 2007.

Attributes

Source
Options.scala
def yearMonth(name: String): Options[YearMonth]

Creates a parameter expecting a year-month in the ISO-8601 format, such as 2007-12..

Creates a parameter expecting a year-month in the ISO-8601 format, such as 2007-12..

Attributes

Source
Options.scala
def zoneId(name: String): Options[ZoneId]

Creates a parameter expecting a time-zone ID, such as Europe/Paris.

Creates a parameter expecting a time-zone ID, such as Europe/Paris.

Attributes

Source
Options.scala
def zoneOffset(name: String): Options[ZoneOffset]

Creates a parameter expecting a time-zone offset from Greenwich/UTC, such as +02:00.

Creates a parameter expecting a time-zone offset from Greenwich/UTC, such as +02:00.

Attributes

Source
Options.scala
def zonedDateTime(name: String): Options[ZonedDateTime]

Creates a date-time with a time-zone in the ISO-8601 format, such as 2007-12-03T10:15:30+01:00 Europe/Paris.

Creates a date-time with a time-zone in the ISO-8601 format, such as 2007-12-03T10:15:30+01:00 Europe/Paris.

Attributes

Source
Options.scala

Inherited methods

def directory(name: String, exists: Exists = ...): Options[Path]

Creates a parameter expecting path to the directory.

Creates a parameter expecting path to the directory.

Attributes

Inherited from:
OptionsPlatformSpecific (hidden)
Source
OptionsPlatformSpecific.scala
def file(name: String, exists: Exists = ...): Options[Path]

Creates a parameter expecting path to the file.

Creates a parameter expecting path to the file.

Attributes

Inherited from:
OptionsPlatformSpecific (hidden)
Source
OptionsPlatformSpecific.scala
def oauth2(provider: OAuth2Provider, scope: List[String]): Options[OAuth2Token]

Adds into the application OAuth2 authorization with the specified provider for permissions defined by scope. The resulting zio.cli.oauth2.OAuth2Token will provide access token.

Adds into the application OAuth2 authorization with the specified provider for permissions defined by scope. The resulting zio.cli.oauth2.OAuth2Token will provide access token.

Attributes

Inherited from:
OptionsPlatformSpecific (hidden)
Source
OptionsPlatformSpecific.scala

Concrete fields

val none: Options[Unit]

Attributes

Source
Options.scala