Secrets¶
janito stores sensitive configuration like API keys and credentials in a separate secrets file.
Secrets File Location¶
Secrets are stored in ~/.janito/secrets.json.
Note: Provider API keys set with
--set-api-keyare stored separately in~/.janito/auth.json. The secrets file is for arbitrary credentials such as Gmail app passwords or Azure client IDs.
Setting Secrets¶
Gmail Credentials¶
# Set Gmail username
janito --set-secret gmail_username=your-email@gmail.com
# Set Gmail app password
janito --set-secret gmail_password=your-app-password
OneDrive Credentials¶
Custom Secrets¶
You can set multiple secrets in one command:
Listing Secrets¶
List the names of all configured secrets (values are not shown):
Retrieving a Secret¶
Print the value of a specific secret:
Deleting Secrets¶
Remove a specific secret:
Security Notes¶
- Secrets are stored locally in
~/.janito/secrets.json - The file is stored with restricted permissions (600 on Unix systems)
--list-secretsshows only key names, never values- Never share your secrets file or commit it to version control
Secrets Format¶
The secrets file is a simple JSON dictionary:
{
"gmail_username": "your-email@gmail.com",
"gmail_password": "xxxx xxxx xxxx xxxx",
"azure_client_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Related¶
- Gmail Tools - Full Gmail setup guide
- OneDrive Tools - Full OneDrive setup guide