keymap-cli 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -5
- package/dist/cli.js +14 -4
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -4,16 +4,14 @@ A values-free map of every secret you run, where it lives, and one command to ro
|
|
|
4
4
|
|
|
5
5
|
**It is a map, not a vault.** keymap never stores a secret value. The manifest and its state hold names, locations, timestamps and short salted hashes. Values move only between your existing CLIs (`gh`, `railway`, …) and the host, over stdin or a mode-600 temp file, never through a shell string or on a command line.
|
|
6
6
|
|
|
7
|
-
Built
|
|
7
|
+
Built after the OpenCode (Oct 16, 2026) and Railway (Oct 21, 2026) key thefts, when "rotate every variable" met "I don't remember where half of these are used".
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Day 4. All planned commands exist: `init`, `audit`, `mark`, `rotate`, `incident`, `remind`, `doctor`, for `local` (.env files), `github` (Actions secrets), `railway`, `vercel`, `fly`, `cloudflare` (Workers) and `supabase` (Edge Function secrets). OpenRouter keys can be minted by API. Not yet published to npm.
|
|
9
|
+
Commands: `init`, `audit`, `mark`, `rotate`, `incident`, `remind`, `doctor`. Hosts: `local` (.env files), `github` (Actions secrets), `railway`, `vercel`, `fly`, `cloudflare` (Workers), `supabase` (Edge Function secrets). OpenRouter keys can be minted by API.
|
|
12
10
|
|
|
13
11
|
## Quick start
|
|
14
12
|
|
|
15
13
|
```sh
|
|
16
|
-
npm i -g keymap-cli # or: npx keymap-cli
|
|
14
|
+
npm i -g keymap-cli # or: npx keymap-cli
|
|
17
15
|
cd your-project
|
|
18
16
|
keymap init -s local:.env github:owner/repo railway:api/production
|
|
19
17
|
# edit keymap.yaml: issuers, rotate_every, ignore list
|
package/dist/cli.js
CHANGED
|
@@ -10679,9 +10679,6 @@ var {
|
|
|
10679
10679
|
Help
|
|
10680
10680
|
} = import_index.default;
|
|
10681
10681
|
|
|
10682
|
-
// src/cli.ts
|
|
10683
|
-
import { basename } from "path";
|
|
10684
|
-
|
|
10685
10682
|
// src/exec.ts
|
|
10686
10683
|
import { execFile } from "child_process";
|
|
10687
10684
|
import { accessSync, constants } from "fs";
|
|
@@ -11835,6 +11832,9 @@ function formatDoctor(rows) {
|
|
|
11835
11832
|
|
|
11836
11833
|
// src/cli.ts
|
|
11837
11834
|
import { readFile as readFile4 } from "fs/promises";
|
|
11835
|
+
import { readFileSync as readFileSync2 } from "fs";
|
|
11836
|
+
import { fileURLToPath } from "url";
|
|
11837
|
+
import { basename, dirname as dirname3, join as join4 } from "path";
|
|
11838
11838
|
|
|
11839
11839
|
// src/prompt.ts
|
|
11840
11840
|
import { createInterface } from "readline";
|
|
@@ -11929,8 +11929,18 @@ function parseSinkArg(arg) {
|
|
|
11929
11929
|
}
|
|
11930
11930
|
|
|
11931
11931
|
// src/cli.ts
|
|
11932
|
+
function pkgVersion() {
|
|
11933
|
+
const here = dirname3(fileURLToPath(import.meta.url));
|
|
11934
|
+
for (const rel of ["../package.json", "./package.json"]) {
|
|
11935
|
+
try {
|
|
11936
|
+
return JSON.parse(readFileSync2(join4(here, rel), "utf8")).version;
|
|
11937
|
+
} catch {
|
|
11938
|
+
}
|
|
11939
|
+
}
|
|
11940
|
+
return "0.0.0";
|
|
11941
|
+
}
|
|
11932
11942
|
var ctx = { exec: realExec, cwd: process.cwd() };
|
|
11933
|
-
var program2 = new Command().name("keymap").description("Values-free map of every secret you run, where it lives, and one command to rotate it everywhere.").version(
|
|
11943
|
+
var program2 = new Command().name("keymap").description("Values-free map of every secret you run, where it lives, and one command to rotate it everywhere.").version(pkgVersion());
|
|
11934
11944
|
program2.command("init").description("Discover secret names across sinks and write keymap.yaml (values are hashed in memory, never stored)").option("-p, --project <name>", "project name", basename(process.cwd())).option("-s, --sink <sink...>", `sinks to scan, e.g. local:.env github:owner/repo railway:api/production fly:myapp vercel:myproj/production+preview (supported: ${supportedSinks.join(", ")})`, ["local:.env"]).option("--all", "include config-looking names like PORT and NEXT_PUBLIC_*").option("--force", "overwrite an existing keymap.yaml").action(async (o) => {
|
|
11935
11945
|
const sinks = o.sink.map(parseSinkArg);
|
|
11936
11946
|
const r = await runInit({ project: o.project, sinks, all: o.all, force: o.force }, ctx);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keymap-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Values-free map of every secret you run, where it lives, and one command to rotate it everywhere.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Nekruz Kasimov",
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
"build": "tsup",
|
|
41
41
|
"dev": "tsx src/cli.ts",
|
|
42
42
|
"test": "vitest run",
|
|
43
|
-
"typecheck": "tsc --noEmit"
|
|
43
|
+
"typecheck": "tsc --noEmit",
|
|
44
|
+
"prepublishOnly": "npm run build && npm test"
|
|
44
45
|
},
|
|
45
46
|
"engines": {
|
|
46
47
|
"node": ">=20"
|