# mokucli instrument

Manage Moku instrument bitstreams

Note

The most used command in this section will be to download the instruments for API usage. See mokucli instrument download for examples and more details

# Download all bitstreams for version 4.3.0
mokucli instrument download 4.3.0
1
2

# Instrument IDs

Bitstream identifiers used with download/upload's VERSION_SPEC (e.g. 4.3.0:01-001-00) follow the pattern {platform}-{instrument_id}-{slot}:

  • platform: 01 for standalone (single-instrument) mode, or the Multi-Instrument Mode platform_id (zero-padded to 2 digits) otherwise
  • instrument_id: from the table below (zero-padded to 3 digits)
  • slot: 00 for standalone mode or slot 1 in Multi-Instrument Mode, 01 for slot 2, etc.
Instrument ID
Oscilloscope 001
Spectrum Analyzer 002
Phasemeter 003
Waveform Generator 004
PID Controller 005
Digital Filter Box 006
Datalogger 007
Lock-in Amplifier 008
Frequency Response Analyzer 009
FIR Filter 010
Time & Frequency Analyzer 011
Gigabit Streamer 012
Gigabit Streamer+ 013
Arbitrary Waveform Generator 015
Laser Lock Box 016
Logic Analyzer 017
Neural Network 128
GenInst 253
Custom Instrument+ 254
Custom Instrument 255

For example, 4.3.0:01-001-00 refers to the Oscilloscope (ID 001) in standalone mode on version 4.3.0.

# Usage

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

# Commands

  • list: List available bitstreams on a server
  • download: Download bitstreams for a given version
  • upload: Upload a bitstream to a Moku device
  • install: Alias for upload

# mokucli instrument list

List available bitstreams on a server

# Usage

$ mokucli instrument list [OPTIONS] [SERVER]
1

# Arguments

  • SERVER: Server to list bitstreams from. Defaults to the default server. [default: None]

# Options

  • --hw-version [mokugo|mokupro|mokulab|mokudelta]: Filter by hardware version
  • --version TEXT: Filter by version (e.g., 4.3.0)
  • --summary: Show summary of available bitstreams without listing individual files
  • --help: Show this message and exit

# Examples

# List all available bitstreams
mokucli instrument list

# List bitstreams for a specific version
mokucli instrument list --version 4.3.0

# List bitstreams for a specific hardware version
mokucli instrument list --hw-version mokugo

# Show summary without detailed listings
mokucli instrument list --summary
1
2
3
4
5
6
7
8
9
10
11

# mokucli instrument download

Download bitstreams to the local cache for later installation

This command downloads instrument bitstreams to your local cache, allowing for:

  • Offline installation to Moku devices
  • Bulk deployment across multiple devices
  • Use with the Moku API for on-demand instrument installation
  • Pre-staging instruments before field deployment

Downloaded bitstreams are stored in the platform-specific data directory and can be installed later using mokucli instrument upload.

# Usage

$ mokucli instrument download [OPTIONS] VERSION_SPEC...
1

# Arguments

  • VERSION_SPEC: One or more versions to download (e.g., 4.3.0), optionally suffixed with a specific bitstream identifier (see Instrument IDs) using colon separator. [required]
    • Supports glob patterns:
      • * (any characters) - "4.3.0:01-*-00"
      • ? (single character) - "4.3.0:01-00?-*"
      • [seq] (character set) - "4.3.0:01-[0-9]*-00"

# Options

  • --target PATH: Directory to download bitstreams to [default: platform-specific data directory]
  • --force / --no-force: Force redownload even if file exists [default: no-force]
  • --ip TEXT: IP address of a connected Moku device (for hardware version detection and auto-version detection)
  • --hw-version [mokugo|mokupro|mokulab|mokudelta]: Hardware version to use when no device is connected. When --ip is provided without a version, the firmware version is auto-detected from the connected device
  • --verbose, -v: Show detailed output for each bitstream download
  • --help: Show this message and exit

# Examples

# Download all bitstreams for version 4.3.0
mokucli instrument download 4.3.0

# Download specific bitstream
mokucli instrument download 4.3.0:01-001-00 --hw-version mokugo

# Download multiple bitstreams using glob patterns
mokucli instrument download "4.3.0:01-*" --hw-version mokupro

# Download to specific directory
mokucli instrument download 4.3.0 --target ./bitstreams

# Download with device auto-detection
mokucli instrument download 4.3.0 --ip 192.168.1.100

# Force redownload
mokucli instrument download 4.3.0:01-001-00 --force
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

# mokucli instrument upload

Upload bitstreams to a Moku device

# Usage

$ mokucli instrument upload [OPTIONS] IP_ADDRESS BITSTREAM...
1

# Arguments

  • IP_ADDRESS: IP address or hostname of Moku (e.g., 192.168.1.100, MokuGo-000092) [required]
  • BITSTREAM: One or more bitstreams to upload, each either a path to a bitstream file or a version:instrument identifier (see Instrument IDs). [required]
    • Supports glob patterns:
      • * (any characters) - "4.3.0:01-*-00"
      • ? (single character) - "4.3.0:01-00?-*"
      • [seq] (character set) - "4.3.0:01-[0-9]*-00"

# Options

  • --verbose, -v: Show detailed output for each bitstream upload
  • --help: Show this message and exit

# Examples

# Upload a single bitstream
mokucli instrument upload 192.168.1.100 4.3.0:01-001-00

# Upload multiple bitstreams using glob patterns
mokucli instrument upload 192.168.1.100 "4.3.0:01-*"

# Upload a local bitstream file
mokucli instrument upload 192.168.1.100 ./oscilloscope.bar

# Upload with verbose output
mokucli instrument upload 192.168.1.100 4.0.1:01-001-00 -v
1
2
3
4
5
6
7
8
9
10
11

# Notes

  • The device hardware version is automatically detected when uploading
  • If a bitstream is not found locally, it will be automatically downloaded before uploading
  • The device's bitstream cache is automatically reloaded after successful uploads
  • Auto-download is not available for glob patterns - download them first using instrument download