{"_id":"@0x402/config","_rev":"3-335898e37b3aa14a66a62ce02bd71bfb","name":"@0x402/config","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@0x402/config","version":"0.1.0","keywords":["config","cli","mcp"],"author":{"name":"Wayne Kuo"},"license":"MIT","_id":"@0x402/config@0.1.0","maintainers":[{"name":"waynekuo","email":"wayne.k@typuslab.com"}],"homepage":"https://wayneal.github.io/0G","bugs":{"url":"https://github.com/WayneAl/0G/issues"},"dist":{"shasum":"0b6930ce0bde8ce9e74fd9a03bc2b6b0ea266424","tarball":"https://registry.npmjs.org/@0x402/config/-/config-0.1.0.tgz","fileCount":5,"integrity":"sha512-FgUgCOPVFdh8BkGzdH8/IPtCPSZB8swil+LK2H104X+x5YMukNq5bpNpb6u1sfA+A0I03KsW3TipVL/UjKDN3Q==","signatures":[{"sig":"MEUCIQDudhnmvvxy8CIuSOWicZAX6GSKU6ZHQGdXZ9lypBR++QIgE3oZ8YEcxI3vqn5QDLv5m1gPhZzZAt4+//CoeCV1lZQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17047},"main":"./dist/index.js","type":"module","_from":"file:0x402-config-0.1.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit"},"_npmUser":{"name":"waynekuo","email":"wayne.k@typuslab.com"},"_resolved":"/private/var/folders/v9/gfr09p7j5nj2hsj_v0h5cq480000gn/T/8936d3afe2d29c8637b7e447378a7891/0x402-config-0.1.0.tgz","_integrity":"sha512-FgUgCOPVFdh8BkGzdH8/IPtCPSZB8swil+LK2H104X+x5YMukNq5bpNpb6u1sfA+A0I03KsW3TipVL/UjKDN3Q==","repository":{"url":"git+https://github.com/WayneAl/0G.git","type":"git","directory":"packages/config"},"_npmVersion":"11.11.0","description":"~/.acu/config.json, read the same way by every shell: env > file > default, written 0600 inside a 0700 directory, atomically.","directories":{},"_nodeVersion":"24.14.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.5","@types/node":"^22.13.1"},"_npmOperationalInternal":{"tmp":"tmp/config_0.1.0_1788793209495_0.16965555839148316","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@0x402/config","version":"0.1.1","keywords":["config","cli","mcp"],"author":{"name":"Wayne Kuo"},"license":"MIT","_id":"@0x402/config@0.1.1","maintainers":[{"name":"waynekuo","email":"wayne.k@typuslab.com"}],"homepage":"https://wayneal.github.io/0G","bugs":{"url":"https://github.com/WayneAl/0G/issues"},"dist":{"shasum":"348c0ea67d376b6fa9b55009ad14504b692ea939","tarball":"https://registry.npmjs.org/@0x402/config/-/config-0.1.1.tgz","fileCount":5,"integrity":"sha512-P/33gqsg5RCzMBlVQhZ0vMW+cx/wN99T4E8JLz5LnZVHH5RP3HyOlhdvTjLFvYHpfR6PcMlL/3DNQ3cdDN01fA==","signatures":[{"sig":"MEYCIQDNgDwI8UPQ8hDslRGWPOuLZRKJqZeOIXhSZuuBXK02OgIhANn6N65NFYGTqEMVf9FNqd46TBiLh/efHDsDW+VlQTzy","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18636},"main":"./dist/index.js","type":"module","_from":"file:0x402-config-0.1.1.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit"},"_npmUser":{"name":"waynekuo","email":"wayne.k@typuslab.com"},"_resolved":"/private/var/folders/v9/gfr09p7j5nj2hsj_v0h5cq480000gn/T/8516a8a846d0fd65cbdb33646417aa70/0x402-config-0.1.1.tgz","_integrity":"sha512-P/33gqsg5RCzMBlVQhZ0vMW+cx/wN99T4E8JLz5LnZVHH5RP3HyOlhdvTjLFvYHpfR6PcMlL/3DNQ3cdDN01fA==","repository":{"url":"git+https://github.com/WayneAl/0G.git","type":"git","directory":"packages/config"},"_npmVersion":"11.11.0","description":"~/.acu/config.json, read the same way by every shell: env > file > default, written 0600 inside a 0700 directory, atomically.","directories":{},"_nodeVersion":"24.14.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.5","@types/node":"^22.13.1"},"_npmOperationalInternal":{"tmp":"tmp/config_0.1.1_1788838298836_0.8702349858920408","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@0x402/config","version":"0.1.2","description":"~/.acu/config.json, read the same way by every shell: env > file > default, written 0600 inside a 0700 directory, atomically.","license":"MIT","author":{"name":"Wayne Kuo"},"homepage":"https://wayneal.github.io/0G","repository":{"type":"git","url":"git+https://github.com/WayneAl/0G.git","directory":"packages/config"},"bugs":{"url":"https://github.com/WayneAl/0G/issues"},"keywords":["config","cli","mcp"],"type":"module","main":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"publishConfig":{"access":"public"},"devDependencies":{"@types/node":"^22.13.1","vitest":"^3.0.5"},"scripts":{"build":"tsc -p tsconfig.build.json","test":"vitest run","typecheck":"tsc --noEmit"},"types":"./dist/index.d.ts","_id":"@0x402/config@0.1.2","_integrity":"sha512-e2sw7ztGxC381j+RxtqI+c26L/fFU8vhpti2bB9KqB83DYYbskuZoP6OzL1CaHkYupMX46MlNKAkF5wlbdNr4Q==","_resolved":"/private/var/folders/v9/gfr09p7j5nj2hsj_v0h5cq480000gn/T/ef53387405c90e3c3153badc06c1b74d/0x402-config-0.1.2.tgz","_from":"file:0x402-config-0.1.2.tgz","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-e2sw7ztGxC381j+RxtqI+c26L/fFU8vhpti2bB9KqB83DYYbskuZoP6OzL1CaHkYupMX46MlNKAkF5wlbdNr4Q==","shasum":"256b958deafd3eba3d220ca78728d023b6dbcbee","tarball":"https://registry.npmjs.org/@0x402/config/-/config-0.1.2.tgz","fileCount":5,"unpackedSize":18636,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGzAeQQ/4nlzKZddzRqqRQX23Dfnk6qvmbFKPizh9KehAiBL6LYvv8o77A/rOgnw613XyEbEk9auQK/3Oib8aWaxcQ=="}]},"_npmUser":{"name":"waynekuo","email":"wayne.k@typuslab.com"},"directories":{},"maintainers":[{"name":"waynekuo","email":"wayne.k@typuslab.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/config_0.1.2_1788845343787_0.30323305284080293"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-07T15:00:09.321Z","modified":"2026-09-08T05:29:04.092Z","0.1.0":"2026-09-07T15:00:09.631Z","0.1.1":"2026-09-08T03:31:38.957Z","0.1.2":"2026-09-08T05:29:03.929Z"},"bugs":{"url":"https://github.com/WayneAl/0G/issues"},"author":{"name":"Wayne Kuo"},"license":"MIT","homepage":"https://wayneal.github.io/0G","keywords":["config","cli","mcp"],"repository":{"type":"git","url":"git+https://github.com/WayneAl/0G.git","directory":"packages/config"},"description":"~/.acu/config.json, read the same way by every shell: env > file > default, written 0600 inside a 0700 directory, atomically.","maintainers":[{"name":"waynekuo","email":"wayne.k@typuslab.com"}],"readme":"# @0x402/config\n\n`~/.acu/config.json` — the one place a key and its settings are read from, for every\nshell.\n\n```bash\nnpm i @0x402/config\n```\n\n```ts\nimport { readUserConfig, writeUserConfig, configPath, resolve } from \"@0x402/config\";\n\nconst user = readUserConfig();\nconst auditorUrl = resolve(process.env.ACU_AUDITOR_URL, user.auditorUrl, DEFAULT);\n```\n\n**Precedence is env > file > built-in default**, everywhere, through `resolve`. An\noperator can always override the file for one process without editing it, and an empty\nenvironment variable counts as unset rather than as an empty string.\n\nThis is what makes `claude mcp add acu -- npx -y @0x402/mcp` need no environment\nvariables: [`@0x402/cli`](https://www.npmjs.com/package/@0x402/cli)'s `init` writes the key,\nand the MCP server reads the same file. MCP configuration is fixed at install time, so\na key that arrived later used to mean removing and re-adding the server.\n\n## Two properties it holds on to\n\n**The file holds a private key**, so it is written `0600` inside a `0700` directory,\nand written atomically via tmp + rename — a half-written config would be a lost key.\nWrites *merge*, so one command adding an auditor URL cannot erase another's key, and\nfields this version has never heard of are carried through untouched.\n\n**Absence is not a failure; corruption is.** No file means \"you have not run `init`\nyet\" and every field comes back null. A file that exists and will not parse throws,\nbecause reading a damaged config as \"no key\" would send someone to generate a second\nkey over the top of a funded one.\n\nDepends on node builtins and nothing else, so importing it can never drag a parser or\na network client into a shell that only wanted to know its key.\n\n---\n\n[Repository](https://github.com/WayneAl/0G) · [Site](https://wayneal.github.io/0G) · MIT\n","readmeFilename":"README.md"}