# Advanced Usage

NOTE

These features will only be required in complex environments or for debugging an installation. Best used at the direction of the support team. Contact support (opens new window) for further information.

This guide covers advanced MokuCLI features including configuration management, custom servers, and debugging options.

# Configuration Management

MokuCLI uses a configuration file to manage settings such as server definitions and data directories. The config command group provides tools to manage this configuration.

# mokucli config

Configuration file management commands

# Usage

$ mokucli config [OPTIONS] COMMAND [ARGS]...
1

# Commands

  • create: Create a default configuration file
  • which: Print the default configuration file location
  • print: Pretty-print the parsed configuration

# Configuration file location

The configuration file is stored in platform-specific locations:

  • Linux: ~/.config/moku/mokucli.yaml
  • macOS: ~/Library/Application Support/Moku/mokucli.yaml
  • Windows: %APPDATA%\Moku\mokucli.yaml

# Creating a configuration file

If no configuration file is found with mokucli config print/which, run mokucli config creare to create a new file.

# Create default configuration
mokucli config create

# Check configuration file location
mokucli config which

# View current configuration
mokucli config print
1
2
3
4
5
6
7
8

# Output

# Create and save default configuration
$ mokucli config create --save
✓ Configuration saved to: C:\Users\user\AppData\Roaming\Moku\mokucli.yaml

# Check configuration file location
$ mokucli config which
C:\Users\user\AppData\Roaming\Moku\mokucli.yaml

# View current configuration
$ mokucli config print
✓ Configuration from: C:\Users\user\AppData\Roaming\Moku\mokucli.yaml

  1 servers:
  2   default:
  3     type: http
  4     url: https://updates.liquidinstruments.com/static/
  5 data_dir: C:\Users\user\AppData\Roaming\Moku\data
  6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Configuration File Format

The configuration file uses YAML format with the following structure:

# Data directory for downloaded files
data_dir: /path/to/data/directory

# Server configurations
servers:
    # Default HTTP server (always present)
    default:
        type: http
        url: https://updates.liquidinstruments.com/static/

    # Example S3 server configuration
    my-s3-server:
        type: s3
        endpoint: s3.example.com
        bucket: moku-resources
        access_key: YOUR_ACCESS_KEY
        secret_key: YOUR_SECRET_KEY
        secure: true
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Server Configuration

Servers can be either HTTP or S3 type:

# HTTP Server