@tpmjs/tools-env-var-docs-generate
Parse .env file content and generate structured documentation with variable names, descriptions, required status, and default values. Supports comment-based documentation and REQUIRED/OPTIONAL markers.
Test @tpmjs/tools-env-var-docs-generate (envVarDocsGenerate) with AI-powered execution
0/2000 characters
Install this tool and use it with the AI SDK
npm install @tpmjs/tools-env-var-docs-generatepnpm add @tpmjs/tools-env-var-docs-generateyarn add @tpmjs/tools-env-var-docs-generatebun add @tpmjs/tools-env-var-docs-generatedeno add npm:@tpmjs/tools-env-var-docs-generateimport { envVarDocsGenerate } from '@tpmjs/tools-env-var-docs-generate';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { envVarDocsGenerate } from '@tpmjs/tools-env-var-docs-generate';
const result = await generateText({
model: openai('gpt-4o'),
tools: { envVarDocsGenerate },
prompt: 'Your prompt here...',
});
console.log(result.text);Available configuration options
envContentstringThe content of the .env file to parse and document
Schema extracted: 1/1/2026, 8:18:18 AM
Generates documentation for environment variables from .env files.
npm install @tpmjs/tools-env-var-docs-generate
import { envVarDocsGenerate } from '@tpmjs/tools-env-var-docs-generate'; import { generateText } from 'ai'; const result = await generateText({ model: yourModel, tools: { envVarDocsGenerate }, prompt: 'Generate documentation for this .env file: ...', });
envContent (string): The content of the .env file to parseReturns an object with:
variables (array): List of environment variables with metadata
name: Variable namedescription: Description from commentsrequired: Whether the variable is requireddefault: Default value if presentexample: Example value if presentmarkdown (string): Generated markdown documentationtotalVariables (number): Total count of variablesrequiredCount (number): Count of required variablesoptionalCount (number): Count of optional variablesconst envContent = ` # REQUIRED: Database connection URL DATABASE_URL=postgresql://localhost:5432/mydb # API key for external service API_KEY=your-api-key-here # OPTIONAL: Port number PORT=3000 `; const docs = await envVarDocsGenerate.execute({ envContent }); console.log(docs.markdown); // # Environment Variables // // Total: 3 variables (2 required, 1 optional) // // ## Required Variables // ...
# Comment above variable# REQUIRED: Description# OPTIONAL: DescriptionVAR_NAME=value # inline commentMIT
Downloads/month
0
Quality Score