TUI for OpenTofu provider registry.
Project description
tofuref
A terminal UI for browsing the OpenTofu provider registry. Search providers and resources, read docs, copy required_providers blocks and code snippets — all without leaving the terminal.
Installation
pipx install tofuref
# or from AUR
yay -S tofuref
Usage
tofuref
Jump straight to a resource (-r) or data source (-d):
tofuref -r keycloak_user
tofuref -d github_actions_environment_secrets
tofuref -r user -p mrparkers/keycloak
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 |
B |
from content window, open active page in browser |
ctrl+g |
open GitHub repository for provider |
ctrl+s |
Show stats of provider's github repo |
Note: The GitHub functionality tries to use your GitHub token (env or
ghcli) to avoid rate limiting.
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 |
backspace, left arrow |
focus previous window |
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 |
| markdown_length_target | Target markdown length (in characters) to keep tofuref responsive | int | 40_000 | TOFUREF_MARKDOWN_LENGTH_TARGET |
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 | CURRENTLY WORKS ONLY IN COPY MENU The pygments style for code blocks | string | material | TOFUREF_THEME_CODEBLOCKS |
| borders_style | The borders to use for windows, list and showcase of available here | 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:
[theme]
ui = "dracula"
codeblocks = "dracula"
borders_style = "vkey"
Upgrade
pipx upgrade tofuref
Development
Setup
just init
Testing
Run tests:
just test
Update snapshots for tests if the diff was expected:
just test-update
Running
just run
Undocumented config options
Intended mainly for development.
Force downloading from API to see the first time load experience:
TOFUREF_DISABLE_CACHE=1 uv run tofuref
Show popups with load times for provider/resource listings:
TOFUREF_SHOW_LOAD_TIMES=1 uv run tofuref
Or combine those:
TOFUREF_SHOW_LOAD_TIMES=1 TOFUREF_DISABLE_CACHE=1 uv run tofuref
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tofuref-1.8.0.tar.gz.
File metadata
- Download URL: tofuref-1.8.0.tar.gz
- Upload date:
- Size: 445.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
347a64743ad076707fb1668de36e09323f58aa246c4f65381091add74014c4c9
|
|
| MD5 |
e9876e0088ac5a91e4c1eb5a7f8efec4
|
|
| BLAKE2b-256 |
8071c86c0806858b6c1b58b6c05570bc88f130de8872e0478bd43cb51dab0f6a
|
Provenance
The following attestation bundles were made for tofuref-1.8.0.tar.gz:
Publisher:
python-publish.yml on djetelina/tofuref
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tofuref-1.8.0.tar.gz -
Subject digest:
347a64743ad076707fb1668de36e09323f58aa246c4f65381091add74014c4c9 - Sigstore transparency entry: 1186501288
- Sigstore integration time:
-
Permalink:
djetelina/tofuref@3a75f56644b0c0b2d823aa00d7f073d6c7ab9e70 -
Branch / Tag:
refs/tags/v1.8.0 - Owner: https://github.com/djetelina
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@3a75f56644b0c0b2d823aa00d7f073d6c7ab9e70 -
Trigger Event:
release
-
Statement type:
File details
Details for the file tofuref-1.8.0-py3-none-any.whl.
File metadata
- Download URL: tofuref-1.8.0-py3-none-any.whl
- Upload date:
- Size: 35.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31cec9a3e4fbc1c2616078f9274e24cdd2e0c5ceb2af996b4ce2ff9f43e80f75
|
|
| MD5 |
5b575b45dcd2d1c596c1195658263f29
|
|
| BLAKE2b-256 |
83eaa743b06d6e8f20f14480928b93ff5edfea63e9f1e7d0f16eb5899fbe43d1
|
Provenance
The following attestation bundles were made for tofuref-1.8.0-py3-none-any.whl:
Publisher:
python-publish.yml on djetelina/tofuref
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tofuref-1.8.0-py3-none-any.whl -
Subject digest:
31cec9a3e4fbc1c2616078f9274e24cdd2e0c5ceb2af996b4ce2ff9f43e80f75 - Sigstore transparency entry: 1186501294
- Sigstore integration time:
-
Permalink:
djetelina/tofuref@3a75f56644b0c0b2d823aa00d7f073d6c7ab9e70 -
Branch / Tag:
refs/tags/v1.8.0 - Owner: https://github.com/djetelina
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@3a75f56644b0c0b2d823aa00d7f073d6c7ab9e70 -
Trigger Event:
release
-
Statement type: