autotel-cli 0.12.0 → 0.13.0
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 +23 -18
- package/dist/index.d.ts +1 -1
- package/dist/index.js +57 -10
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/skills/autotel-cli/SKILL.md +23 -21
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autotel-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "CLI for autotel - setup wizard, diagnostics, and incremental features",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -30,17 +30,17 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@eslint/js": "^10.0.1",
|
|
32
32
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
33
|
-
"@types/node": "^26.1.
|
|
33
|
+
"@types/node": "^26.1.1",
|
|
34
34
|
"@types/semver": "^7.7.1",
|
|
35
|
-
"eslint": "^10.
|
|
35
|
+
"eslint": "^10.7.0",
|
|
36
36
|
"eslint-config-prettier": "^10.1.8",
|
|
37
37
|
"eslint-plugin-unicorn": "^64.0.0",
|
|
38
|
-
"tsdown": "^0.22.
|
|
39
|
-
"tsx": "^4.23.
|
|
38
|
+
"tsdown": "^0.22.12",
|
|
39
|
+
"tsx": "^4.23.1",
|
|
40
40
|
"typescript": "^6.0.3",
|
|
41
|
-
"typescript-eslint": "^8.
|
|
41
|
+
"typescript-eslint": "^8.65.0",
|
|
42
42
|
"vitest": "^4.1.10",
|
|
43
|
-
"autotel-telemetry": "0.1.
|
|
43
|
+
"autotel-telemetry": "0.1.1"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=22.0.0"
|
|
@@ -42,19 +42,20 @@ npx autotel init --dry-run
|
|
|
42
42
|
|
|
43
43
|
**Key options:**
|
|
44
44
|
|
|
45
|
-
| Option
|
|
46
|
-
|
|
47
|
-
| `--yes / -y`
|
|
48
|
-
| `--preset <name>`
|
|
49
|
-
| `--dry-run`
|
|
50
|
-
| `--no-install`
|
|
51
|
-
| `--print-install-cmd` | Output the install command instead of running it
|
|
52
|
-
| `--force`
|
|
53
|
-
| `--workspace-root`
|
|
45
|
+
| Option | Effect |
|
|
46
|
+
| --------------------- | ---------------------------------------------------------- |
|
|
47
|
+
| `--yes / -y` | Non-interactive, accept defaults |
|
|
48
|
+
| `--preset <name>` | Use a quick preset |
|
|
49
|
+
| `--dry-run` | Print what would be done, no writes or installs |
|
|
50
|
+
| `--no-install` | Generate files only, skip package installation |
|
|
51
|
+
| `--print-install-cmd` | Output the install command instead of running it |
|
|
52
|
+
| `--force` | Overwrite existing config (backs up the old file first) |
|
|
53
|
+
| `--workspace-root` | Install at monorepo workspace root instead of package root |
|
|
54
54
|
|
|
55
55
|
Generated files:
|
|
56
|
-
|
|
57
|
-
-
|
|
56
|
+
|
|
57
|
+
- `src/instrumentation.mts` (or `.mjs`): the instrumentation entry point with section markers
|
|
58
|
+
- `.env.example`: env var template based on selected presets (written only if file does not exist)
|
|
58
59
|
|
|
59
60
|
After init, start your app with `--import`:
|
|
60
61
|
|
|
@@ -110,12 +111,12 @@ npx autotel add backend datadog --help
|
|
|
110
111
|
|
|
111
112
|
**Preset types:**
|
|
112
113
|
|
|
113
|
-
| Type
|
|
114
|
-
|
|
115
|
-
| `backend`
|
|
114
|
+
| Type | Examples |
|
|
115
|
+
| ------------ | ----------------------------------------- |
|
|
116
|
+
| `backend` | `datadog`, `honeycomb`, `otlp`, `local` |
|
|
116
117
|
| `subscriber` | `posthog`, `mixpanel`, `segment`, `slack` |
|
|
117
|
-
| `plugin`
|
|
118
|
-
| `platform`
|
|
118
|
+
| `plugin` | `mongoose`, `drizzle` |
|
|
119
|
+
| `platform` | AWS Lambda, Cloudflare Workers |
|
|
119
120
|
|
|
120
121
|
**Key options:** `--dry-run`, `--no-install`, `--force`, `--json` (for `--list`).
|
|
121
122
|
|
|
@@ -169,6 +170,7 @@ npx autotel codemod trace "src/**/*.ts" --print-files
|
|
|
169
170
|
### Package manager detection
|
|
170
171
|
|
|
171
172
|
Detected automatically from the nearest lockfile in this order:
|
|
173
|
+
|
|
172
174
|
1. `pnpm-lock.yaml` → pnpm
|
|
173
175
|
2. `bun.lockb` → bun
|
|
174
176
|
3. `yarn.lock` → yarn
|
|
@@ -215,7 +217,7 @@ Do not remove these markers if you want `autotel add` to continue working on the
|
|
|
215
217
|
|
|
216
218
|
## Common Mistakes
|
|
217
219
|
|
|
218
|
-
### HIGH
|
|
220
|
+
### HIGH: Forgetting `--import` when starting the app
|
|
219
221
|
|
|
220
222
|
```bash
|
|
221
223
|
# Wrong: instrumentation never runs
|
|
@@ -227,7 +229,7 @@ node --import ./src/instrumentation.mts dist/index.js
|
|
|
227
229
|
|
|
228
230
|
The instrumentation file must be loaded before any other module. The `--import` flag (Node.js 18.19+) is the correct mechanism. `require` or a top-level import inside app code is too late.
|
|
229
231
|
|
|
230
|
-
### HIGH
|
|
232
|
+
### HIGH: Running `autotel add` before `autotel init`
|
|
231
233
|
|
|
232
234
|
```bash
|
|
233
235
|
# Wrong: no instrumentation file exists yet
|
|
@@ -240,7 +242,7 @@ npx autotel add plugin mongoose
|
|
|
240
242
|
|
|
241
243
|
`add` reads and modifies the existing instrumentation file. It will fail if the file does not exist or is not CLI-owned (use `--force` for user-created files).
|
|
242
244
|
|
|
243
|
-
### MEDIUM
|
|
245
|
+
### MEDIUM: Globbing without quotes
|
|
244
246
|
|
|
245
247
|
```bash
|
|
246
248
|
# Wrong: shell expands the glob before the CLI sees it
|
|
@@ -250,11 +252,11 @@ npx autotel codemod trace src/**/*.ts
|
|
|
250
252
|
npx autotel codemod trace "src/**/*.ts"
|
|
251
253
|
```
|
|
252
254
|
|
|
253
|
-
### MEDIUM
|
|
255
|
+
### MEDIUM: Using `--force` on init without understanding the backup
|
|
254
256
|
|
|
255
257
|
`--force` on `init` overwrites an existing instrumentation file but creates a `.bak` backup first. The backup path is logged at `--verbose` level. If you ran `--force` accidentally, check for `instrumentation.mts.bak` in the same directory.
|
|
256
258
|
|
|
257
|
-
### MEDIUM
|
|
259
|
+
### MEDIUM: Using `--dry-run` and expecting installs to have run
|
|
258
260
|
|
|
259
261
|
`--dry-run` implies `--no-install` and `--print-install-cmd`. No files are written and no packages are installed. It is purely a preview mode.
|
|
260
262
|
|