Working with the CLI¶
The Emmi CLI provides a convenient way of performing high-level actions.
Each Python module exposes unique functionality and therefore its own set of commands.
A global --debug flag enables extended debug logging, useful for narrowing down issues, for example:
emmi-data --debug aws estimate ...
In this documentation we will be using CLI for Emmi Data Module.
Credential Setup¶
To communicate with services, you must configure credentials:
Create a file under your profile root, e.g.
/users/username/.config/emmi/config.json.Populate the file (replace empty strings with your values; unused services may stay empty):
{
"huggingface": {
"HF_TOKEN": ""
},
"aws": {
"AWS_ACCESS_KEY_ID": "",
"AWS_SECRET_ACCESS_KEY": "",
"AWS_SESSION_TOKEN": "",
"AWS_REGION": "",
"AWS_DEFAULT_REGION": ""
}
}
Note
For AWS the values AWS_SESSION_TOKEN, AWS_REGION, and AWS_DEFAULT_REGION are optional.
In case when AWS_ACCESS_KEY_ID starts with ASIA... the AWS_SESSION_TOKEN needs to be provided.
Testing the Credentials¶
Verify your setup by running the estimate command, which fetches metadata and reports
the estimated size:
Hugging Face:
emmi-data huggingface estimate EmmiAI/AB-UPT
AWS:
emmi-data aws estimate noaa-goes16 ABI-L1b-RadC/2023/001/00/
If you see no errors — congratulations, your setup works!