DerivationApi

clam.derivation.DerivationApi

Attributes

Graph
Supertypes
trait ReaderApi
class Object
trait Matchable
class Any
Known subtypes
trait Api
object DefaultApi.type
Self type

Members list

Concise view

Type members

Classlikes

case class Command[+A](parsers: IndexedSeq[Parser[_]], instantiate: IndexedSeq[_] => A, name: String, doc: String)

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
object Command

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Command.type
trait Parser[+A]

A parser is responsible for defining a set of CLI parameters and implementing a way to extract a value from the corresponding arguments.

A parser is responsible for defining a set of CLI parameters and implementing a way to extract a value from the corresponding arguments.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class RepeatedParam[A, Col]
class SingleParam[A]
class Subcommand[A]
case class RepeatedParam[A, Col <: (Iterable)](scalaName: String, default: Option[() => Col[A]], annot: param, doc: String, argName0: Option[String], reader0: Reader[A], completer: Completer[A], factory: Factory[A, Col[A]]) extends Parser[Col[A]]

A single CLI parameter (may be repeated) which maps to a single scala parameter.

A single CLI parameter (may be repeated) which maps to a single scala parameter.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Parser[Col[A]]
class Object
trait Matchable
class Any
trait ScalaParam[A]

Signature of a Scala parameter. These are used by the derivation macros to to instantiate parsers for every parameter. Note that this API should be considered experimental. In the future, this typeclass may be eliminated and the behavior folded directly into macros.

Signature of a Scala parameter. These are used by the derivation macros to to instantiate parsers for every parameter. Note that this API should be considered experimental. In the future, this typeclass may be eliminated and the behavior folded directly into macros.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
case class SingleParam[A](scalaName: String, default: Option[() => A], annot: param, doc: String, argName0: Option[String], reader0: Reader[A], completer: Completer[A]) extends Parser[A]

A single CLI parameter (may not be repeated) which maps to a single scala parameter.

A single CLI parameter (may not be repeated) which maps to a single scala parameter.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Parser[A]
class Object
trait Matchable
class Any
case class Subcommand[+A](subcommands: Map[String, Command[A]]) extends Parser[A]

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Parser[A]
class Object
trait Matchable
class Any
object Subcommand

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Inherited classlikes

trait Completer[A]

Attributes

Inherited from:
CompletionApi
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object booleanCompleter.type
object Reader

Attributes

Inherited from:
ReaderApi
Graph
Supertypes
class Object
trait Matchable
class Any
trait Reader[A]

Attributes

Inherited from:
ReaderApi
Graph
Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def scalaToNamedParam(scalaName: String): String
def scalaToPositionalParam(scalaName: String): String
def scalaToSubcommand(scalaName: String): String

Inherited methods

def defaultHelpMessage(term: Terminal, description: String, commandChain: Iterable[String], params: Iterable[ParamDef], subcommands: Iterable[(String, String)]): String

Generate a help message from parameters.

Generate a help message from parameters.

Overriding this allows you to customize the help message of all commands.

Attributes

Inherited from:
SupportApi

Givens

Givens

given explicitParam[A](using p: Parser[A]): ScalaParam[A]
given flagParam(using reader: Reader[Boolean], completer: Completer[Boolean]): ScalaParam[Boolean]
given repeatedFlagParam[Col <: (Iterable)](using reader: Reader[Boolean], completer: Completer[Boolean], factory: Factory[Boolean, Col[Boolean]]): ScalaParam[Col[Boolean]]
given repeatedParam[A, Col <: (Iterable)](using reader: Reader[A], completer: Completer[A], factory: Factory[A, Col[A]]): ScalaParam[Col[A]]
given simpleParam[A](using reader: Reader[A], completer: Completer[A]): ScalaParam[A]

Inherited givens

given emptyCompleter[A]: emptyCompleter[A]

Attributes

Inherited from:
LowPrioCompleters