# Environment template generator

- Human page: https://happytails.ai/en/developer-tools/environment-template-generator/
- Markdown: https://happytails.ai/en/developer-tools/environment-template-generator.md
- Structured JSON: https://happytails.ai/agents/en/developer-tools/environment-template-generator/index.json
- Visibility: public

## Tool capabilities

| Property | Value |
| --- | --- |
| Tool ID | `environment-template-generator` |
| Category | developer-tools |
| Implementation | Registered implementation. Registration alone is not a production-quality guarantee. |
| Browser execution | Automatic updates after valid input or file selection. |
| Browser processing | Browser; see tool notes for network behavior. |
| HTTP API | Not callable through HTTP. |
| Browser-agent interface | run_current_tool |

### Implementation notes

Dialect: portable dotenv, not Docker Compose interpolation or a shell script. Names use ASCII letters, digits and underscores; the first character cannot be a digit. Optional export prefixes, # comments and literal single/double-quoted multiline values are supported. Backslash escapes and $ references are not expanded. Reports omit values and source lines. Use # empty for an environment with no assignments. Up to 10,000 assignments; up to 500 displayed issues with an omitted count. An accepted input produces a .env.example containing names and = only, without defaults, comments or secrets. Invalid or duplicate entries block the template. Runs on your device. No remote configuration, repository or credentials are queried. Up to 1,000,000 input characters; output files are limited to 4,000,000 characters each.

### Inputs and settings

Text input: Configuration text.

Example or placeholder shown in the interface (not a validated fixture):

```text
PORT=8080
TOKEN="example-only"
EMPTY=
```

Paste text to process locally. Review the supported syntax and the result before downloading. Results update as you type. Up to 1,000,000 characters.

No additional settings are declared for this tool.

### Browser-agent workflow

1. Open the human page in a browser that supports WebMCP.
2. Discover the interface exposed by that page; use its actual schema.
3. Select files on the page first when the tool requires files.
4. Call `run_current_tool` with valid input and settings.
5. Inspect the returned result or error and the displayed output. Retrieve files from the displayed download links.

Calls do not automatically copy or download results. Browser permissions still apply. Interface availability alone is not proof of successful execution.

### Planning specification

Portable dotenv dialect: ASCII names, optional export, = assignments, # comments and literal single/double-quoted multiline values. No escape conversion, variable interpolation, shell execution or Docker Compose semantics. Up to 10,000 assignments. Use # empty for no assignments. Runs on your device with no configuration, repository or credential lookups. Up to 1,000,000 input characters and 4,000,000 characters per output file.

This describes intended requirements. Use the implementation notes, interface schema and observed output to determine current support.

### Complete machine-readable capability record

```json
{
  "id": "environment-template-generator",
  "category": "developer-tools",
  "built": true,
  "requirements": "Portable dotenv dialect: ASCII names, optional export, = assignments, # comments and literal single/double-quoted multiline values. No escape conversion, variable interpolation, shell execution or Docker Compose semantics. Up to 10,000 assignments. Use # empty for no assignments. Runs on your device with no configuration, repository or credential lookups. Up to 1,000,000 input characters and 4,000,000 characters per output file.",
  "implementation": {
    "fields": [],
    "live": true,
    "presentation": "metrics",
    "note": "Dialect: portable dotenv, not Docker Compose interpolation or a shell script. Names use ASCII letters, digits and underscores; the first character cannot be a digit. Optional export prefixes, # comments and literal single/double-quoted multiline values are supported. Backslash escapes and $ references are not expanded. Reports omit values and source lines. Use # empty for an environment with no assignments. Up to 10,000 assignments; up to 500 displayed issues with an omitted count. An accepted input produces a .env.example containing names and = only, without defaults, comments or secrets. Invalid or duplicate entries block the template. Runs on your device. No remote configuration, repository or credentials are queried. Up to 1,000,000 input characters; output files are limited to 4,000,000 characters each.",
    "experience": {
      "automatic": true,
      "single": false,
      "inputMaxLength": 1000000,
      "inputMode": "text",
      "label": "Configuration text",
      "placeholder": "PORT=8080\nTOKEN=\"example-only\"\nEMPTY=\n",
      "help": "Paste text to process locally. Review the supported syntax and the result before downloading. Results update as you type. Up to 1,000,000 characters.",
      "action": null
    },
    "mode": "automatic",
    "interactive": false
  },
  "execution": "Browser interface",
  "api": null,
  "browser_agent": {
    "supported": true,
    "name": "run_current_tool",
    "discovery": "WebMCP on the human page in a supporting browser",
    "verification": "See audit/API-AUDIT.md; availability is not verification"
  }
}
```

## Page guide

Create a value-free .env.example from an environment file. Keep the variable names and remove defaults, comments and secrets.

How can we improve this tool?

Report a problem or share an idea.

Please leave out private information. Your message and the tool name go to our team via PostHog.

### How to use Environment template generator

1. Paste the source environment file.
2. Resolve any malformed or duplicate assignments.
3. Download .env.example and review its variable names before sharing.

## Useful next steps

- [Environment file validator](https://happytails.ai/en/developer-tools/environment-file-validator/) ([Markdown](https://happytails.ai/en/developer-tools/environment-file-validator.md))

- [Container environment diff](https://happytails.ai/en/developer-tools/container-environment-diff/) ([Markdown](https://happytails.ai/en/developer-tools/container-environment-diff.md))

## Extract the names your configuration uses

Paste a valid environment file in the supported portable dotenv dialect. The output retains each variable name in source order and follows it with an empty = assignment. Optional export prefixes are removed.

### Leave values and comments behind

Values, quoted multiline content, defaults and comments are omitted from the template. A secret written in a comment is not copied. The report contains only counts and fixed diagnostics; it does not include original values.

### Resolve ambiguity before generating a template

Malformed assignments or duplicate names block the template instead of guessing which entry to keep. The resulting .env.example documents observed names, not a verified list of every variable required by your application. Review names before sharing them.
