.env stringify

env-stringify · version 1.0.0 · Versions & config · free, no key needed

Serialize unique env key/value entries to a canonical dotenv-subset document.

Use when you need to: env stringify · serialize env entries · stringify dotenv subset.

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "entries": [
    {
      "key": "HOST",
      "value": "localhost"
    },
    {
      "key": "NAME",
      "value": "Ada Lovelace"
    },
    {
      "key": "NOTE",
      "value": "say \"hi\"\nnow"
    },
    {
      "key": "EMPTY",
      "value": ""
    },
    {
      "key": "TAB",
      "value": "a\tb"
    }
  ]
}

Response:

{
  "result": {
    "text": "HOST=localhost\nNAME=\"Ada Lovelace\"\nNOTE=\"say \\\"hi\\\"\\nnow\"\nEMPTY=\nTAB=\"a\\tb\"\n"
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "env-stringify",
  "version": "1.0.0",
  "input": {
    "entries": [
      {
        "key": "HOST",
        "value": "localhost"
      },
      {
        "key": "NAME",
        "value": "Ada Lovelace"
      },
      {
        "key": "NOTE",
        "value": "say \"hi\"\nnow"
      },
      {
        "key": "EMPTY",
        "value": ""
      },
      {
        "key": "TAB",
        "value": "a\tb"
      }
    ]
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/env-stringify/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"entries":[{"key":"HOST","value":"localhost"},{"key":"NAME","value":"Ada Lovelace"},{"key":"NOTE","value":"say \"hi\"\nnow"},{"key":"EMPTY","value":""},{"key":"TAB","value":"a\tb"}]}'

The machine-readable contract is at /v1/tools/env-stringify/versions/1.0.0.

CLI

node cli.mjs run env-stringify 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.