Is it possible to add canonical: false
when adding a repository via CLI, I have searched, but it looks like it has to be manually added?
composer config repositories.test composer https://repo.example.com
If you need to modify any other option, you can pass a JSON object.
E.g., in your case it would be something along the lines of:
composer config repositories.test \
'{"type": "composer", "url": "https://repo.example.com", "canonical": false}'