tofuref

April 7, 2026 · View on GitHub

tofuref

opentrend.dev reach PyPI - Version AUR - Version Homebrew PyPI - License GitHub Repo stars

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.

Screenshot

Installation

pipx install tofuref

# or with Homebrew
brew install djetelina/tap/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

Star History

Star History Chart
Controls

Actions

keybindingsaction
s, /search in the context of providers and resources
u, ycontext aware copying (using a provider/resource)
vchange active provider version
bpersistently bookmark an item to prioritize them in sorting when next re-ordered
q, ctrl+qquit tofuref
ttoggle table of contents from content window
Bfrom content window, open active page in browser
ctrl+gopen GitHub repository for provider
ctrl+sShow stats of provider's github repo

Note: The GitHub functionality tries to use your GitHub token (env or gh cli) to avoid rate limiting.

Focus windows

keybindingsaction
tabfocus next window
shift+tabfocus previous window
pfocus providers window
rfocus resources window
cfocus content window
backspace, left arrowfocus previous 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.

namedescriptiontypedefaultenv
http_request_timeoutTimeout for all http requests (in seconds)float3.0TOFUREF_HTTP_REQUEST_TIMEOUT
index_cache_duration_daysHow long the provider index should be cached for (in days)int31TOFUREF_INDEX_CACHE_DURATION_DAYS
markdown_length_targetTarget markdown length (in characters) to keep tofuref responsiveint40_000TOFUREF_MARKDOWN_LENGTH_TARGET

Theme

These options belong to a toml section, [theme].

namedescriptiontypedefaultenv
uiColorscheme for the UI, inspect available themes through command palette (^p) Change theme commandstringtextual-dark (or TEXTUAL_THEME env)TOFUREF_THEME_UI
codeblocksCURRENTLY WORKS ONLY IN COPY MENU The pygments style for code blocksstringmaterialTOFUREF_THEME_CODEBLOCKS
borders_styleThe borders to use for windows, list and showcase of available herestringasciiTOFUREF_THEME_BORDERS_STYLE
emojiWhether to display emojis or letters as iconsbooltrueTOFUREF_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