Use the CLI¶
Use moi-cli to work with Product resources from a terminal or script. Before starting, go to Download MOI-CLI to obtain the precompiled binary for your operating system.
For all commands and tasks, see CLI.
1. Configure the endpoint and credentials¶
moi-cli config set-endpoint "<Product API Base URL ending in /newmoi>"
moi-cli config set-api-key "<personal-access-token>"
The endpoint must include /newmoi. Pass the personal access token as its original value, without a Bearer prefix. Command-line arguments can be stored in terminal history; configure credentials only in a protected local environment.
2. Find and select a workspace¶
moi-cli -o workspace list
moi-cli config set-workspace "<workspace-id-from-list>"
A successful workspace-list response confirms that the endpoint and personal access token work. Use the workspace name only to identify the workspace; save and use its ID in subsequent commands.
3. Check the configuration¶
moi-cli config show
The output should show the complete endpoint and workspace ID, while api_key is masked. You can then run moi-cli --help or moi-cli <command> --help to select a task.