{"uid":"cap_ilLajaHKLEnU8Bqg_pEG1","slug":"api-strale-io-6ecef54a","name":"Env Template Generator","description":"Scan source code for environment variable references (process.env, os.environ, etc.) and generate a .env template with descriptions and example values.","url":"https://api.strale.io/x402/env-template-generate","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","properties":{"code":{"type":"string","description":"Source code to scan"},"project_description":{"type":"string"}}}},"additionalProperties":false}}},"responseSchema":null,"example":{"request":{"code":"const db = process.env.DATABASE_URL;\nconst apiKey = process.env.API_KEY;\nconst port = process.env.PORT || 3000;\nconst logLevel = process.env.LOG_LEVEL;","project_description":"Node.js backend service for a REST API"},"response":{"_meta":{"payment":{"method":"x402","price_usd":0.054000000000000006,"settlement_id":"0xf1d33e68de698a34688911c1ce88497c6877b20fbdbd417c7e3feac7defceb06"},"capability":"env-template-generate","latency_ms":1507,"provenance":{"source":"code-analysis+claude-haiku","fetched_at":"2026-06-13T04:25:54.064Z"}},"variables":[{"name":"DATABASE_URL","required":true,"description":"Connection string for the database","source_line":1,"example_value":"postgresql://user:password@localhost:5432/mydb"},{"name":"API_KEY","required":true,"description":"API key for external service authentication","source_line":2,"example_value":"sk_live_abc123def456ghi789jkl"},{"name":"PORT","required":false,"description":"Port number for the application server","source_line":3,"example_value":"3000"},{"name":"LOG_LEVEL","required":false,"description":"Logging level for application output","source_line":4,"example_value":"info"}],"env_template":"# Connection string for the database (required)\nDATABASE_URL=postgresql://user:password@localhost:5432/mydb\n\n# API key for external service authentication (required)\nAPI_KEY=sk_live_abc123def456ghi789jkl\n\n# Port number for the application server (optional)\nPORT=3000\n\n# Logging level for application output (optional)\nLOG_LEVEL=info\n","total_variables":4}},"exampleRequest":{"code":"const db = process.env.DATABASE_URL;\nconst apiKey = process.env.API_KEY;\nconst port = process.env.PORT || 3000;\nconst logLevel = process.env.LOG_LEVEL;","project_description":"Node.js backend service for a REST API"},"tags":["x402"],"displayCostAmount":"0.054001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.054001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.054","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.054","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_5TwVU2oj8uxZc4JP4VnSP","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.054","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Scans source code for environment variable references and generates a .env template with descriptions and example values","exampleAgentPrompt":"Scan this source code for all environment variable references like process.env and os.environ, then generate a .env template with descriptions and example values: `const db = process.env.DATABASE_URL; const key = process.env.API_KEY;`","exampleUseCases":[{"title":"Onboard new team members with auto-generated .env docs","prompt":"Our new developers keep asking what environment variables they need to set up. Can you scan our entire codebase and generate a .env.example file with descriptions for every variable they'll need?"},{"title":"Bootstrap CI/CD pipeline with required environment variables","prompt":"I'm setting up a new CI/CD pipeline and need to know exactly which environment variables our app depends on. Scan the source code and give me a properly documented .env template I can use for configuration."},{"title":"Audit code for undocumented environment variable usage","prompt":"Before we deploy this legacy service, I need visibility into all the environment variables it uses throughout the codebase. Can you extract them all and create a .env template so we can audit what's actually being configured?"}],"resultDescription":"A .env template file with all detected environment variable names, human-readable descriptions of what each variable does, and example/placeholder values — ready to be used as a project's .env.example file.","failureModes":["Empty or missing 'code' query parameter returns an error or empty template","Code with no environment variable references returns an empty template","Malformed or extremely large code snippets may fail to parse","Rate limiting or payment failure (402) if USDC balance is insufficient"],"whenToPreferThis":"Use this endpoint when you need to automatically document or bootstrap environment variable configuration for a code project — especially useful for onboarding, CI/CD setup, or generating .env.example files from existing code without manually reading through all source files.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:46:43.776Z","isFirstParty":false}