@api-doctor/cli 0.0.1 → 0.0.4

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/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Qualty
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,15 +1,101 @@
1
- # @api-doctor/cli
1
+ # api-doctor
2
2
 
3
+ [![node version](https://img.shields.io/npm/v/@api-doctor/cli)](https://www.npmjs.com/package/@api-doctor/cli)
4
+ [![npm downloads](https://img.shields.io/npm/dt/@api-doctor/cli?color=007ec6)](https://www.npmjs.com/package/@api-doctor/cli)
3
5
 
4
- Oxlint-powered checks for AI-generated API integrations. Catch silent bugs before they ship.
6
+ api-doctor scans AI-generated code for bad API integrations.
5
7
 
6
- **This package is a placeholder.** The CLI is in active development.
8
+ Deterministic AST rules. Not a prompt. Same input, same output, every time.
7
9
 
8
- When released, you'll be able to run:
10
+ **[Full story and examples at apidoctor.co](https://apidoctor.co)**
9
11
 
12
+
13
+ [https://github.com/user-attachments/assets/53dab24f-528b-4f1b-87a9-8870002053d8](https://github.com/user-attachments/assets/53dab24f-528b-4f1b-87a9-8870002053d8)
14
+
15
+
16
+ ## Quick Start
17
+
18
+ ```bash
19
+ # Scan your project
10
20
  npx @api-doctor/cli .
11
21
 
22
+ # Or install as an agent skill (Claude Code, Cursor, Windsurf)
23
+ npx @api-doctor/cli install
24
+ ```
25
+
26
+
27
+ ## 📦 Supported Providers
28
+
29
+ | Provider | Rules |
30
+ | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
31
+ | [Resend](https://resend.com/docs) | [13 rules](https://github.com/qualtyco/api-doctor/blob/main/src/providers/resend/README.md) |
32
+ | [Supabase](https://supabase.com/docs) | [12 rules](https://github.com/qualtyco/api-doctor/blob/main/src/providers/supabase/README.md) |
33
+ | [Auth0](https://auth0.com/docs) | [4 rules](https://github.com/qualtyco/api-doctor/blob/main/src/providers/auth0/README.md) |
34
+ | [Firebase](https://firebase.google.com/docs) | [8 rules](https://github.com/qualtyco/api-doctor/blob/main/src/providers/firebase/README.md) |
35
+ | [Lovable](https://docs.lovable.dev) | [4 rules](https://github.com/qualtyco/api-doctor/blob/main/src/providers/lovable/README.md) |
36
+ | [Browserbase](https://docs.browserbase.com) | [11 rules](https://github.com/qualtyco/api-doctor/blob/main/src/providers/browserbase/README.md) |
37
+ | [OpenAI Computer Use](https://developers.openai.com/api/docs/guides/tools-computer-use) | [7 rules](https://github.com/qualtyco/api-doctor/blob/main/src/providers/openai-cua/README.md) |
38
+ | [TipTap](https://tiptap.dev/docs) | [11 rules](https://github.com/qualtyco/api-doctor/blob/main/src/providers/tiptap/README.md) |
39
+
40
+ Full rule catalogs live in the [GitHub repo](https://github.com/qualtyco/api-doctor/tree/main/src/providers) under `src/providers/<name>/README.md`.
41
+
42
+ ---
43
+
44
+ ## What it catches
45
+
46
+ Rules cover four categories: security (CWE/OWASP mapped), correctness (wrong endpoints), reliability (production failure modes), and integration (wiring gaps).
47
+
48
+ | Category | What it means | Examples |
49
+ | --------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
50
+ | **Security** | Issues that expose you to compromise. Mapped to CWE and OWASP audits. | Hardcoded API keys, secrets in the client bundle, webhooks read before signature verification |
51
+ | **Correctness** | Wrong endpoint or API for the job. | Marketing email via batch send, missing unsubscribe links, test domain in production |
52
+ | **Reliability** | Production failure modes the provider docs warn about. | Missing idempotency keys, batch limits not enforced, error codes not mapped |
53
+ | **Integration** | Wiring gaps your agent won't add on its own. | No tags, no request ID logging, bare `from` address instead of `"Name <email>"` |
54
+
55
+ ---
56
+
57
+ ## Why deterministic matters
58
+
59
+ You can't test AI code with AI. api-doctor breaks that loop. Same rules, same output, every time. Not a model call. Not a prompt.
60
+
61
+ ---
62
+
63
+ ## Telemetry
64
+
65
+ api-doctor sends anonymous usage data to PostHog so we can see whether the tool is helping developers catch real bugs.
66
+
67
+ **What we collect:**
68
+
69
+ - CLI version, Node.js version, platform
70
+ - Run context: local, CI, or agent
71
+ - Which API SDKs were detected (e.g. `resend`, `supabase`) — provider names only
72
+ - Which rules fired — rule names only, no code
73
+ - Score and finding counts
74
+ - Score delta between runs on the same project (stored locally in that project's `.api-doctor/run-history.json`)
75
+ - A hashed project identifier (`project_hash`) — SHA-256 of the scanned directory path, not the path itself
76
+ - Sanitized error messages and stack traces on unexpected crashes (paths redacted)
77
+
78
+ **What we never collect:**
79
+
80
+ - Your code or file contents
81
+ - Raw file paths or project names
82
+ - Email, name, or any personally identifying information
83
+
84
+ A random anonymous ID is stored at `~/.api-doctor/install-id`. Per-project run history is stored at `<project>/.api-doctor/run-history.json`. Both stay on your machine — only the event data above is sent to PostHog.
85
+
86
+ **Opt out:**
87
+
88
+ ```bash
89
+ npx @api-doctor/cli . --no-telemetry
90
+ npx @api-doctor/cli install --no-telemetry
91
+ ```
92
+
93
+ Or set `API_DOCTOR_TELEMETRY=0` or `DO_NOT_TRACK=1` in your environment.
94
+
95
+ ---
96
+
97
+ ## Help
12
98
 
13
- to scan AI-generated code for integration bugs across providers like Resend, Stripe, Supabase, and Railway.
99
+ - **New provider?** [Open an issue](https://github.com/qualtyco/api-doctor/issues)
14
100
 
15
- Follow progress at [github.com/qualtyco/api-doctor](https://github.com/qualtyco/api-doctor).
101
+ MIT © Qualty