autotel-cli 0.8.7 → 0.8.8
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 +72 -6
- package/dist/index.js +1523 -381
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
# autotel-cli
|
|
2
2
|
|
|
3
|
-
CLI for autotel
|
|
3
|
+
CLI for autotel — setup wizard, diagnostics, and incremental features.
|
|
4
|
+
|
|
5
|
+
Designed for **both humans and AI agents**: every command supports `--json`,
|
|
6
|
+
errors are returned as a structured envelope with stable `AUTOTEL_E_*` codes,
|
|
7
|
+
and the binary describes itself via `autotel schema`.
|
|
8
|
+
|
|
9
|
+
For agents: see [`SKILL.md`](./SKILL.md) for the one-command bootstrap.
|
|
4
10
|
|
|
5
11
|
## Installation
|
|
6
12
|
|
|
@@ -30,12 +36,42 @@ npx autotel init --preset node-datadog-pino
|
|
|
30
36
|
npx autotel init --dry-run
|
|
31
37
|
```
|
|
32
38
|
|
|
39
|
+
By default `autotel init` **scans your package.json** (and the workspace root
|
|
40
|
+
if you're in a monorepo) and proposes a plan: which presets to wire, which
|
|
41
|
+
packages to install, which env vars you'll need. Detected loggers, web
|
|
42
|
+
frameworks, MCP servers, Sentry, Cloudflare, etc. are wired automatically;
|
|
43
|
+
deps covered by `@opentelemetry/auto-instrumentations-node` (Express,
|
|
44
|
+
Fastify, NestJS, Next.js, pg, redis, …) are listed but not wired
|
|
45
|
+
individually.
|
|
46
|
+
|
|
33
47
|
**Options:**
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
48
|
+
|
|
49
|
+
| Flag | What it does |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| `--yes, -y` | Auto-apply detected items; no prompts |
|
|
52
|
+
| `--preset <name>` | Use a named quick preset (skips detection) |
|
|
53
|
+
| `--dry-run` | Print plan; write nothing |
|
|
54
|
+
| `--no-install` | Generate files only; print install command |
|
|
55
|
+
| `--force` | Overwrite a hand-edited instrumentation file (backup written) |
|
|
56
|
+
| `--no-detect` | Skip auto-detection; requires `--plan`, `--input`, or `--preset` |
|
|
57
|
+
| `--detect-only` | Print the detected plan and exit |
|
|
58
|
+
| `--plan <path>` | Apply a pre-built `InitPlan` JSON file |
|
|
59
|
+
| `--input -` / `--input <path>` | Read `InitPlan` JSON from stdin or a file |
|
|
60
|
+
| `--scan-env` | Consent to reading `.env` / `.env.local` for backend detection |
|
|
61
|
+
| `--json` | Machine-readable JSON instead of human output |
|
|
62
|
+
| `--output-file <path>` | Persist JSON output to a file |
|
|
63
|
+
| `--no-secrets-in-output` | Redact secret-shaped values (`*KEY*`, `*TOKEN*`, etc.) |
|
|
64
|
+
| `--no-interactive` | Fail fast instead of prompting |
|
|
65
|
+
|
|
66
|
+
**Detection coverage:**
|
|
67
|
+
|
|
68
|
+
- **Frameworks (auto-wired):** Hono, MCP servers/clients, TanStack Start
|
|
69
|
+
- **Frameworks (via `auto-instrumentations-node`):** Express, Fastify, NestJS, Next.js, pg, mysql/2, redis, ioredis, GraphQL, AWS SDK
|
|
70
|
+
- **Loggers:** Pino (first-class — `init({ logger })`), Winston/Bunyan (auto-instrumented)
|
|
71
|
+
- **Subscribers:** PostHog, Mixpanel, Amplitude, Segment, Slack
|
|
72
|
+
- **Plugins:** Mongoose, Drizzle, Sentry
|
|
73
|
+
- **Platforms:** Cloudflare (from `wrangler.toml`), AWS Lambda, Edge
|
|
74
|
+
- **Backends from env vars:** `DD_API_KEY` → Datadog, `HONEYCOMB_API_KEY` → Honeycomb, `OTEL_EXPORTER_OTLP_ENDPOINT` → OTLP
|
|
39
75
|
|
|
40
76
|
**Quick presets:**
|
|
41
77
|
- `node-datadog-pino` - Node.js + Datadog + Pino logging
|
|
@@ -43,6 +79,36 @@ npx autotel init --dry-run
|
|
|
43
79
|
- `node-honeycomb` - Node.js + Honeycomb
|
|
44
80
|
- `node-otlp` - Node.js + Generic OTLP endpoint
|
|
45
81
|
|
|
82
|
+
### Agent-native discovery
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
autotel schema # Full command manifest with side-effect metadata
|
|
86
|
+
autotel schema errors # Error envelope shape + AUTOTEL_E_* codes
|
|
87
|
+
autotel schema outputs # JSON output shapes per command
|
|
88
|
+
autotel commands # Compact one-line-per-command listing
|
|
89
|
+
autotel examples [name] # Copy-pasteable examples
|
|
90
|
+
autotel version # Version + runtime info as JSON
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
All output is JSON. Errors are returned as:
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"ok": false,
|
|
98
|
+
"command": "autotel init",
|
|
99
|
+
"error": {
|
|
100
|
+
"type": "validation",
|
|
101
|
+
"code": "AUTOTEL_E_NO_PACKAGE_JSON",
|
|
102
|
+
"message": "No package.json found at ...",
|
|
103
|
+
"retryable": false,
|
|
104
|
+
"fix": "cd into a directory with a package.json, or pass --cwd <path>",
|
|
105
|
+
"expected": { "file": "package.json" }
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Exit codes: `0` success, `1` runtime failure, `2` validation/conflict.
|
|
111
|
+
|
|
46
112
|
### `autotel doctor`
|
|
47
113
|
|
|
48
114
|
Run diagnostics on your autotel setup.
|