# mokucli config
Manage and inspect the mokucli configuration file.
# Usage
$ mokucli config [OPTIONS] COMMAND [ARGS]...
# Commands
List of available config commands:
create: Generate a default YAML configuration file with helpful comments and example server entrieswhich: Print the path wheremokuclilooks for its configuration fileprint: Pretty-print the parsed and validated configurationset: Set a configuration keyunset: Remove a configuration keywizard: Interactive configuration wizardsvalidate: Validate configuration settings
# mokucli config create
Generates a YAML configuration file with default server settings for downloading firmware, instruments, and features. The file includes helpful comments and an example S3 server configuration.
Without --save, outputs to stdout for inspection or redirection.
# Usage
$ mokucli config create [OPTIONS]
# Options
--save,-s: Save configuration to the default location instead of printing to stdout. When saving, prompts before overwriting an existing file--help: Show this message and exit
# Examples
# print default config to stdout
mokucli config create
# write default config to the default config path (prompts on overwrite)
mokucli config create --save
# write a default config to a custom-config.yaml
mokucli config create > custom-config.yaml
2
3
4
5
6
7
8
# Output
# Print default configuration to stdout
$ mokucli config create
# MokuCLI Configuration File
# This file configures servers for downloading firmware and instruments
servers:
default:
type: http
endpoint: updates.liquidinstruments.com/
bucket: binaries
prefix: ''
secure: true
data_dir: C:\Users\usr\AppData\Roaming\Moku\data
# Example S3 server configuration (uncomment and modify as needed):
# servers:
# s3-example:
# type: s3
# endpoint: minio.example.com
# bucket: moku-binaries
# prefix: ''
# secure: true
# access_key: your-access-key
# secret_key: your-secret-key
# region: us-east-1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# mokucli config which
Shows the path where mokucli looks for its configuration file.
Can be overridden using the MOKUCLI_CONFIG_FILE environment variable. Useful for debugging configuration issues or when manually editing the config file.
# Usage
$ mokucli config which [OPTIONS]
# Options
--help: Show this message and exit
# Examples
# Print the path `mokucli` would use for the configuration file
mokucli config which
# Override the config file location for this command and print the path
MOKUCLI_CONFIG_FILE=/tmp/test.yaml mokucli config which
# Print the config path and pipe to cat to display the file contents
mokucli config which | xargs cat
2
3
4
5
6
7
8
9
# Output
# Print default configuration location to stdout
$ mokucli config which
C:\Users\usr\AppData\Roaming\Moku\mokucli.yaml
2
3
# mokucli config print
Reads, validates, and displays the current configuration file with syntax highlighting. Shows detailed error messages if the configuration is invalid, including the exact location of YAML syntax errors. Can be overridden using the MOKUCLI_CONFIG_FILE environment variable.
$ mokucli config print [OPTIONS]
# Options
--format,-f: Output format: 'yaml' (default) or 'table' [default: yaml]--help: Show this message and exit
# Examples
# print as YAML (default)
mokucli config print
# print in table format
mokucli config print --format table
2
3
4
5
6
# Output
✓ Configuration from: C:\Users\usr\AppData\Roaming\Moku\mokucli.yaml
servers:
default:
type: s3
backend: minio
endpoint: s3.ap-southeast-2.amazonaws.com
bucket: au-updates.liquidinstruments.com
prefix: binaries/
secure: true
verify_ssl: true
access_key: ''
secret_key: ''
session_token: ''
region: ''
dev:
type: s3
backend: minio
endpoint: s3.devel.com:9000
bucket: binaries
prefix: ''
secure: true
verify_ssl: true
access_key: ''
secret_key: ''
session_token: ''
region: ''
toolchains:
type: s3
backend: aws
endpoint: ''
bucket: au-updates.liquidinstruments.com
prefix: ''
secure: true
verify_ssl: true
access_key: ''
secret_key: ''
session_token: ''
region: ap-southeast-2
data_dir: C:\Users\usr\AppData\Roaming\Moku\data
mc:
build:
signing_key: C:\Users\usr\AppData\Roaming\Moku\data\mc\signing_keys\mc_op_ed25519_private.b64
toolchain: 4.1.2
ipdir: null
autosave_bitstream: false
hardware: mokugo
slots: 2
vivado:
xilinx_path: C:\Xilinx\Vivado\2022.2
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# mokucli config set
Set a configuration value (use dot notation, e.g. 'vivado.xilinx_path'). Use
mokucli config print to see available configuration values to set.
# Usage
$ mokucli config set [OPTIONS] KEY VALUE
# Arguments
key: TEXT [required]value: TEXT [required]
# Options
--help: Show this message and exit
# Examples
# set the mokuCli data directory
mokucli config set data data_dir "C:\Users\usr\AppData\Roaming\Moku\data"
# set the dev server endpoint
mokucli config set servers.default.endpoint "s3.ap-southeast-2.amazonaws.com"
# set the Moku Compile Vivado Xilinx path
mokucli config set mc.vivado.xilinx_path "C:\Xilinx\Vivado\2022.2"
2
3
4
5
6
7
8
# Output
# set the Moku Compile Vivado Xilinx path
$ mokucli config set mc.vivado.xilinx_path "C:\Xilinx\Vivado\2022.2"
✓ Set mc.vivado.xilinx_path = C:\Xilinx\Vivado\2022.2
✓ Configuration saved successfully!
2
3
4
5
# mokucli config unset
Unset a configuration value (use dot notation, e.g. 'vivado.xilinx_path') Use
mokucli config print to see available configuration values to unset.
# Usage
$ mokucli config set [OPTIONS] KEY
# Arguments
key: TEXT [required]
# Options
--help: Show this message and exit
# Examples
# unset the mokuCli data directory
mokucli config unset data data_dir
# unset the dev server endpoint
mokucli config unset servers.default.endpoint
# unset the Moku Compile Vivado Xilinx path
mokucli config unset mc.vivado.xilinx_path
2
3
4
5
6
7
8
# Output
# set the Moku Compile Vivado Xilinx path
$ mokucli config set mc.vivado.xilinx_path "C:\Xilinx\Vivado\2022.2"
Removed mc.vivado.xilinx_path from configuration
2
3
4
# mokucli config wizard
Set a configuration value (use dot notation, e.g. 'vivado.xilinx_path'). Use
mokucli config print to see available configuration values to set.
For basic instructions for how to configure your config to use On-premises Moku Compile for the first time, read the getting started guide.
# Usage
$ mokucli config wizard [OPTIONS] COMMAND [ARGS]
# Commands
mc: Interactive configuration wizard for Moku Compile
# Options
--help: Show this message and exit
# Examples
# Open the interactive Moku Compile configuration wizard
mokucli config wizard mc
2
# Output
# Open the interactive Moku Compile configuration wizard
$ mokucli config wizard mc
Starting configuration wizard for Moku Compile...
Vivado Configuration
Enter the full path to the Vivado installation directory, the directory that
contains settings64.sh (type 'help' for info) (None): "C:\Xilinx\Vivado\2022.2"
Build Configuration
A signing key is already configured at 'C:\Users\usr\AppData\Roaming\Moku\data\mc\signing_keys\mc_op_ed25519_private.b64'. Do you
want to generate a new Ed25519 signing key? [y/n] (n): n
Optional Select hardware model (enter number): 1. mokugo, 2. mokupro, 3. moku20, 4. mokudelta
You can also pass the hardware model at runtime, but adding it here is convenient. (type 'help' for info) (1): 2
Optional Auto-install bitstreams? When enabled, successful build artefacts will be copied from the build directory to C:\Users\usr\AppData\Roaming\Moku\data\mc\.cache\bitstreams for easier loading in to your Moku (type 'help' for info) (false): true
Optional Enter intermediate build directory for Vivado IP cores
Blank: use per-build directories for generated checkpoints. 'default': save to the central cache at
C:\Users\usr\AppData\Roaming\Moku\data\mc\.cache\ip_cores. Or enter a custom absolute or relative path. (type 'help' for info) (None): default
Tip: Run `mokucli config validate mc` to verify your configuration and ensure everything is set up correctly.
✓ Configuration saved successfully!
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# mokucli config validate
Validate configuration settings. Edit the config file using
mokucli config wizard to address any required changes or recommendations.
# Usage
mokucli config validate [OPTIONS] COMMAND...
# Commands
mc: Validate mc configuration settings
# Options
--help: Show this message and exit
# Examples
# Validate the mc configuration
mokucli config validate mc
2
# Output
# Validate the mc configuration
$ mokucli config validate mc
✓ Configuration validation passed
$ mokucli config validate mc
! Configuration warnings:
! - IP directory is not set (mc.build.ipdir). Configuring it here will centralize
all IP cores and prevent unnecessary recompilation
# if you receive a validation message like this, you can configure your ip cores
# directory with the
$ mokucli config wizard mc
# and set the ipdir when prompted, or set it with
$ mokucli config set mc.build.ipdir "C:\Users\usr\AppData\Roaming\Moku\data\mc\.cache\ip_cores"
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16