Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ You can pass in options to the CLI. Here are the key ones:
* `--disable-microphone` - disable the microphone.
* `--clean` - clear credentials, and re-authenticate. Use this to switch projects or devices.
* `--api-key <apikey>` - set an API key, useful for automatic authentication with a new project.
* `--api-key-file <apikey-file>` - set an API key to a value read from file. This is useful for automatic authentication with a new project in environments where secrets are managed via files (e.g., Docker compose, Docker Swarm, Kubernetes).
* `--greengrass` - utilize the AWS IoT Greengrass authentication context and AWS Secrets Manager to authenticate with a new project. See additional Greegrass notes below.
* `--help` - see all options.

Expand Down
3 changes: 2 additions & 1 deletion cli/linux/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ program
.option('--model-file <file>', 'Specify model file (either path to .eim, or the socket on which the model is running), ' +
'if not provided the model will be fetched from Edge Impulse')
.option('--api-key <key>', 'API key to authenticate with Edge Impulse (overrides current credentials)')
.option('--api-key-file <file>', 'File to read the API key from -- to authenticate with Edge Impulse (overrides current credentials)')
.option('--download <file>', 'Just download the model and store it on the file system')
.option('--list-targets', 'List all supported targets and inference engines')
.option('--force-target <target>', 'Do not autodetect the target system, but set it by hand (e.g. "runner-linux-aarch64")')
Expand Down Expand Up @@ -107,7 +108,7 @@ const silentArgv: boolean = !!program.silent;
const quantizedArgv: boolean = !!program.quantized;
const enableCameraArgv: boolean = !!program.enableCamera;
const verboseArgv: boolean = !!program.verbose;
const apiKeyArgv = <string | undefined>program.apiKey;
const apiKeyArgv = <string | undefined>program.apiKey ?? fs.readFileSync(program.apiKeyFile, 'utf-8').trim() ?? undefined;
const greengrassArgv: boolean = !!program.greengrass;
const modelFileArgv = <string | undefined>program.modelFile;
const downloadArgv = <string | undefined>program.download;
Expand Down