Env Template Generator

Scan source code for the environment variables it reads and generate a .env template with a description and example value for each.

Pay by wallet (x402) env-template-generate

Example

Example answer
{
  "variables": [],
  "env_template": "\n",
  "total_variables": 0
}

Inputs

FieldTypeRequiredWhat it is
codestringNoSource code to scan
project_descriptionstringNo—

Output fields

How reliably each field appears in a successful answer.

FieldTypeAppears
variablesarrayAlways (present in every successful answer)
env_templatestringAlways (present in every successful answer)
total_variablesintegerAlways (present in every successful answer)

How to call it

The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.

# Needs an API key. max_price_cents caps what this call may cost.
curl -X POST https://api.strale.io/v1/do \
  -H "Authorization: Bearer $STRALE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "capability_slug": "env-template-generate",
    "inputs": {
      "code": "function hello() { return 'world'; }",
      "project_description": "This is a test input for automated capability testing."
    },
    "max_price_cents": 5
  }'

Limitations

  • Dynamically named environment variables can be missed

    Generates .env templates from code analysis — dynamically constructed environment variable names may be missed

    What to do instead: Cross-reference with your deployment documentation to catch environment variables not referenced in code