tfenv AGENTS.md

Repository instructions for tfenv, a Bash tool that lets developers install and switch between Terraform versions. Terraform is software for defining and managing cloud and infrastructure resources with code.

In plain words
What is it for?
Use it when modifying tfenv scripts, libraries, tests, documentation, or CI-related files.
Why use it?
It gives coding agents the project structure, standards, dependencies, and required workflow before they change the repository.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/tfutils/tfenv/agents-md
Clone the repo
git clone --depth 1 https://github.com/tfutils/tfenv

Made for: Codex, OpenCode.

Per session 3,018 This file is loaded in full into every session.
When invoked 3,018 The same file — it is already loaded in full.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.03018 $0.03018
Opus 5 $0.01509 $0.01509
Sonnet 5 $0.00604 $0.00604
Haiku 4.5 $0.00302 $0.00302

Measured 2d ago against content hash 5ee2cb5714d6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tfenv AGENTS.md scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **Minimal dependencies:** bash, curl, grep/ggrep, sort, unzip
AGENTS.md · 326 lines

How it starts

The opening of the file, as written. The whole thing — 326 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Guidelines for tfutils/tfenv

Master context document for AI coding agents contributing to this repository. Every agent MUST read this file before starting work.


Project Overview

tfenv is a Terraform version manager written in Bash, modelled after rbenv. ~2.5k LOC across bin/, lib/, libexec/, test/, and share/.

  • Language: Bash (no shellcheck — deliberate choice; see ADR-0003)
  • Default branch: master
  • Current release: v3.2.0 (April 2026)
  • Maintainer: Mike Peachey / Jaz (@Zordrak)
  • Minimal dependencies: bash, curl, grep/ggrep, sort, unzip
  • License: MIT

Repository Structure

bin/              Entry points (terraform shim, tfenv command)
lib/              Shared libraries sourced by multiple scripts
libexec/          Subcommands (tfenv-install, tfenv-use, etc.)
test/             Integration tests (download real Terraform binaries)
share/            Static assets (HashiCorp PGP keys)
.github/          CI workflows, agent definitions, issue templates
  agents/         Agent definition files (.agent.md)
  instructions/   Auto-loaded coding standards
  ISSUE_TEMPLATE/ Structured issue forms
docs/
  adr/            Architecture Decision Records

Core Principles

1. Standalone Script Execution

Every libexec/ script contains its own boilerplate for resolving TFENV_ROOT and sourcing helpers. This is intentional — each script must be executable in isolation. Do NOT refactor this into a shared loader. See ADR-0002.

2. Worktree-First

ALL code changes MUST happen in a git worktree under .worktrees/. The main working tree is shared by all agents and the human — modifying it directly risks conflicts. .worktrees/ is gitignored.

# Create a worktree for your work
git worktree add .worktrees/fix-123 -b fix/123-description master

# Do all work inside the worktree
cd .worktrees/fix-123

# Clean up when done (after PR is created)
cd /path/to/main/tree
git worktree remove .worktrees/fix-123

Read the full file on GitHub · 326 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 326 lines · 3,018 tokens per session scan A 5ee2cb5714d6

Subscribe to this mod's changes

tfenv AGENTS.md is an instructions file published in the GitHub repository tfutils/tfenv (4,966 stars, last pushed 2mo ago), licensed MIT. It adds 3,018 tokens to every session, about $0.0151 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.