https://github.com/djetelina/tofuref
TUI for OpenTofu provider registry
https://github.com/djetelina/tofuref
documentation opentofu terminal tui
Last synced: 4 months ago
JSON representation
TUI for OpenTofu provider registry
- Host: GitHub
- URL: https://github.com/djetelina/tofuref
- Owner: djetelina
- License: mit
- Created: 2025-05-01T10:45:51.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-06-13T18:05:13.000Z (4 months ago)
- Last Synced: 2025-06-13T18:25:54.036Z (4 months ago)
- Topics: documentation, opentofu, terminal, tui
- Language: Python
- Homepage: https://pypi.org/project/tofuref/
- Size: 1.05 MB
- Stars: 12
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-opentofu - tofuref - TUI for OpenTofu provider registry. (Tools / Registry)
README
# tofuref
[](https://pypi.org/project/tofuref/)


TUI for OpenTofu provider registry.

## Installation
```bash
pipx install tofuref
```## Usage
Run the application:
```bash
tofuref
```### Controls
#### Actions
| keybindings | action |
|---------------|----------------------------------------------------------------------------------|
| `s`, `/` | **search** in the context of providers and resources |
| `u`, `y` | Context aware copying (using a provider/resource) |
| `v` | change active provider **version** |
| `b` | persistently bookmark an item to prioritize them in sorting when next re-ordered |
| `q`, `ctrl+q` | **quit** tofuref |
| `t` | toggle **table of contents** from content window |
| `ctrl+l` | display **log** window |
| `ctrl+g` | open **GitHub** repository for provider |
| `ctrl+s` | Show **stats** of provider's github repo |#### Focus windows
| keybindings | action |
|-------------|----------------------------|
| `tab` | focus next window |
| `shift+tab` | focus previous window |
| `p` | focus **providers** window |
| `r` | focus **resources** window |
| `c` | focus **content** window |
| `f` | toggle **fullscreen** mode |### Navigate in a window
Navigate with arrows/page up/page down/home/end or your mouse.
VIM keybindings should be also supported in a limited capacity.
### Configuration
Default configuration can be overridden by a config file,
which can be overridden with env variables.Config file locations:
* Unix: `~/.config/tofuref/config.toml`
* macOS: `~/Library/Application Support"/tofuref/config.toml`
* Windows: `%USERPROFILE%\AppData\Local\tofuref\tofuref\config.toml`#### General
Put these as simple key=value in your config.toml.
| name | description | type | default | env |
|---------------------------|---------------------------------------------------------------------------------|-------|---------|-------------------------------------|
| http_request_timeout | Timeout for all http requests (in seconds) | float | 3.0 | `TOFUREF_HTTP_REQUEST_TIMEOUT` |
| index_cache_duration_days | How long the provider index should be cached for (in days) | int | 31 | `TOFUREF_INDEX_CACHE_DURATION_DAYS` |
| fullscreen_init_threshold | Threshold of terminal width under which tofuref should start in fullscreen mode | int | 125 | `TOFUREF_FULLSCREEN_INIT_THRESHOLD` |#### Theme
These options belong to a toml section, `[theme]`.
| name | description | type | default | env |
|---------------|--------------------------------------------------------------------------------------------------------------------------------------|--------|---------------------------------------|-------------------------------|
| ui | Colorscheme for the UI, inspect available themes through command palette (`^p`) `Change theme` command | string | textual-dark (or `TEXTUAL_THEME` env) | `TOFUREF_THEME_UI` |
| codeblocks | The [pygments style](https://pygments.org/styles/) for code blocks | string | material | `TOFUREF_THEME_CODEBLOCKS` |
| borders_style | The borders to use for windows, list and showcase of available [here](https://textual.textualize.io/styles/border/#all-border-types) | string | ascii | `TOFUREF_THEME_BORDERS_STYLE` |
| emoji | Whether to display emojis or letters as icons | bool | true | `TOFUREF_THEME_EMOJI` |#### Example file
Author's configuration:
```toml
fullscreen_init_threshold = 160[theme]
ui = "monokai"
codeblocks = "monokai"
borders_style = "vkey"
```## Upgrade
```bash
pipx upgrade tofuref
```## Development notes
`uv run --env-file=tests.env pytest --snapshot-update`