declslides.cli

package declslides.cli

Members list

Type members

Classlikes

Parses raw command-line arguments into a validated CliConfig.

Parses raw command-line arguments into a validated CliConfig.

The parser is responsible for recognizing supported flags, rejecting invalid combinations, and converting raw string values into more meaningful domain values such as paths and output formats.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
final case class CliConfig(input: Path, format: OutputFormat, output: Path)

Validated command-line configuration for a render invocation.

Validated command-line configuration for a render invocation.

By the time a CliConfig exists, option names have already been validated and raw strings have already been converted into domain-friendly values.

Value parameters

format

requested output format

input

input script to render

output

destination file for the rendered document

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object CliError

Constructors for the concrete CLI error cases.

Constructors for the concrete CLI error cases.

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
CliError.type
sealed trait CliError

Errors raised by the CLI layer.

Errors raised by the CLI layer.

These errors describe problems that are meaningful from the user's point of view: invalid arguments, unsupported options, initialization failures, or rendering failures surfaced through the command line.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object CliOption

Helpers for working with CliOption values.

Helpers for working with CliOption values.

Attributes

Companion
enum
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
CliOption.type
enum CliOption(val flag: String)

Supported command-line options understood by the CLI.

Supported command-line options understood by the CLI.

Using an enum keeps option handling explicit and avoids scattering raw flag strings across the parser.

Attributes

Companion
object
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final class CliProgram(commandFactory: RenderCommandFactory, printError: String => Unit, printInfo: String => Unit)

Orchestrates the command-line flow for declslides.

Orchestrates the command-line flow for declslides.

A CliProgram translates raw arguments into a validated configuration, builds the rendering command, executes it, and reports either a friendly error or a success message.

Value parameters

commandFactory

factory used to build the concrete rendering command

printError

sink for user-facing error messages

printInfo

sink for user-facing informational messages

Attributes

Supertypes
class Object
trait Matchable
class Any

Success messages emitted by the CLI.

Success messages emitted by the CLI.

Centralizing user-facing success text keeps the orchestration code focused on flow rather than wording.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object CliUsage

User-facing usage text for the declslides command.

User-facing usage text for the declslides command.

Keeping the usage string in one place avoids drift between parsing logic and error reporting.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
CliUsage.type
object DeclSlidesCli

Entry point of the declslides command-line application.

Entry point of the declslides command-line application.

This object keeps process-level concerns small: it wires the CLI program, delegates the actual work, and turns the final result into a process exit code.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Default production factory for RenderCommand instances.

Default production factory for RenderCommand instances.

This object bridges the CLI layer with the concrete renderer registry and the Scala CLI-based script runner used at runtime.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
enum ExitCode(val value: Int)

Semantic process exit codes used by the CLI.

Semantic process exit codes used by the CLI.

Named exit codes make intent clearer than bare numeric literals.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object OutputFormat

Helpers for parsing and listing supported output formats.

Helpers for parsing and listing supported output formats.

Attributes

Companion
enum
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
enum OutputFormat(val value: String)

Output formats accepted by the CLI.

Output formats accepted by the CLI.

This enum models the user-facing format vocabulary accepted on the command line. It intentionally stays small and explicit.

Attributes

Companion
object
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Creates fully wired rendering commands for the CLI layer.

Creates fully wired rendering commands for the CLI layer.

This abstraction keeps infrastructure wiring out of the command-line orchestration, which makes the CLI easier to read and easier to test.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes