@vforsh/argus 0.1.2 → 0.1.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/README.md +265 -16
- package/dist/.tsbuildinfo +1 -1
- package/dist/argus.js +16346 -0
- package/dist/bin.d.ts +1 -1
- package/dist/bin.js +49 -58
- package/dist/bin.js.map +1 -1
- package/dist/cdp/resolveCdpEndpoint.d.ts +15 -0
- package/dist/cdp/resolveCdpEndpoint.d.ts.map +1 -0
- package/dist/cdp/resolveCdpEndpoint.js +56 -0
- package/dist/cdp/resolveCdpEndpoint.js.map +1 -0
- package/dist/cdp/selectTarget.d.ts +26 -0
- package/dist/cdp/selectTarget.d.ts.map +1 -0
- package/dist/cdp/selectTarget.js +87 -0
- package/dist/cdp/selectTarget.js.map +1 -0
- package/dist/cdp/types.d.ts +13 -0
- package/dist/cdp/types.d.ts.map +1 -0
- package/dist/cdp/types.js +2 -0
- package/dist/cdp/types.js.map +1 -0
- package/dist/cli/parse.d.ts +11 -0
- package/dist/cli/parse.d.ts.map +1 -0
- package/dist/cli/parse.js +48 -0
- package/dist/cli/parse.js.map +1 -0
- package/dist/cli/program.d.ts +3 -0
- package/dist/cli/program.d.ts.map +1 -0
- package/dist/cli/program.js +21 -0
- package/dist/cli/program.js.map +1 -0
- package/dist/cli/register/registerChrome.d.ts +3 -0
- package/dist/cli/register/registerChrome.d.ts.map +1 -0
- package/dist/cli/register/registerChrome.js +79 -0
- package/dist/cli/register/registerChrome.js.map +1 -0
- package/dist/cli/register/registerClick.d.ts +3 -0
- package/dist/cli/register/registerClick.d.ts.map +1 -0
- package/dist/cli/register/registerClick.js +23 -0
- package/dist/cli/register/registerClick.js.map +1 -0
- package/dist/cli/register/registerConfig.d.ts +3 -0
- package/dist/cli/register/registerConfig.d.ts.map +1 -0
- package/dist/cli/register/registerConfig.js +14 -0
- package/dist/cli/register/registerConfig.js.map +1 -0
- package/dist/cli/register/registerDom.d.ts +3 -0
- package/dist/cli/register/registerDom.d.ts.map +1 -0
- package/dist/cli/register/registerDom.js +261 -0
- package/dist/cli/register/registerDom.js.map +1 -0
- package/dist/cli/register/registerEval.d.ts +3 -0
- package/dist/cli/register/registerEval.d.ts.map +1 -0
- package/dist/cli/register/registerEval.js +129 -0
- package/dist/cli/register/registerEval.js.map +1 -0
- package/dist/cli/register/registerExtension.d.ts +3 -0
- package/dist/cli/register/registerExtension.d.ts.map +1 -0
- package/dist/cli/register/registerExtension.js +46 -0
- package/dist/cli/register/registerExtension.js.map +1 -0
- package/dist/cli/register/registerFill.d.ts +3 -0
- package/dist/cli/register/registerFill.d.ts.map +1 -0
- package/dist/cli/register/registerFill.js +30 -0
- package/dist/cli/register/registerFill.js.map +1 -0
- package/dist/cli/register/registerHover.d.ts +3 -0
- package/dist/cli/register/registerHover.d.ts.map +1 -0
- package/dist/cli/register/registerHover.js +20 -0
- package/dist/cli/register/registerHover.js.map +1 -0
- package/dist/cli/register/registerKeydown.d.ts +3 -0
- package/dist/cli/register/registerKeydown.d.ts.map +1 -0
- package/dist/cli/register/registerKeydown.js +20 -0
- package/dist/cli/register/registerKeydown.js.map +1 -0
- package/dist/cli/register/registerLogs.d.ts +3 -0
- package/dist/cli/register/registerLogs.d.ts.map +1 -0
- package/dist/cli/register/registerLogs.js +64 -0
- package/dist/cli/register/registerLogs.js.map +1 -0
- package/dist/cli/register/registerNet.d.ts +3 -0
- package/dist/cli/register/registerNet.d.ts.map +1 -0
- package/dist/cli/register/registerNet.js +32 -0
- package/dist/cli/register/registerNet.js.map +1 -0
- package/dist/cli/register/registerPage.d.ts +3 -0
- package/dist/cli/register/registerPage.d.ts.map +1 -0
- package/dist/cli/register/registerPage.js +106 -0
- package/dist/cli/register/registerPage.js.map +1 -0
- package/dist/cli/register/registerQuickAccess.d.ts +3 -0
- package/dist/cli/register/registerQuickAccess.d.ts.map +1 -0
- package/dist/cli/register/registerQuickAccess.js +82 -0
- package/dist/cli/register/registerQuickAccess.js.map +1 -0
- package/dist/cli/register/registerScrollTo.d.ts +3 -0
- package/dist/cli/register/registerScrollTo.d.ts.map +1 -0
- package/dist/cli/register/registerScrollTo.js +22 -0
- package/dist/cli/register/registerScrollTo.js.map +1 -0
- package/dist/cli/register/registerSnapshot.d.ts +3 -0
- package/dist/cli/register/registerSnapshot.d.ts.map +1 -0
- package/dist/cli/register/registerSnapshot.js +37 -0
- package/dist/cli/register/registerSnapshot.js.map +1 -0
- package/dist/cli/register/registerStorage.d.ts +3 -0
- package/dist/cli/register/registerStorage.d.ts.map +1 -0
- package/dist/cli/register/registerStorage.js +56 -0
- package/dist/cli/register/registerStorage.js.map +1 -0
- package/dist/cli/register/registerThrottle.d.ts +3 -0
- package/dist/cli/register/registerThrottle.d.ts.map +1 -0
- package/dist/cli/register/registerThrottle.js +33 -0
- package/dist/cli/register/registerThrottle.js.map +1 -0
- package/dist/cli/register/registerTrace.d.ts +3 -0
- package/dist/cli/register/registerTrace.d.ts.map +1 -0
- package/dist/cli/register/registerTrace.js +39 -0
- package/dist/cli/register/registerTrace.js.map +1 -0
- package/dist/cli/register/registerWatcher.d.ts +3 -0
- package/dist/cli/register/registerWatcher.d.ts.map +1 -0
- package/dist/cli/register/registerWatcher.js +115 -0
- package/dist/cli/register/registerWatcher.js.map +1 -0
- package/dist/cli/validation.d.ts +10 -0
- package/dist/cli/validation.d.ts.map +1 -0
- package/dist/cli/validation.js +24 -0
- package/dist/cli/validation.js.map +1 -0
- package/dist/commands/chrome.d.ts +64 -0
- package/dist/commands/chrome.d.ts.map +1 -0
- package/dist/commands/chrome.js +583 -0
- package/dist/commands/chrome.js.map +1 -0
- package/dist/commands/chromeStart.d.ts +33 -0
- package/dist/commands/chromeStart.d.ts.map +1 -0
- package/dist/commands/chromeStart.js +380 -0
- package/dist/commands/chromeStart.js.map +1 -0
- package/dist/commands/configInit.d.ts +6 -0
- package/dist/commands/configInit.d.ts.map +1 -0
- package/dist/commands/configInit.js +102 -0
- package/dist/commands/configInit.js.map +1 -0
- package/dist/commands/doctor.d.ts +5 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +142 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/domAdd.d.ts +17 -0
- package/dist/commands/domAdd.d.ts.map +1 -0
- package/dist/commands/domAdd.js +181 -0
- package/dist/commands/domAdd.js.map +1 -0
- package/dist/commands/domAddScript.d.ts +14 -0
- package/dist/commands/domAddScript.d.ts.map +1 -0
- package/dist/commands/domAddScript.js +172 -0
- package/dist/commands/domAddScript.js.map +1 -0
- package/dist/commands/domClick.d.ts +13 -0
- package/dist/commands/domClick.d.ts.map +1 -0
- package/dist/commands/domClick.js +113 -0
- package/dist/commands/domClick.js.map +1 -0
- package/dist/commands/domFill.d.ts +14 -0
- package/dist/commands/domFill.d.ts.map +1 -0
- package/dist/commands/domFill.js +129 -0
- package/dist/commands/domFill.js.map +1 -0
- package/dist/commands/domFocus.d.ts +10 -0
- package/dist/commands/domFocus.d.ts.map +1 -0
- package/dist/commands/domFocus.js +52 -0
- package/dist/commands/domFocus.js.map +1 -0
- package/dist/commands/domHover.d.ts +10 -0
- package/dist/commands/domHover.d.ts.map +1 -0
- package/dist/commands/domHover.js +52 -0
- package/dist/commands/domHover.js.map +1 -0
- package/dist/commands/domInfo.d.ts +11 -0
- package/dist/commands/domInfo.d.ts.map +1 -0
- package/dist/commands/domInfo.js +61 -0
- package/dist/commands/domInfo.js.map +1 -0
- package/dist/commands/domKeydown.d.ts +10 -0
- package/dist/commands/domKeydown.d.ts.map +1 -0
- package/dist/commands/domKeydown.js +46 -0
- package/dist/commands/domKeydown.js.map +1 -0
- package/dist/commands/domModify.d.ts +36 -0
- package/dist/commands/domModify.d.ts.map +1 -0
- package/dist/commands/domModify.js +177 -0
- package/dist/commands/domModify.js.map +1 -0
- package/dist/commands/domRemove.d.ts +10 -0
- package/dist/commands/domRemove.d.ts.map +1 -0
- package/dist/commands/domRemove.js +52 -0
- package/dist/commands/domRemove.js.map +1 -0
- package/dist/commands/domScroll.d.ts +12 -0
- package/dist/commands/domScroll.d.ts.map +1 -0
- package/dist/commands/domScroll.js +105 -0
- package/dist/commands/domScroll.js.map +1 -0
- package/dist/commands/domScrollTo.d.ts +12 -0
- package/dist/commands/domScrollTo.d.ts.map +1 -0
- package/dist/commands/domScrollTo.js +107 -0
- package/dist/commands/domScrollTo.js.map +1 -0
- package/dist/commands/domSetFile.d.ts +12 -0
- package/dist/commands/domSetFile.d.ts.map +1 -0
- package/dist/commands/domSetFile.js +87 -0
- package/dist/commands/domSetFile.js.map +1 -0
- package/dist/commands/domTree.d.ts +12 -0
- package/dist/commands/domTree.d.ts.map +1 -0
- package/dist/commands/domTree.js +68 -0
- package/dist/commands/domTree.js.map +1 -0
- package/dist/commands/eval.d.ts +26 -0
- package/dist/commands/eval.d.ts.map +1 -0
- package/dist/commands/eval.js +152 -0
- package/dist/commands/eval.js.map +1 -0
- package/dist/commands/evalShared.d.ts +64 -0
- package/dist/commands/evalShared.d.ts.map +1 -0
- package/dist/commands/evalShared.js +205 -0
- package/dist/commands/evalShared.js.map +1 -0
- package/dist/commands/evalUntil.d.ts +27 -0
- package/dist/commands/evalUntil.d.ts.map +1 -0
- package/dist/commands/evalUntil.js +128 -0
- package/dist/commands/evalUntil.js.map +1 -0
- package/dist/commands/extension/doctor.d.ts +5 -0
- package/dist/commands/extension/doctor.d.ts.map +1 -0
- package/dist/commands/extension/doctor.js +262 -0
- package/dist/commands/extension/doctor.js.map +1 -0
- package/dist/commands/extension/id.d.ts +9 -0
- package/dist/commands/extension/id.d.ts.map +1 -0
- package/dist/commands/extension/id.js +122 -0
- package/dist/commands/extension/id.js.map +1 -0
- package/dist/commands/extension/info.d.ts +5 -0
- package/dist/commands/extension/info.d.ts.map +1 -0
- package/dist/commands/extension/info.js +68 -0
- package/dist/commands/extension/info.js.map +1 -0
- package/dist/commands/extension/list.d.ts +8 -0
- package/dist/commands/extension/list.d.ts.map +1 -0
- package/dist/commands/extension/list.js +194 -0
- package/dist/commands/extension/list.js.map +1 -0
- package/dist/commands/extension/nativeHost.d.ts +21 -0
- package/dist/commands/extension/nativeHost.d.ts.map +1 -0
- package/dist/commands/extension/nativeHost.js +106 -0
- package/dist/commands/extension/nativeHost.js.map +1 -0
- package/dist/commands/extension/remove.d.ts +5 -0
- package/dist/commands/extension/remove.d.ts.map +1 -0
- package/dist/commands/extension/remove.js +75 -0
- package/dist/commands/extension/remove.js.map +1 -0
- package/dist/commands/extension/setup.d.ts +6 -0
- package/dist/commands/extension/setup.d.ts.map +1 -0
- package/dist/commands/extension/setup.js +89 -0
- package/dist/commands/extension/setup.js.map +1 -0
- package/dist/commands/extension/status.d.ts +5 -0
- package/dist/commands/extension/status.d.ts.map +1 -0
- package/dist/commands/extension/status.js +82 -0
- package/dist/commands/extension/status.js.map +1 -0
- package/dist/commands/iframeHelper.d.ts +13 -0
- package/dist/commands/iframeHelper.d.ts.map +1 -0
- package/dist/commands/iframeHelper.js +63 -0
- package/dist/commands/iframeHelper.js.map +1 -0
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +40 -27
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/logs.d.ts +6 -2
- package/dist/commands/logs.d.ts.map +1 -1
- package/dist/commands/logs.js +55 -40
- package/dist/commands/logs.js.map +1 -1
- package/dist/commands/net.d.ts +11 -0
- package/dist/commands/net.d.ts.map +1 -0
- package/dist/commands/net.js +49 -0
- package/dist/commands/net.js.map +1 -0
- package/dist/commands/netTail.d.ts +12 -0
- package/dist/commands/netTail.d.ts.map +1 -0
- package/dist/commands/netTail.js +76 -0
- package/dist/commands/netTail.js.map +1 -0
- package/dist/commands/page.d.ts +12 -0
- package/dist/commands/page.d.ts.map +1 -0
- package/dist/commands/page.js +330 -0
- package/dist/commands/page.js.map +1 -0
- package/dist/commands/pageEmulation.d.ts +20 -0
- package/dist/commands/pageEmulation.d.ts.map +1 -0
- package/dist/commands/pageEmulation.js +215 -0
- package/dist/commands/pageEmulation.js.map +1 -0
- package/dist/commands/reload.d.ts +8 -0
- package/dist/commands/reload.d.ts.map +1 -0
- package/dist/commands/reload.js +23 -0
- package/dist/commands/reload.js.map +1 -0
- package/dist/commands/resolveTestId.d.ts +10 -0
- package/dist/commands/resolveTestId.d.ts.map +1 -0
- package/dist/commands/resolveTestId.js +16 -0
- package/dist/commands/resolveTestId.js.map +1 -0
- package/dist/commands/screenshot.d.ts +9 -0
- package/dist/commands/screenshot.d.ts.map +1 -0
- package/dist/commands/screenshot.js +27 -0
- package/dist/commands/screenshot.js.map +1 -0
- package/dist/commands/snapshot.d.ts +10 -0
- package/dist/commands/snapshot.d.ts.map +1 -0
- package/dist/commands/snapshot.js +54 -0
- package/dist/commands/snapshot.js.map +1 -0
- package/dist/commands/start.d.ts +20 -0
- package/dist/commands/start.d.ts.map +1 -0
- package/dist/commands/start.js +191 -0
- package/dist/commands/start.js.map +1 -0
- package/dist/commands/storageLocal.d.ts +18 -0
- package/dist/commands/storageLocal.d.ts.map +1 -0
- package/dist/commands/storageLocal.js +92 -0
- package/dist/commands/storageLocal.js.map +1 -0
- package/dist/commands/tail.d.ts +6 -2
- package/dist/commands/tail.d.ts.map +1 -1
- package/dist/commands/tail.js +49 -29
- package/dist/commands/tail.js.map +1 -1
- package/dist/commands/throttle.d.ts +13 -0
- package/dist/commands/throttle.d.ts.map +1 -0
- package/dist/commands/throttle.js +124 -0
- package/dist/commands/throttle.js.map +1 -0
- package/dist/commands/trace.d.ts +27 -0
- package/dist/commands/trace.d.ts.map +1 -0
- package/dist/commands/trace.js +109 -0
- package/dist/commands/trace.js.map +1 -0
- package/dist/commands/watcherNativeHost.d.ts +13 -0
- package/dist/commands/watcherNativeHost.d.ts.map +1 -0
- package/dist/commands/watcherNativeHost.js +45 -0
- package/dist/commands/watcherNativeHost.js.map +1 -0
- package/dist/commands/watcherPrune.d.ts +9 -0
- package/dist/commands/watcherPrune.d.ts.map +1 -0
- package/dist/commands/watcherPrune.js +82 -0
- package/dist/commands/watcherPrune.js.map +1 -0
- package/dist/commands/watcherStart.d.ts +26 -0
- package/dist/commands/watcherStart.d.ts.map +1 -0
- package/dist/commands/watcherStart.js +202 -0
- package/dist/commands/watcherStart.js.map +1 -0
- package/dist/commands/watcherStatus.d.ts +7 -0
- package/dist/commands/watcherStatus.d.ts.map +1 -0
- package/dist/commands/watcherStatus.js +22 -0
- package/dist/commands/watcherStatus.js.map +1 -0
- package/dist/commands/watcherStop.d.ts +5 -0
- package/dist/commands/watcherStop.d.ts.map +1 -0
- package/dist/commands/watcherStop.js +96 -0
- package/dist/commands/watcherStop.js.map +1 -0
- package/dist/config/argusConfig.d.ts +65 -0
- package/dist/config/argusConfig.d.ts.map +1 -0
- package/dist/config/argusConfig.js +331 -0
- package/dist/config/argusConfig.js.map +1 -0
- package/dist/emulation/devices.d.ts +15 -0
- package/dist/emulation/devices.d.ts.map +1 -0
- package/dist/emulation/devices.js +54 -0
- package/dist/emulation/devices.js.map +1 -0
- package/dist/eval/evalClient.d.ts +35 -0
- package/dist/eval/evalClient.d.ts.map +1 -0
- package/dist/eval/evalClient.js +71 -0
- package/dist/eval/evalClient.js.map +1 -0
- package/dist/httpClient.d.ts +6 -1
- package/dist/httpClient.d.ts.map +1 -1
- package/dist/httpClient.js +54 -1
- package/dist/httpClient.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/output/accessibility.d.ts +16 -0
- package/dist/output/accessibility.d.ts.map +1 -0
- package/dist/output/accessibility.js +61 -0
- package/dist/output/accessibility.js.map +1 -0
- package/dist/output/dom.d.ts +14 -0
- package/dist/output/dom.d.ts.map +1 -0
- package/dist/output/dom.js +92 -0
- package/dist/output/dom.js.map +1 -0
- package/dist/output/format.d.ts +3 -2
- package/dist/output/format.d.ts.map +1 -1
- package/dist/output/format.js +11 -3
- package/dist/output/format.js.map +1 -1
- package/dist/output/io.d.ts +14 -0
- package/dist/output/io.d.ts.map +1 -0
- package/dist/output/io.js +28 -0
- package/dist/output/io.js.map +1 -0
- package/dist/output/preview.d.ts +3 -0
- package/dist/output/preview.d.ts.map +1 -0
- package/dist/output/preview.js +6 -0
- package/dist/output/preview.js.map +1 -0
- package/dist/registry.d.ts +6 -4
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +24 -13
- package/dist/registry.js.map +1 -1
- package/dist/utils/chromeBin.d.ts +3 -0
- package/dist/utils/chromeBin.d.ts.map +1 -0
- package/dist/utils/chromeBin.js +46 -0
- package/dist/utils/chromeBin.js.map +1 -0
- package/dist/utils/paths.d.ts +3 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +8 -0
- package/dist/utils/paths.js.map +1 -0
- package/dist/utils/ports.d.ts +3 -0
- package/dist/utils/ports.d.ts.map +1 -0
- package/dist/utils/ports.js +39 -0
- package/dist/utils/ports.js.map +1 -0
- package/dist/watchers/candidates.d.ts +4 -0
- package/dist/watchers/candidates.d.ts.map +1 -0
- package/dist/watchers/candidates.js +7 -0
- package/dist/watchers/candidates.js.map +1 -0
- package/dist/watchers/requestWatcher.d.ts +42 -0
- package/dist/watchers/requestWatcher.d.ts.map +1 -0
- package/dist/watchers/requestWatcher.js +77 -0
- package/dist/watchers/requestWatcher.js.map +1 -0
- package/dist/watchers/resolveWatcher.d.ts +16 -0
- package/dist/watchers/resolveWatcher.d.ts.map +1 -0
- package/dist/watchers/resolveWatcher.js +50 -0
- package/dist/watchers/resolveWatcher.js.map +1 -0
- package/package.json +13 -14
- package/schemas/argus.config.schema.json +131 -0
package/README.md
CHANGED
|
@@ -6,52 +6,275 @@ CLI for querying Argus watchers.
|
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
npm install -g @vforsh/argus
|
|
9
|
+
bunx @vforsh/argus --help
|
|
10
|
+
bunx --package @vforsh/argus argus list
|
|
9
11
|
```
|
|
10
12
|
|
|
11
13
|
## Usage
|
|
12
14
|
|
|
13
15
|
```bash
|
|
14
16
|
argus list
|
|
15
|
-
argus logs
|
|
16
|
-
argus tail
|
|
17
|
+
argus logs [id]
|
|
18
|
+
argus tail [id]
|
|
19
|
+
argus eval [id] "<expression>"
|
|
20
|
+
argus page <subcommand>
|
|
21
|
+
argus chrome <subcommand>
|
|
22
|
+
argus watcher list
|
|
23
|
+
argus watcher status [id]
|
|
24
|
+
argus watcher stop [id]
|
|
25
|
+
argus watcher start --id <id> --url <pattern>
|
|
26
|
+
argus config init
|
|
27
|
+
argus doctor
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Config defaults
|
|
31
|
+
|
|
32
|
+
Argus can load defaults for `argus chrome start` and `argus watcher start` from a repo-local config file.
|
|
33
|
+
|
|
34
|
+
- Auto-discovery order: `.argus/config.json`, `.config/argus.json`, `argus.config.json`, `argus/config.json`.
|
|
35
|
+
- Use `--config <path>` to point at an explicit file (relative to `cwd` if not absolute).
|
|
36
|
+
- CLI options override config values.
|
|
37
|
+
- `watcher.start.artifacts` is resolved relative to the config file directory.
|
|
38
|
+
|
|
39
|
+
Example:
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"$schema": "file:///.../node_modules/@vforsh/argus/schemas/argus.config.schema.json",
|
|
44
|
+
"chrome": {
|
|
45
|
+
"start": {
|
|
46
|
+
"url": "http://localhost:3000",
|
|
47
|
+
"profile": "default-lite",
|
|
48
|
+
"devTools": true
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"watcher": {
|
|
52
|
+
"start": {
|
|
53
|
+
"id": "app",
|
|
54
|
+
"url": "localhost:3000",
|
|
55
|
+
"chromeHost": "127.0.0.1",
|
|
56
|
+
"chromePort": 9222,
|
|
57
|
+
"artifacts": "./artifacts",
|
|
58
|
+
"pageIndicator": true
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
17
62
|
```
|
|
18
63
|
|
|
19
64
|
### Commands
|
|
20
65
|
|
|
21
|
-
- **`argus list`**: Discover
|
|
22
|
-
- Use this first to find the `<id>` you
|
|
66
|
+
- **`argus list`**: Discover registered Argus watchers and their IDs.
|
|
67
|
+
- Use this first to find the `<id>` you'll pass to other commands (often something like `app`).
|
|
23
68
|
- Tip: add `--json` for scripting.
|
|
24
69
|
- Tip: add `--by-cwd <substring>` to filter watchers by their working directory.
|
|
70
|
+
- Tip: use `argus watcher prune` to remove unreachable watchers from the registry.
|
|
25
71
|
|
|
26
|
-
- **`argus logs
|
|
72
|
+
- **`argus logs [id]`**: Fetch a bounded slice of log history for a watcher.
|
|
27
73
|
- Best for “what already happened?” (e.g. “show me errors from the last 10 minutes”).
|
|
28
|
-
- Combine with `--since`, `--levels`, and `--
|
|
74
|
+
- Combine with `--since`, `--levels`, `--match`, and `--source` to narrow results.
|
|
75
|
+
- If `<id>` is omitted, Argus tries the watcher in your current `cwd`, then the only reachable watcher.
|
|
29
76
|
|
|
30
|
-
- **`argus tail
|
|
77
|
+
- **`argus tail [id]`**: Stream logs as they arrive (follow mode).
|
|
31
78
|
- Best for “what’s happening right now?” while you reproduce an issue.
|
|
32
|
-
- With `--json`, emits newline-delimited JSON events (NDJSON) for piping into tools.
|
|
79
|
+
- With `--json`, emits bounded newline-delimited JSON events (NDJSON) for piping into tools.
|
|
80
|
+
- With `--json-full`, emits full NDJSON events (can be very large).
|
|
81
|
+
|
|
82
|
+
- **`argus eval [id] <expression>`**: Evaluate a JS expression in the connected page.
|
|
83
|
+
- Best for quick one-off inspection (“what’s `location.href` right now?”).
|
|
84
|
+
- Defaults: awaits returned promises; returns values “by value” when possible.
|
|
85
|
+
- Tip: add `--json` for scripting (and check `.exception`).
|
|
86
|
+
- Tip: add `--no-fail-on-exception` to keep exit code 0 when the expression throws.
|
|
87
|
+
|
|
88
|
+
#### Chrome commands
|
|
89
|
+
|
|
90
|
+
Manage and query a running Chrome instance with remote debugging enabled (CDP).
|
|
91
|
+
|
|
92
|
+
- **`argus chrome start`**: Launch Chrome with CDP enabled.
|
|
93
|
+
- Options: `--url <url>`, `--from-watcher <watcherId>`, `--profile <temp|default-full|default-medium|default-lite>`, `--dev-tools`, `--config <path>`, `--json`.
|
|
94
|
+
- Example: `argus chrome start --url http://localhost:3000`.
|
|
95
|
+
- Note: `--profile default-full` launches Chrome with a copied snapshot of your default profile.
|
|
96
|
+
- Note: `--profile default-medium` adds History, Local Storage, and IndexedDB to the lite profile.
|
|
97
|
+
- Note: `--profile default-lite` copies only auth-related files to keep the profile lightweight.
|
|
98
|
+
- Why: recent Chrome versions require a non-default user data dir to expose `--remote-debugging-port`, so Argus copies your default profile into a temp directory and launches Chrome from that copy (keeps your real default profile closed + untouched).
|
|
99
|
+
- Reference:
|
|
100
|
+
```
|
|
101
|
+
https://developer.chrome.com/blog/remote-debugging-port
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
- **`argus chrome version`**: Show Chrome version info from the CDP endpoint.
|
|
105
|
+
- Options: `--cdp <host:port>`, `--id <watcherId>`, `--json`.
|
|
106
|
+
|
|
107
|
+
- **`argus chrome status`**: Check if Chrome CDP endpoint is reachable.
|
|
108
|
+
- Prints `ok <host>:<port> <browser>` on success; exits with code 1 if unreachable.
|
|
109
|
+
|
|
110
|
+
- **`argus chrome stop`**: Close the Chrome instance via CDP.
|
|
111
|
+
- Alias: `quit`.
|
|
112
|
+
- Example: `argus chrome stop`.
|
|
113
|
+
|
|
114
|
+
#### Page commands
|
|
115
|
+
|
|
116
|
+
Manage tabs/targets via CDP (aliases: `tab`).
|
|
117
|
+
|
|
118
|
+
- **`argus page targets`**: List all Chrome targets (tabs, workers, extensions).
|
|
119
|
+
- Aliases: `list`, `ls`.
|
|
120
|
+
- Options: `--type <type>` to filter (e.g. `--type page` for tabs only), `--json`.
|
|
121
|
+
- Example: `argus page targets --type page`.
|
|
122
|
+
|
|
123
|
+
- **`argus page open --url <url>`**: Open a new tab in Chrome.
|
|
124
|
+
- Alias: `new`.
|
|
125
|
+
- URL normalization: if no scheme, `http://` is prepended.
|
|
126
|
+
- Example: `argus page open --url localhost:3000`.
|
|
127
|
+
|
|
128
|
+
- **`argus page activate [targetId]`**: Activate (focus) a Chrome target.
|
|
129
|
+
- Fuzzy selection: `--title`, `--url`, or `--match` (case-insensitive substring).
|
|
130
|
+
- If multiple matches and TTY: interactive picker. If non-TTY: prints candidates and exits 2.
|
|
131
|
+
- Example: `argus page activate --title "Docs"`.
|
|
132
|
+
|
|
133
|
+
- **`argus page close <targetId>`**: Close a Chrome target.
|
|
134
|
+
- Example: `argus page close E63A3ED201BFC02DA06134F506A7498C`.
|
|
135
|
+
|
|
136
|
+
- **`argus page reload [targetId]`**: Reload a Chrome target.
|
|
137
|
+
- Omit `targetId` with `--id <watcherId>` to reload the watcher's attached page.
|
|
138
|
+
- Use `--param`/`--params` to update query params before reload.
|
|
139
|
+
- Example: `argus page reload --id app`.
|
|
140
|
+
|
|
141
|
+
**CDP endpoint resolution** (applies to `chrome version/status/stop` and all `page` commands):
|
|
142
|
+
|
|
143
|
+
- `--cdp <host:port>`: Use explicit host/port.
|
|
144
|
+
- `--id <watcherId>`: Use chrome config from a registered watcher's `chrome.host`/`chrome.port`.
|
|
145
|
+
- Default: `127.0.0.1:9222`.
|
|
146
|
+
- `--cdp` and `--id` are mutually exclusive.
|
|
147
|
+
|
|
148
|
+
#### Watcher commands
|
|
149
|
+
|
|
150
|
+
Also available via `argus watchers` (plural alias).
|
|
151
|
+
|
|
152
|
+
- **`argus watcher list`**: Same output as `argus list`, but namespaced under `watcher`.
|
|
153
|
+
- Aliases: `ls`.
|
|
154
|
+
- Example: `argus watcher list --by-cwd my-project`.
|
|
155
|
+
|
|
156
|
+
- **`argus watcher status [id]`**: Check whether a watcher is reachable.
|
|
157
|
+
- Alias: `ping`.
|
|
158
|
+
- Example: `argus watcher status app`.
|
|
159
|
+
|
|
160
|
+
- **`argus watcher stop [id]`**: Ask a watcher to shut down (falls back to SIGTERM).
|
|
161
|
+
- Alias: `kill`.
|
|
162
|
+
- Example: `argus watcher stop app`.
|
|
163
|
+
|
|
164
|
+
- **`argus watcher start`**: Start an Argus watcher process.
|
|
165
|
+
- Required (CLI or config): `--id <watcherId>`, `--url <pattern>`.
|
|
166
|
+
- Optional: `--chrome-host <host>` (default: `127.0.0.1`), `--chrome-port <port>` (default: `9222`), `--no-page-indicator`, `--config <path>`, `--json`.
|
|
167
|
+
- Note: the in-page watcher indicator badge is enabled by default.
|
|
168
|
+
- Example: `argus watcher start --id app --url localhost:3000 --chrome-port 9223`.
|
|
169
|
+
|
|
170
|
+
- **`argus watcher prune`**: Remove unreachable watchers from the registry.
|
|
171
|
+
- Alias: `clean`.
|
|
172
|
+
- Options: `--by-cwd <substring>` to filter candidates, `--dry-run` to preview without removing, `--json`.
|
|
173
|
+
- Examples:
|
|
174
|
+
- `argus watcher prune`
|
|
175
|
+
- `argus watcher prune --by-cwd my-project`
|
|
176
|
+
- `argus watcher prune --dry-run`
|
|
177
|
+
- `argus watcher prune --dry-run --json`
|
|
178
|
+
|
|
179
|
+
- **`argus config init`**: Create an Argus config file.
|
|
180
|
+
- Default path: `.argus/config.json`.
|
|
181
|
+
- Options: `--path <file>`, `--force`.
|
|
182
|
+
- Example: `argus config init --path argus.config.json`.
|
|
183
|
+
|
|
184
|
+
#### Diagnostics
|
|
185
|
+
|
|
186
|
+
- **`argus doctor`**: Run environment diagnostics for registry, watchers, WebSocket availability, Chrome bin, and CDP.
|
|
187
|
+
- Tip: add `--json` for scripting.
|
|
188
|
+
|
|
189
|
+
#### Watcher selection defaults
|
|
190
|
+
|
|
191
|
+
For commands that accept `[id]`:
|
|
192
|
+
|
|
193
|
+
- If `<id>` is provided, Argus uses it.
|
|
194
|
+
- Else if exactly one watcher has `cwd === process.cwd()`, Argus uses it.
|
|
195
|
+
- Else if exactly one reachable watcher exists, Argus uses it.
|
|
196
|
+
- Otherwise Argus exits with an error and lists candidates (TTY prompts are only used for page target selection, not watcher IDs).
|
|
33
197
|
|
|
34
198
|
#### `logs` vs `tail`
|
|
35
199
|
|
|
36
200
|
- **`logs`**: one-time query of **past** log events (bounded).
|
|
37
201
|
- **`tail`**: continuous stream of **new** log events (unbounded until you stop it).
|
|
38
202
|
|
|
203
|
+
#### `eval` gotchas / quirks
|
|
204
|
+
|
|
205
|
+
- **Shell quoting**: `<expression>` is a single CLI argument.
|
|
206
|
+
- Use quotes for anything with spaces/special chars (zsh/bash): `argus eval app 'location.href'`.
|
|
207
|
+
- If you need quotes _inside_ the expression, prefer swapping quote types or escaping.
|
|
208
|
+
|
|
209
|
+
- **“await” behavior**:
|
|
210
|
+
- By default, Argus sets CDP `awaitPromise=true`, so if your expression **returns a Promise**, Argus waits for it and prints the resolved value.
|
|
211
|
+
- You typically don’t need to use the `await` keyword—just return a Promise (e.g. `fetch("/ping").then(r => r.status)`).
|
|
212
|
+
- With `--no-await`, Argus won’t wait; you’ll get a Promise-ish preview instead.
|
|
213
|
+
|
|
214
|
+
- **Return value shape is intentionally shallow**:
|
|
215
|
+
- By default, Argus requests `returnByValue=true` (best effort “JSON-ish” values).
|
|
216
|
+
- When a value can’t be returned by value, Argus falls back to a **bounded preview** (often shallow object properties, capped; nested objects are not expanded).
|
|
217
|
+
- You may see truncation markers like `…: "+N more"`.
|
|
218
|
+
- If you specifically want preview/remote-object behavior, use `--no-return-by-value`.
|
|
219
|
+
|
|
220
|
+
- **Exceptions fail the process by default**:
|
|
221
|
+
- By default, exceptions set exit code 1 and are routed to stderr.
|
|
222
|
+
- Use `--no-fail-on-exception` to keep exit code 0 and treat exceptions as successful output.
|
|
223
|
+
- For automation, prefer `--json` and check `.exception`.
|
|
224
|
+
|
|
225
|
+
- **Timeouts**:
|
|
226
|
+
- `--timeout <ms>` sets the watcher-side eval timeout (non-numeric / <= 0 is ignored).
|
|
227
|
+
- The CLI HTTP request timeout includes a small buffer on top of the eval timeout.
|
|
228
|
+
|
|
229
|
+
- **Watcher registry cleanup**:
|
|
230
|
+
- Argus does **not** remove watchers on single failures by default.
|
|
231
|
+
- Use `argus watcher prune` to explicitly remove unreachable watchers from the registry.
|
|
232
|
+
- Use `argus watcher prune --dry-run` to preview what would be removed.
|
|
233
|
+
|
|
234
|
+
#### `eval` options
|
|
235
|
+
|
|
236
|
+
- **`--no-fail-on-exception`**: keep exit code 0 when the evaluation throws.
|
|
237
|
+
- **`--retry <n>`**: retry failed evaluations (transport failures always; exceptions only when `--no-fail-on-exception` is not set).
|
|
238
|
+
- **`-q, --silent`**: suppress success output; still emits errors.
|
|
239
|
+
- **`--interval <ms|duration>`**: re-evaluate on a fixed cadence (e.g. `500`, `250ms`, `3s`).
|
|
240
|
+
- **`--count <n>`**: stop after N iterations (requires `--interval`).
|
|
241
|
+
- **`--until <condition>`**: stop when local condition becomes truthy (requires `--interval`).
|
|
242
|
+
- Evaluated locally in Node with context `{ result, exception, iteration, attempt }`.
|
|
243
|
+
- **Warning**: executes arbitrary local JS; don’t paste untrusted input.
|
|
244
|
+
|
|
39
245
|
### Options
|
|
40
246
|
|
|
41
247
|
- **`--json`**: output machine-readable JSON.
|
|
42
|
-
- **What**: switches from human text formatting to JSON
|
|
248
|
+
- **What**: switches from human text formatting to JSON.
|
|
249
|
+
- **Streaming**: commands that can emit multiple objects use **NDJSON** (one JSON object per line).
|
|
250
|
+
- **Stderr**: when `--json` is set, all non-machine logs go to **stderr**.
|
|
43
251
|
- **When**: when piping into tools like `jq`, writing to a file, or building scripts around Argus.
|
|
44
252
|
- **Why**: stable structure is easier to parse than terminal-friendly text.
|
|
45
253
|
|
|
254
|
+
- **`--json-full`**: output full, raw JSON.
|
|
255
|
+
- **What**: emits the full event payload with no preview caps; for streaming commands this is NDJSON.
|
|
256
|
+
- **When**: when you need exact fidelity and are ok with large output.
|
|
257
|
+
- **Why**: preserves complete structures for deep debugging or archival.
|
|
258
|
+
|
|
46
259
|
- **`--levels <comma-separated>`**: filter by log severity.
|
|
47
260
|
- **What**: only returns/emits events whose `level` is in the list (e.g. `error,warning`).
|
|
48
261
|
- **When**: when you want to focus on signal (errors/warnings) and ignore noisy `log`/`debug` output.
|
|
49
262
|
- **Why**: reduces volume so important events don’t get buried.
|
|
50
263
|
|
|
51
|
-
- **`--
|
|
52
|
-
- **What**: only returns/emits events whose text
|
|
53
|
-
- **When**: when you
|
|
54
|
-
- **Why**:
|
|
264
|
+
- **`--match <regex>`**: filter by message content (repeatable).
|
|
265
|
+
- **What**: only returns/emits events whose text matches any provided regex pattern.
|
|
266
|
+
- **When**: when you need server-side regex filtering (e.g. multiple tokens or alternation).
|
|
267
|
+
- **Why**: reduces client-side `rg`/`tail` loops.
|
|
268
|
+
|
|
269
|
+
- **`--ignore-case` / `--case-sensitive`**: toggle regex case sensitivity.
|
|
270
|
+
- **What**: controls how `--match` compares text.
|
|
271
|
+
- **When**: when you need strict casing or want to avoid missing matches.
|
|
272
|
+
- **Why**: keeps filtering predictable across environments.
|
|
273
|
+
|
|
274
|
+
- **`--source <substring>`**: filter by log source.
|
|
275
|
+
- **What**: only returns/emits events whose `source` contains the given substring (e.g. `console`, `exception`, `system`).
|
|
276
|
+
- **When**: when you only want console logs or only exceptions.
|
|
277
|
+
- **Why**: reduces noise without post-processing.
|
|
55
278
|
|
|
56
279
|
- **`--by-cwd <substring>`**: filter watchers by working directory.
|
|
57
280
|
- **What**: only returns watchers whose `cwd` contains the given substring.
|
|
@@ -60,13 +283,13 @@ argus tail <id>
|
|
|
60
283
|
|
|
61
284
|
- **`--since <duration>`**: time window (history).
|
|
62
285
|
- **What**: limits results to events within the last duration (e.g. `10m`, `2h`, `30s`).
|
|
63
|
-
- **When**: when you only care about
|
|
286
|
+
- **When**: when you only care about "recent" history (typically with `logs`).
|
|
64
287
|
- **Why**: avoids dumping an entire backlog when you only need the latest slice.
|
|
65
288
|
|
|
66
289
|
## Output
|
|
67
290
|
|
|
68
291
|
- Text output uses 4-character level tags (e.g. `LOG `, `DEBG`, `WARN`, `ERR `, `INFO`, `EXCP`).
|
|
69
|
-
- JSON output preserves the raw `level` values.
|
|
292
|
+
- JSON output preserves the raw `level` values; `--json` uses bounded preview values, `--json-full` is raw.
|
|
70
293
|
|
|
71
294
|
## Examples
|
|
72
295
|
|
|
@@ -74,5 +297,31 @@ argus tail <id>
|
|
|
74
297
|
argus list --json
|
|
75
298
|
argus list --by-cwd my-project
|
|
76
299
|
argus logs app --since 10m --levels error,warning
|
|
77
|
-
argus
|
|
300
|
+
argus logs app --match "\\[perf\\]" --match "OrderRewards|CustomerMakingOrderSelfService"
|
|
301
|
+
argus tail app --match "Unhandled"
|
|
302
|
+
argus eval app 'location.href'
|
|
303
|
+
argus eval app 'fetch("/ping").then(r => r.status)'
|
|
304
|
+
argus eval app 'document.title' --json | jq
|
|
305
|
+
argus eval app 'throw new Error("boom")'
|
|
306
|
+
argus eval app '1+1' --silent
|
|
307
|
+
argus eval app 'Date.now()' --interval 500 --count 3
|
|
308
|
+
argus eval app 'document.title' --interval 250 --until 'result === "argus-e2e"'
|
|
309
|
+
|
|
310
|
+
# Chrome commands
|
|
311
|
+
argus chrome status --cdp 127.0.0.1:9222
|
|
312
|
+
argus chrome version --json
|
|
313
|
+
argus chrome stop
|
|
314
|
+
|
|
315
|
+
# Page commands
|
|
316
|
+
argus page targets --type page
|
|
317
|
+
argus page ls --type page --json
|
|
318
|
+
argus page open --url localhost:3000
|
|
319
|
+
argus page activate --title \"Docs\"
|
|
320
|
+
argus page close E63A3ED201BFC02DA06134F506A7498C
|
|
321
|
+
argus page reload --id app
|
|
322
|
+
|
|
323
|
+
# Watcher with custom Chrome port
|
|
324
|
+
argus chrome start --json # note the cdpPort in output
|
|
325
|
+
argus watcher start --id app --url localhost:3000 --chrome-port 9223
|
|
326
|
+
argus doctor
|
|
78
327
|
```
|