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
| Field | Type | Required | What it is |
|---|---|---|---|
code | string | No | Source code to scan |
project_description | string | No | — |
Output fields
How reliably each field appears in a successful answer.
| Field | Type | Appears |
|---|---|---|
variables | array | Always (present in every successful answer) |
env_template | string | Always (present in every successful answer) |
total_variables | integer | Always (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
}' {
"tool": "strale_execute",
"arguments": {
"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
}
} import { Strale } from "straleio";
const strale = new Strale({ apiKey: process.env.STRALE_API_KEY! });
const result = await strale.do({
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,
}); import os
from straleio import Strale, DoRequest
strale = Strale(api_key=os.environ["STRALE_API_KEY"])
result = strale.do(DoRequest(
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,
)) # No account. The first request answers 402 with the price in USDC;
# an x402 client pays it from your wallet and repeats the request.
curl -i 'https://api.strale.io/x402/v2/env-template-generate?code=function+hello%28%29+%7B+return+%27world%27%3B+%7D&project_description=This+is+a+test+input+for+automated+capability+testing.' 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
Related tools
- Agent Trace Analysis €0.20
- API Docs Generator €0.20
- API Mock Responses €0.05
- Changelog Generator €0.03
- Code Converter €0.05
- Commit Message Generator €0.05