Admin Commands

Get Started with the CLI

This page shows some common CLI Commands. For more info about a specific command, see that command’s page or type co [command] --help.

Login to Your Cohere Account

co auth login --email string="example@youremail.com"

You will be prompted to put in your password. For more commands related to your Cohere account, see the Auth and User commands.

Currently, SSO accounts cannot log in via the CLI.

Use a Model

Classify

co model classify \
--example "example1"="label1" \
--example "example2"="label1" \
--example "example3"="label2" \
--example "example4"="label2" \
"first text to classify" "second text to classify"

Embed

co model embed "string1" "string2"

Generate

co model generate --max-tokens n '[Your Prompt Here]'
Using Finetuned Models in the CLI

If you want to use a finetuned model, you can do so by using the model’s full ID with the model flag. See the Model reference page for more details.

Finetune a Model

co finetune run -n="finetunename" -d="datasource" -t="modeltype" -b="small"

Get Help

You can use co --help to see the general help menu or co [command] --help to see the help menu for a specific command.