{"id":30418681,"url":"https://github.com/silent-watcher/dotx","last_synced_at":"2025-08-22T07:47:07.223Z","repository":{"id":309099695,"uuid":"1035166147","full_name":"Silent-Watcher/dotx","owner":"Silent-Watcher","description":"dotxx is a tiny CLI that makes it easy to set environment variables from a JSON file into an existing .env-style file using the @dotenvx/dotenvx API.","archived":false,"fork":false,"pushed_at":"2025-08-10T11:21:38.000Z","size":89,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-19T15:08:59.478Z","etag":null,"topics":["cli","dotenv","dotenvx","nodejs"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/dotxx","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Silent-Watcher.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-09T19:48:11.000Z","updated_at":"2025-08-12T18:23:15.000Z","dependencies_parsed_at":"2025-08-09T21:19:46.189Z","dependency_job_id":"c9106b2f-f12d-410b-983c-eddd03ef01cc","html_url":"https://github.com/Silent-Watcher/dotx","commit_stats":null,"previous_names":["silent-watcher/dotx"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Silent-Watcher/dotx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Silent-Watcher%2Fdotx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Silent-Watcher%2Fdotx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Silent-Watcher%2Fdotx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Silent-Watcher%2Fdotx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Silent-Watcher","download_url":"https://codeload.github.com/Silent-Watcher/dotx/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Silent-Watcher%2Fdotx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271606598,"owners_count":24788973,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","dotenv","dotenvx","nodejs"],"created_at":"2025-08-22T07:47:06.210Z","updated_at":"2025-08-22T07:47:07.202Z","avatar_url":"https://github.com/Silent-Watcher.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"assets/dotxx.png\" alt=\"dotxx\" width=\"200\" height=\"200\"\u003e\n\u003c/div\u003e\n\n# dotxx\n\n`dotxx` is a tiny CLI that makes it easy to set environment variables from a JSON file into an existing `.env`-style file using the `@dotenvx/dotenvx` API.\n\n---\n\n## Features\n\n* Read a structured JSON file and flatten nested keys into `UPPER_SNAKE_CASE` environment names.\n* Use `@dotenvx/dotenvx` to add/update each variable in a target env file.\n* Simple CLI with configurable input and output paths.\n* Helpful error messages when files are missing.\n\n---\n\n## Install\n\nInstall globally so the `dotx` command is available system-wide:\n\n```bash\nnpm install -g dotxx\n# or\nyarn global add dotxx\n```\n\nOr install as a project dependency and use with `npx`:\n\n```bash\n# install locally\nnpm install --save-dev dotxx\n# run\nnpx dotxx\n```\n\n\u003e After installing globally, users can simply run `dotx`.\n\n---\n\n## Usage\n\nDefault behavior (uses `./env.json` → `./.env.production`):\n\n```bash\ndotx\n```\n\nCustom input/output:\n\n```bash\ndotx -i ./configs/env.json -o ./deploy/.env.production\n# or\ndotx --input ./my-env.json --output ./.env.staging\n```\n\nCLI options:\n\n* `-i, --input \u003cpath\u003e` — path to JSON input file (default: `./env.json`)\n* `-o, --output \u003cpath\u003e` — path to target env file (default: `./.env.production`)\n* `-V, --version` — show version\n* `-h, --help` — show help\n\n**Behavior:** The CLI checks that both input and target files exist. If either is missing it prints an error, shows help, and exits with a nonzero code.\n\n---\n\n## Input format\n\n`env.json` can contain nested objects. Example:\n\n```json\n{\n  \"app\": { \"name\": \"my-app\", \"port\": 3000 },\n  \"db\": {\n    \"host\": \"localhost\",\n    \"port\": 5432,\n    \"credentials\": { \"user\": \"postgres\", \"pass\": \"secret\" }\n  },\n  \"featureFlag\": true,\n  \"timeout\": 30\n}\n```\n\n### Flattening rules\n\n* Keys are uppercased.\n* Nested keys are concatenated with `_`.\n* Values are stringified.\n\nFrom the example, `flattenInput` produces:\n\n```\nAPP_NAME=my-app\nAPP_PORT=3000\nDB_HOST=localhost\nDB_PORT=5432\nDB_CREDENTIALS_USER=postgres\nDB_CREDENTIALS_PASS=secret\nFEATUREFLAG=true\nTIMEOUT=30\n```\n\n---\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilent-watcher%2Fdotx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsilent-watcher%2Fdotx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilent-watcher%2Fdotx/lists"}