Configuration¶
Kokopelli authenticates with Trakt.tv via OAuth. Before first use you need a Trakt.tv application and must complete the device authentication flow.
Create a Trakt.tv Application¶
- Log in at trakt.tv and go to Settings → Your API Apps.
- Click New Application.
- Give it a name (e.g. kokopelli) and set the redirect URI to
urn:ietf:wg:oauth:2.0:oob. - Save the application and note the Client ID and Client Secret.
Authenticate¶
Run the configuration wizard:
You will be prompted for your Client ID and Client Secret, then shown a device code to enter at trakt.tv/activate. Once you approve the app, kokopelli stores the credentials automatically.
Credential Storage¶
Credentials are stored at:
Defaults to ~/.config/kokopelli/credentials.toml. The file is written with 0600
permissions (owner-read only).
Token Renewal¶
Kokopelli renews your access token automatically when it is within four weeks of expiry.
If renewal fails at startup the existing token is kept and a warning is printed to stderr.
Re-run --configure to force a fresh authentication.
Environment Variables¶
You can supply credentials via environment variables instead of running the wizard:
| Variable | Description |
|---|---|
TRAKT_CLIENT_ID |
Your application's Client ID |
TRAKT_CLIENT_SECRET |
Your application's Client Secret |
TRAKT_UNRATED_LIMIT |
Maximum unrated watched items to show (default: 20) |
CLI Options¶
| Option | Description |
|---|---|
--configure |
Force re-authentication |
--limit N |
Maximum unrated watched items to show (default: 20; overrides TRAKT_UNRATED_LIMIT) |