@getfootgun/footgun 0.2.0 → 0.2.1

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.
Files changed (2) hide show
  1. package/bin/footgun.mjs +17 -1
  2. package/package.json +1 -1
package/bin/footgun.mjs CHANGED
@@ -87,8 +87,24 @@ async function scan(args) {
87
87
  await sendPing({ url: BASE, kind: "scan", counts: pingCounts(uniqueTraps(result.findings)) });
88
88
  }
89
89
 
90
+ const USAGE = `usage:
91
+ npx @getfootgun/footgun "<error text>"
92
+ npx @getfootgun/footgun lookup <provider> [context]
93
+ npx @getfootgun/footgun scan [path] [--json] [--fail-on breaks|will-break] [--key <key>]
94
+ npx @getfootgun/footgun context [path]
95
+
96
+ scan flags:
97
+ --json print machine-readable output
98
+ --fail-on breaks|will-break exit 1 when a finding of that kind is found
99
+ --key <key> search and scan with your private namespaces too
100
+
101
+ environment:
102
+ FOOTGUN_API_KEY same as --key
103
+ FOOTGUN_URL point at another server
104
+ FOOTGUN_SHARE=false turn off the anonymous usage count`;
105
+
90
106
  async function main() {
91
- if (!a || a === "--help") { console.log('usage:\n footgun "<error text>"\n footgun lookup <provider> [context]\n footgun scan [path] [--json] [--fail-on breaks|will-break] [--key <key>]\n footgun context [path]'); return; }
107
+ if (!a || process.argv.slice(2).some((x) => x === "--help" || x === "-h")) { console.log(USAGE); return; }
92
108
  // FOOTGUN_CONTEXT_DEADLINE_MS exists for tests. Exiting ends a scan still running past the deadline.
93
109
  if (a === "context") {
94
110
  const deadlineMs = Number(process.env.FOOTGUN_CONTEXT_DEADLINE_MS) || undefined;
package/package.json CHANGED
@@ -1 +1 @@
1
- { "name": "@getfootgun/footgun", "version": "0.2.0", "description": "Ask Footgun why a third-party API, platform, or AI tool just broke.", "bin": { "footgun": "bin/footgun.mjs" }, "scripts": { "prepublishOnly": "node ../scripts/check-publish.mjs" }, "type": "module", "license": "MIT", "files": ["bin", "lib", "README.md"], "engines": { "node": ">=20" } }
1
+ { "name": "@getfootgun/footgun", "version": "0.2.1", "description": "Ask Footgun why a third-party API, platform, or AI tool just broke.", "bin": { "footgun": "bin/footgun.mjs" }, "scripts": { "prepublishOnly": "node ../scripts/check-publish.mjs" }, "type": "module", "license": "MIT", "files": ["bin", "lib", "README.md"], "engines": { "node": ">=20" } }