Doctor and plugin cache
Check your teriac setup with doctor, and share downloaded providers across all your projects with the plugin cache.
Doctor
doctor is a full health check: store folders, active binaries, PATH order, PATH conflicts, shell
config and caches.
teriac doctorteriac doctor
Store
✔ ~/.teriac/store/terraform/ exists
✔ ~/.teriac/store/opentofu/ exists
Active versions
✔ terraform: active version is 1.9.0
✔ terraform: binary exists
✔ terraform: executes (Terraform v1.9.0)
– tofu: not set up (no versions installed)
PATH
✔ ~/.teriac/bin is in PATH
✔ ~/.teriac/bin precedes system dirs in PATH
✔ 'terraform' resolves to teriac-managed binary
✔ PATH block found in shell config (~/.zshrc)
Cache
✔ terraform version cache exists
– opentofu version cache not yet created
All checks passed. teriac is healthy.It exits with code 1 if anything is wrong, so you can use it in scripts and CI:
teriac doctor || exit 1What each check means
| Section | Check | If it fails |
|---|---|---|
| Store | The store folder for each tool exists | Install a version with teriac install, which creates it |
| Active versions | An active version is set, its binary exists and runs | teriac use <version> or teriac install <version> |
| PATH | ~/.teriac/bin is on PATH |
Restart your terminal; check the PATH block in your shell config |
| PATH | ~/.teriac/bin comes before system folders |
teriac upgrade moves it back to the front |
| PATH | terraform resolves to teriac's binary |
Another install wins, often Homebrew's /opt/homebrew/bin/terraform. Remove it or fix the order |
| PATH | The PATH block is in your shell config | Run teriac upgrade, or add the line by hand |
| Cache | The version list cache exists | Informational. It's created on the first install or ls --remote |
Provider plugin cache
Share downloaded providers across all your projects, so each provider version downloads once instead of once per project:
teriac plugin-cache on # enable
teriac plugin-cache status # show what's set (the default)
teriac plugin-cache off # remove what teriac addedThis sets plugin_cache_dir in your Terraform CLI config (~/.terraformrc, or
%APPDATA%\terraform.rc on Windows), with the cache in ~/.terraform.d/plugin-cache.
- OpenTofu reads the same file unless you have a
~/.tofurc, which teriac then updates too. - teriac never changes a
plugin_cache_diryou set yourself. offremoves only what teriac added.- If
TF_PLUGIN_CACHE_DIRis set in your environment, Terraform uses that instead, andstatustells you.
Why it helps
Without a cache, every project's terraform init downloads its own copy of each provider into
.terraform/. The AWS provider alone is several hundred megabytes. With the cache on, the second
project that needs the same version links it from the cache in a moment.
teriac server does this for you: all its runs share one provider cache on its data volume.