doctorUsage function

String doctorUsage([
  1. String command = 'local_inference:doctor'
])

The help text of the command line; command is how it was started.

Implementation

String doctorUsage([String command = 'local_inference:doctor']) =>
    '''
Checks a host app or package against what the local_inference packages need: the hooks block, the pinned versions,
how the packages are listed, the llama.cpp bundles, and the iOS, Android and macOS settings a plugin cannot carry.
The doctor reads files only: it uses no network, and nothing changes unless --install-ios-script is given.

Usage: dart run $command [options] [host folder]

The host folder is the app or package to check (the default is the current folder). local_inference:doctor and
local_inference_flutter:doctor run the same checks.

dart run resolves the package it runs from and runs its build hooks before the doctor starts: llamadart's hook
builds for this computer (its bundle is vendored, or downloaded into the pub cache once) and, without the hooks
block, downloads LiteRT-LM too. So add the hooks block first. Where dart run fails before the doctor starts (the
pubspec does not resolve, a companion package, no bundle for this computer, no network), run the doctor from another
package that resolves local_inference, with the host folder as the argument.

Options:
  --json                 print the report as JSON
  --strict               warnings fail too
  --verify-natives       also hash the llama.cpp bundles (the vendored folder, or the hook's downloads in the pub
                         cache) and the libraries the host's builds bundled, against local_inference's manifest
  --install-ios-script   copy local_inference_flutter's tool/ios/native_assets_min_os.sh to ios/scripts/ and print
                         the build-phase steps; no check runs
  -h, --help             this text

Exit status: 0 when no check failed; 1 when a check found an error, or a warning with --strict; 2 for a usage error
(an unknown option, a folder without a readable pubspec.yaml, --install-ios-script without an ios/ folder).''';