generated from Xithrius/rust-binary-project-template
-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Environment variable support for tokens. (#240)
- Loading branch information
Showing
6 changed files
with
54 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Configuration and installation | ||
|
||
The how-to of getting this application up and running. | ||
|
||
- [Installation](installation.md) | ||
- [Configuration](configuration.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Configuration | ||
|
||
## Config file | ||
|
||
After running `twt` for the first time, a config file will be generated at the following locations, depending on your OS: | ||
|
||
- Linux/MacOS: `~/.config/twt/config.toml` | ||
- Windows: `%appdata%\twt\config.toml` | ||
|
||
You can find the default configuration values [here](https://github.com/Xithrius/twitch-tui/blob/main/default-config.toml). | ||
|
||
## Auth | ||
|
||
Get an OAuth token from [Twitch](https://twitchapps.com/tmi/), and put the value in one of two places: | ||
|
||
1. The `token` variable in the `config.toml` that was previously generated. | ||
2. The environment variable `TWT_TOKEN`. | ||
|
||
The environment variable will be used first, even if a token exists in `config.toml`. If one doesn't exist there, your config token will be used. | ||
|
||
## Run it | ||
|
||
Run `twt` in the terminal. For help, `twt --help`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters