Skip to main content

TUI for OpenTofu provider registry.

Project description

tofuref

PyPI - Version PyPI - License PyPI - Downloads GitHub Repo stars

TUI for OpenTofu provider registry.

Screenshot

Features

  • Keyboard first navigation
  • Searchable index of providers and resources
  • Copy blocks for your required_providers
  • Copy snippets from the docs
  • Browse all provider versions
  • Bookmark frequently used providers and resources
  • Cache visited providers and resources
  • If the markdown viewer is not sufficient for you, quickly open the resource in your web browser
  • Check provider stats to see if they are production ready based on stars and forks
  • Configurable look to match the rest of your system

Installation

pipx install tofuref

Usage

Run the application:

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
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 gh cli) 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 notes

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tofuref-1.6.0.tar.gz (512.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tofuref-1.6.0-py3-none-any.whl (33.3 kB view details)

Uploaded Python 3

File details

Details for the file tofuref-1.6.0.tar.gz.

File metadata

  • Download URL: tofuref-1.6.0.tar.gz
  • Upload date:
  • Size: 512.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tofuref-1.6.0.tar.gz
Algorithm Hash digest
SHA256 1fa7df9aebe2356f18063e438fff935bc4d3c9fe84a9d1b5e6c7855da56ef515
MD5 46b49a5b2e158f7e2866d810ac1aea74
BLAKE2b-256 000a5db034d7ade551a0417fc6d09f6f2f82d912743ef76eecb601343de0dbf3

See more details on using hashes here.

Provenance

The following attestation bundles were made for tofuref-1.6.0.tar.gz:

Publisher: python-publish.yml on djetelina/tofuref

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tofuref-1.6.0-py3-none-any.whl.

File metadata

  • Download URL: tofuref-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 33.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tofuref-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d44e989fe9ca530c6109736529e8ca74a56caa8549364d319e1b8b7fc01b9d0d
MD5 7f1f44488717c1358e8f47ae6fd78d66
BLAKE2b-256 9db24a50153efe830e8b40a26db0ee7f881ca0fdc70f16925802f16f79d5556f

See more details on using hashes here.

Provenance

The following attestation bundles were made for tofuref-1.6.0-py3-none-any.whl:

Publisher: python-publish.yml on djetelina/tofuref

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page