io7m | single-page | multi-page | epub | Looseleaf User Manual
9. Command-Line Interface
Previous
9. Command-Line Interface
Up
9.2. check-configuration
Next

# 9.1. Overview

1
The looseleaf package provides a command-line interface for performing tasks such as starting the server, checking configuration files, hashing passwords, and etc. The base looseleaf command is broken into a number of subcommands which are documented over the following sections.

### 9.1.2. Command-Line Overview

    info: Usage: looseleaf [options] [command] [command options]

      Options:
        --verbose
          Set the minimum logging verbosity level.
          Default: info
          Possible Values: [trace, debug, info, warn, error]

      Use the "help" command to examine specific commands:

        $ looseleaf help help.

      Command-line arguments can be placed one per line into a file, and the file
      can be referenced using the @ symbol:

        $ echo help > file.txt
        $ echo help >> file.txt
        $ looseleaf @file.txt

      Commands:
        check-configuration     Check configuration file.
        create-password         Create a hashed password.
        help                    Show detailed help messages for commands.
        server                  Start a server.
        version                 Show the package version.

      Documentation:
        https://www.io7m.com/software/looseleaf/documentation/

3
All of the command-line functionality is implemented using the standard looseleaf APIs.
4
All subcommands accept a --verbose parameter that may be set to one of trace, debug, info, warn, or error. This parameter sets the lower bound for the severity of messages that will be logged. For example, at debug verbosity, only messages of severity debug and above will be logged. Setting the verbosity to trace level effectively causes everything to be logged, and will produce large volumes of debugging output.
5
The looseleaf command-line tool uses quarrel to parse command-line arguments, and therefore supports placing command-line arguments into a file, one argument per line, and then referencing that file with @. For example:

### 9.1.6. @ Syntax

    $ looseleaf server --file config.json
    info: [localhost:20000] server started

    $ (cat <<EOF
    server
    --file
    config.json
    EOF
    ) > args.txt

    $ looseleaf @args.txt
    info: [localhost:20000] server started

7
All subcommands, unless otherwise specified, yield an exit code of 0 on success, and a non-zero exit code on failure.
9. Command-Line Interface
Previous
9. Command-Line Interface
Up
9.2. check-configuration
Next
io7m | single-page | multi-page | epub | Looseleaf User Manual