@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.
Files changed (373) hide show
  1. package/README.md +265 -16
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/argus.js +16346 -0
  4. package/dist/bin.d.ts +1 -1
  5. package/dist/bin.js +49 -58
  6. package/dist/bin.js.map +1 -1
  7. package/dist/cdp/resolveCdpEndpoint.d.ts +15 -0
  8. package/dist/cdp/resolveCdpEndpoint.d.ts.map +1 -0
  9. package/dist/cdp/resolveCdpEndpoint.js +56 -0
  10. package/dist/cdp/resolveCdpEndpoint.js.map +1 -0
  11. package/dist/cdp/selectTarget.d.ts +26 -0
  12. package/dist/cdp/selectTarget.d.ts.map +1 -0
  13. package/dist/cdp/selectTarget.js +87 -0
  14. package/dist/cdp/selectTarget.js.map +1 -0
  15. package/dist/cdp/types.d.ts +13 -0
  16. package/dist/cdp/types.d.ts.map +1 -0
  17. package/dist/cdp/types.js +2 -0
  18. package/dist/cdp/types.js.map +1 -0
  19. package/dist/cli/parse.d.ts +11 -0
  20. package/dist/cli/parse.d.ts.map +1 -0
  21. package/dist/cli/parse.js +48 -0
  22. package/dist/cli/parse.js.map +1 -0
  23. package/dist/cli/program.d.ts +3 -0
  24. package/dist/cli/program.d.ts.map +1 -0
  25. package/dist/cli/program.js +21 -0
  26. package/dist/cli/program.js.map +1 -0
  27. package/dist/cli/register/registerChrome.d.ts +3 -0
  28. package/dist/cli/register/registerChrome.d.ts.map +1 -0
  29. package/dist/cli/register/registerChrome.js +79 -0
  30. package/dist/cli/register/registerChrome.js.map +1 -0
  31. package/dist/cli/register/registerClick.d.ts +3 -0
  32. package/dist/cli/register/registerClick.d.ts.map +1 -0
  33. package/dist/cli/register/registerClick.js +23 -0
  34. package/dist/cli/register/registerClick.js.map +1 -0
  35. package/dist/cli/register/registerConfig.d.ts +3 -0
  36. package/dist/cli/register/registerConfig.d.ts.map +1 -0
  37. package/dist/cli/register/registerConfig.js +14 -0
  38. package/dist/cli/register/registerConfig.js.map +1 -0
  39. package/dist/cli/register/registerDom.d.ts +3 -0
  40. package/dist/cli/register/registerDom.d.ts.map +1 -0
  41. package/dist/cli/register/registerDom.js +261 -0
  42. package/dist/cli/register/registerDom.js.map +1 -0
  43. package/dist/cli/register/registerEval.d.ts +3 -0
  44. package/dist/cli/register/registerEval.d.ts.map +1 -0
  45. package/dist/cli/register/registerEval.js +129 -0
  46. package/dist/cli/register/registerEval.js.map +1 -0
  47. package/dist/cli/register/registerExtension.d.ts +3 -0
  48. package/dist/cli/register/registerExtension.d.ts.map +1 -0
  49. package/dist/cli/register/registerExtension.js +46 -0
  50. package/dist/cli/register/registerExtension.js.map +1 -0
  51. package/dist/cli/register/registerFill.d.ts +3 -0
  52. package/dist/cli/register/registerFill.d.ts.map +1 -0
  53. package/dist/cli/register/registerFill.js +30 -0
  54. package/dist/cli/register/registerFill.js.map +1 -0
  55. package/dist/cli/register/registerHover.d.ts +3 -0
  56. package/dist/cli/register/registerHover.d.ts.map +1 -0
  57. package/dist/cli/register/registerHover.js +20 -0
  58. package/dist/cli/register/registerHover.js.map +1 -0
  59. package/dist/cli/register/registerKeydown.d.ts +3 -0
  60. package/dist/cli/register/registerKeydown.d.ts.map +1 -0
  61. package/dist/cli/register/registerKeydown.js +20 -0
  62. package/dist/cli/register/registerKeydown.js.map +1 -0
  63. package/dist/cli/register/registerLogs.d.ts +3 -0
  64. package/dist/cli/register/registerLogs.d.ts.map +1 -0
  65. package/dist/cli/register/registerLogs.js +64 -0
  66. package/dist/cli/register/registerLogs.js.map +1 -0
  67. package/dist/cli/register/registerNet.d.ts +3 -0
  68. package/dist/cli/register/registerNet.d.ts.map +1 -0
  69. package/dist/cli/register/registerNet.js +32 -0
  70. package/dist/cli/register/registerNet.js.map +1 -0
  71. package/dist/cli/register/registerPage.d.ts +3 -0
  72. package/dist/cli/register/registerPage.d.ts.map +1 -0
  73. package/dist/cli/register/registerPage.js +106 -0
  74. package/dist/cli/register/registerPage.js.map +1 -0
  75. package/dist/cli/register/registerQuickAccess.d.ts +3 -0
  76. package/dist/cli/register/registerQuickAccess.d.ts.map +1 -0
  77. package/dist/cli/register/registerQuickAccess.js +82 -0
  78. package/dist/cli/register/registerQuickAccess.js.map +1 -0
  79. package/dist/cli/register/registerScrollTo.d.ts +3 -0
  80. package/dist/cli/register/registerScrollTo.d.ts.map +1 -0
  81. package/dist/cli/register/registerScrollTo.js +22 -0
  82. package/dist/cli/register/registerScrollTo.js.map +1 -0
  83. package/dist/cli/register/registerSnapshot.d.ts +3 -0
  84. package/dist/cli/register/registerSnapshot.d.ts.map +1 -0
  85. package/dist/cli/register/registerSnapshot.js +37 -0
  86. package/dist/cli/register/registerSnapshot.js.map +1 -0
  87. package/dist/cli/register/registerStorage.d.ts +3 -0
  88. package/dist/cli/register/registerStorage.d.ts.map +1 -0
  89. package/dist/cli/register/registerStorage.js +56 -0
  90. package/dist/cli/register/registerStorage.js.map +1 -0
  91. package/dist/cli/register/registerThrottle.d.ts +3 -0
  92. package/dist/cli/register/registerThrottle.d.ts.map +1 -0
  93. package/dist/cli/register/registerThrottle.js +33 -0
  94. package/dist/cli/register/registerThrottle.js.map +1 -0
  95. package/dist/cli/register/registerTrace.d.ts +3 -0
  96. package/dist/cli/register/registerTrace.d.ts.map +1 -0
  97. package/dist/cli/register/registerTrace.js +39 -0
  98. package/dist/cli/register/registerTrace.js.map +1 -0
  99. package/dist/cli/register/registerWatcher.d.ts +3 -0
  100. package/dist/cli/register/registerWatcher.d.ts.map +1 -0
  101. package/dist/cli/register/registerWatcher.js +115 -0
  102. package/dist/cli/register/registerWatcher.js.map +1 -0
  103. package/dist/cli/validation.d.ts +10 -0
  104. package/dist/cli/validation.d.ts.map +1 -0
  105. package/dist/cli/validation.js +24 -0
  106. package/dist/cli/validation.js.map +1 -0
  107. package/dist/commands/chrome.d.ts +64 -0
  108. package/dist/commands/chrome.d.ts.map +1 -0
  109. package/dist/commands/chrome.js +583 -0
  110. package/dist/commands/chrome.js.map +1 -0
  111. package/dist/commands/chromeStart.d.ts +33 -0
  112. package/dist/commands/chromeStart.d.ts.map +1 -0
  113. package/dist/commands/chromeStart.js +380 -0
  114. package/dist/commands/chromeStart.js.map +1 -0
  115. package/dist/commands/configInit.d.ts +6 -0
  116. package/dist/commands/configInit.d.ts.map +1 -0
  117. package/dist/commands/configInit.js +102 -0
  118. package/dist/commands/configInit.js.map +1 -0
  119. package/dist/commands/doctor.d.ts +5 -0
  120. package/dist/commands/doctor.d.ts.map +1 -0
  121. package/dist/commands/doctor.js +142 -0
  122. package/dist/commands/doctor.js.map +1 -0
  123. package/dist/commands/domAdd.d.ts +17 -0
  124. package/dist/commands/domAdd.d.ts.map +1 -0
  125. package/dist/commands/domAdd.js +181 -0
  126. package/dist/commands/domAdd.js.map +1 -0
  127. package/dist/commands/domAddScript.d.ts +14 -0
  128. package/dist/commands/domAddScript.d.ts.map +1 -0
  129. package/dist/commands/domAddScript.js +172 -0
  130. package/dist/commands/domAddScript.js.map +1 -0
  131. package/dist/commands/domClick.d.ts +13 -0
  132. package/dist/commands/domClick.d.ts.map +1 -0
  133. package/dist/commands/domClick.js +113 -0
  134. package/dist/commands/domClick.js.map +1 -0
  135. package/dist/commands/domFill.d.ts +14 -0
  136. package/dist/commands/domFill.d.ts.map +1 -0
  137. package/dist/commands/domFill.js +129 -0
  138. package/dist/commands/domFill.js.map +1 -0
  139. package/dist/commands/domFocus.d.ts +10 -0
  140. package/dist/commands/domFocus.d.ts.map +1 -0
  141. package/dist/commands/domFocus.js +52 -0
  142. package/dist/commands/domFocus.js.map +1 -0
  143. package/dist/commands/domHover.d.ts +10 -0
  144. package/dist/commands/domHover.d.ts.map +1 -0
  145. package/dist/commands/domHover.js +52 -0
  146. package/dist/commands/domHover.js.map +1 -0
  147. package/dist/commands/domInfo.d.ts +11 -0
  148. package/dist/commands/domInfo.d.ts.map +1 -0
  149. package/dist/commands/domInfo.js +61 -0
  150. package/dist/commands/domInfo.js.map +1 -0
  151. package/dist/commands/domKeydown.d.ts +10 -0
  152. package/dist/commands/domKeydown.d.ts.map +1 -0
  153. package/dist/commands/domKeydown.js +46 -0
  154. package/dist/commands/domKeydown.js.map +1 -0
  155. package/dist/commands/domModify.d.ts +36 -0
  156. package/dist/commands/domModify.d.ts.map +1 -0
  157. package/dist/commands/domModify.js +177 -0
  158. package/dist/commands/domModify.js.map +1 -0
  159. package/dist/commands/domRemove.d.ts +10 -0
  160. package/dist/commands/domRemove.d.ts.map +1 -0
  161. package/dist/commands/domRemove.js +52 -0
  162. package/dist/commands/domRemove.js.map +1 -0
  163. package/dist/commands/domScroll.d.ts +12 -0
  164. package/dist/commands/domScroll.d.ts.map +1 -0
  165. package/dist/commands/domScroll.js +105 -0
  166. package/dist/commands/domScroll.js.map +1 -0
  167. package/dist/commands/domScrollTo.d.ts +12 -0
  168. package/dist/commands/domScrollTo.d.ts.map +1 -0
  169. package/dist/commands/domScrollTo.js +107 -0
  170. package/dist/commands/domScrollTo.js.map +1 -0
  171. package/dist/commands/domSetFile.d.ts +12 -0
  172. package/dist/commands/domSetFile.d.ts.map +1 -0
  173. package/dist/commands/domSetFile.js +87 -0
  174. package/dist/commands/domSetFile.js.map +1 -0
  175. package/dist/commands/domTree.d.ts +12 -0
  176. package/dist/commands/domTree.d.ts.map +1 -0
  177. package/dist/commands/domTree.js +68 -0
  178. package/dist/commands/domTree.js.map +1 -0
  179. package/dist/commands/eval.d.ts +26 -0
  180. package/dist/commands/eval.d.ts.map +1 -0
  181. package/dist/commands/eval.js +152 -0
  182. package/dist/commands/eval.js.map +1 -0
  183. package/dist/commands/evalShared.d.ts +64 -0
  184. package/dist/commands/evalShared.d.ts.map +1 -0
  185. package/dist/commands/evalShared.js +205 -0
  186. package/dist/commands/evalShared.js.map +1 -0
  187. package/dist/commands/evalUntil.d.ts +27 -0
  188. package/dist/commands/evalUntil.d.ts.map +1 -0
  189. package/dist/commands/evalUntil.js +128 -0
  190. package/dist/commands/evalUntil.js.map +1 -0
  191. package/dist/commands/extension/doctor.d.ts +5 -0
  192. package/dist/commands/extension/doctor.d.ts.map +1 -0
  193. package/dist/commands/extension/doctor.js +262 -0
  194. package/dist/commands/extension/doctor.js.map +1 -0
  195. package/dist/commands/extension/id.d.ts +9 -0
  196. package/dist/commands/extension/id.d.ts.map +1 -0
  197. package/dist/commands/extension/id.js +122 -0
  198. package/dist/commands/extension/id.js.map +1 -0
  199. package/dist/commands/extension/info.d.ts +5 -0
  200. package/dist/commands/extension/info.d.ts.map +1 -0
  201. package/dist/commands/extension/info.js +68 -0
  202. package/dist/commands/extension/info.js.map +1 -0
  203. package/dist/commands/extension/list.d.ts +8 -0
  204. package/dist/commands/extension/list.d.ts.map +1 -0
  205. package/dist/commands/extension/list.js +194 -0
  206. package/dist/commands/extension/list.js.map +1 -0
  207. package/dist/commands/extension/nativeHost.d.ts +21 -0
  208. package/dist/commands/extension/nativeHost.d.ts.map +1 -0
  209. package/dist/commands/extension/nativeHost.js +106 -0
  210. package/dist/commands/extension/nativeHost.js.map +1 -0
  211. package/dist/commands/extension/remove.d.ts +5 -0
  212. package/dist/commands/extension/remove.d.ts.map +1 -0
  213. package/dist/commands/extension/remove.js +75 -0
  214. package/dist/commands/extension/remove.js.map +1 -0
  215. package/dist/commands/extension/setup.d.ts +6 -0
  216. package/dist/commands/extension/setup.d.ts.map +1 -0
  217. package/dist/commands/extension/setup.js +89 -0
  218. package/dist/commands/extension/setup.js.map +1 -0
  219. package/dist/commands/extension/status.d.ts +5 -0
  220. package/dist/commands/extension/status.d.ts.map +1 -0
  221. package/dist/commands/extension/status.js +82 -0
  222. package/dist/commands/extension/status.js.map +1 -0
  223. package/dist/commands/iframeHelper.d.ts +13 -0
  224. package/dist/commands/iframeHelper.d.ts.map +1 -0
  225. package/dist/commands/iframeHelper.js +63 -0
  226. package/dist/commands/iframeHelper.js.map +1 -0
  227. package/dist/commands/list.d.ts.map +1 -1
  228. package/dist/commands/list.js +40 -27
  229. package/dist/commands/list.js.map +1 -1
  230. package/dist/commands/logs.d.ts +6 -2
  231. package/dist/commands/logs.d.ts.map +1 -1
  232. package/dist/commands/logs.js +55 -40
  233. package/dist/commands/logs.js.map +1 -1
  234. package/dist/commands/net.d.ts +11 -0
  235. package/dist/commands/net.d.ts.map +1 -0
  236. package/dist/commands/net.js +49 -0
  237. package/dist/commands/net.js.map +1 -0
  238. package/dist/commands/netTail.d.ts +12 -0
  239. package/dist/commands/netTail.d.ts.map +1 -0
  240. package/dist/commands/netTail.js +76 -0
  241. package/dist/commands/netTail.js.map +1 -0
  242. package/dist/commands/page.d.ts +12 -0
  243. package/dist/commands/page.d.ts.map +1 -0
  244. package/dist/commands/page.js +330 -0
  245. package/dist/commands/page.js.map +1 -0
  246. package/dist/commands/pageEmulation.d.ts +20 -0
  247. package/dist/commands/pageEmulation.d.ts.map +1 -0
  248. package/dist/commands/pageEmulation.js +215 -0
  249. package/dist/commands/pageEmulation.js.map +1 -0
  250. package/dist/commands/reload.d.ts +8 -0
  251. package/dist/commands/reload.d.ts.map +1 -0
  252. package/dist/commands/reload.js +23 -0
  253. package/dist/commands/reload.js.map +1 -0
  254. package/dist/commands/resolveTestId.d.ts +10 -0
  255. package/dist/commands/resolveTestId.d.ts.map +1 -0
  256. package/dist/commands/resolveTestId.js +16 -0
  257. package/dist/commands/resolveTestId.js.map +1 -0
  258. package/dist/commands/screenshot.d.ts +9 -0
  259. package/dist/commands/screenshot.d.ts.map +1 -0
  260. package/dist/commands/screenshot.js +27 -0
  261. package/dist/commands/screenshot.js.map +1 -0
  262. package/dist/commands/snapshot.d.ts +10 -0
  263. package/dist/commands/snapshot.d.ts.map +1 -0
  264. package/dist/commands/snapshot.js +54 -0
  265. package/dist/commands/snapshot.js.map +1 -0
  266. package/dist/commands/start.d.ts +20 -0
  267. package/dist/commands/start.d.ts.map +1 -0
  268. package/dist/commands/start.js +191 -0
  269. package/dist/commands/start.js.map +1 -0
  270. package/dist/commands/storageLocal.d.ts +18 -0
  271. package/dist/commands/storageLocal.d.ts.map +1 -0
  272. package/dist/commands/storageLocal.js +92 -0
  273. package/dist/commands/storageLocal.js.map +1 -0
  274. package/dist/commands/tail.d.ts +6 -2
  275. package/dist/commands/tail.d.ts.map +1 -1
  276. package/dist/commands/tail.js +49 -29
  277. package/dist/commands/tail.js.map +1 -1
  278. package/dist/commands/throttle.d.ts +13 -0
  279. package/dist/commands/throttle.d.ts.map +1 -0
  280. package/dist/commands/throttle.js +124 -0
  281. package/dist/commands/throttle.js.map +1 -0
  282. package/dist/commands/trace.d.ts +27 -0
  283. package/dist/commands/trace.d.ts.map +1 -0
  284. package/dist/commands/trace.js +109 -0
  285. package/dist/commands/trace.js.map +1 -0
  286. package/dist/commands/watcherNativeHost.d.ts +13 -0
  287. package/dist/commands/watcherNativeHost.d.ts.map +1 -0
  288. package/dist/commands/watcherNativeHost.js +45 -0
  289. package/dist/commands/watcherNativeHost.js.map +1 -0
  290. package/dist/commands/watcherPrune.d.ts +9 -0
  291. package/dist/commands/watcherPrune.d.ts.map +1 -0
  292. package/dist/commands/watcherPrune.js +82 -0
  293. package/dist/commands/watcherPrune.js.map +1 -0
  294. package/dist/commands/watcherStart.d.ts +26 -0
  295. package/dist/commands/watcherStart.d.ts.map +1 -0
  296. package/dist/commands/watcherStart.js +202 -0
  297. package/dist/commands/watcherStart.js.map +1 -0
  298. package/dist/commands/watcherStatus.d.ts +7 -0
  299. package/dist/commands/watcherStatus.d.ts.map +1 -0
  300. package/dist/commands/watcherStatus.js +22 -0
  301. package/dist/commands/watcherStatus.js.map +1 -0
  302. package/dist/commands/watcherStop.d.ts +5 -0
  303. package/dist/commands/watcherStop.d.ts.map +1 -0
  304. package/dist/commands/watcherStop.js +96 -0
  305. package/dist/commands/watcherStop.js.map +1 -0
  306. package/dist/config/argusConfig.d.ts +65 -0
  307. package/dist/config/argusConfig.d.ts.map +1 -0
  308. package/dist/config/argusConfig.js +331 -0
  309. package/dist/config/argusConfig.js.map +1 -0
  310. package/dist/emulation/devices.d.ts +15 -0
  311. package/dist/emulation/devices.d.ts.map +1 -0
  312. package/dist/emulation/devices.js +54 -0
  313. package/dist/emulation/devices.js.map +1 -0
  314. package/dist/eval/evalClient.d.ts +35 -0
  315. package/dist/eval/evalClient.d.ts.map +1 -0
  316. package/dist/eval/evalClient.js +71 -0
  317. package/dist/eval/evalClient.js.map +1 -0
  318. package/dist/httpClient.d.ts +6 -1
  319. package/dist/httpClient.d.ts.map +1 -1
  320. package/dist/httpClient.js +54 -1
  321. package/dist/httpClient.js.map +1 -1
  322. package/dist/index.d.ts.map +1 -1
  323. package/dist/index.js.map +1 -1
  324. package/dist/output/accessibility.d.ts +16 -0
  325. package/dist/output/accessibility.d.ts.map +1 -0
  326. package/dist/output/accessibility.js +61 -0
  327. package/dist/output/accessibility.js.map +1 -0
  328. package/dist/output/dom.d.ts +14 -0
  329. package/dist/output/dom.d.ts.map +1 -0
  330. package/dist/output/dom.js +92 -0
  331. package/dist/output/dom.js.map +1 -0
  332. package/dist/output/format.d.ts +3 -2
  333. package/dist/output/format.d.ts.map +1 -1
  334. package/dist/output/format.js +11 -3
  335. package/dist/output/format.js.map +1 -1
  336. package/dist/output/io.d.ts +14 -0
  337. package/dist/output/io.d.ts.map +1 -0
  338. package/dist/output/io.js +28 -0
  339. package/dist/output/io.js.map +1 -0
  340. package/dist/output/preview.d.ts +3 -0
  341. package/dist/output/preview.d.ts.map +1 -0
  342. package/dist/output/preview.js +6 -0
  343. package/dist/output/preview.js.map +1 -0
  344. package/dist/registry.d.ts +6 -4
  345. package/dist/registry.d.ts.map +1 -1
  346. package/dist/registry.js +24 -13
  347. package/dist/registry.js.map +1 -1
  348. package/dist/utils/chromeBin.d.ts +3 -0
  349. package/dist/utils/chromeBin.d.ts.map +1 -0
  350. package/dist/utils/chromeBin.js +46 -0
  351. package/dist/utils/chromeBin.js.map +1 -0
  352. package/dist/utils/paths.d.ts +3 -0
  353. package/dist/utils/paths.d.ts.map +1 -0
  354. package/dist/utils/paths.js +8 -0
  355. package/dist/utils/paths.js.map +1 -0
  356. package/dist/utils/ports.d.ts +3 -0
  357. package/dist/utils/ports.d.ts.map +1 -0
  358. package/dist/utils/ports.js +39 -0
  359. package/dist/utils/ports.js.map +1 -0
  360. package/dist/watchers/candidates.d.ts +4 -0
  361. package/dist/watchers/candidates.d.ts.map +1 -0
  362. package/dist/watchers/candidates.js +7 -0
  363. package/dist/watchers/candidates.js.map +1 -0
  364. package/dist/watchers/requestWatcher.d.ts +42 -0
  365. package/dist/watchers/requestWatcher.d.ts.map +1 -0
  366. package/dist/watchers/requestWatcher.js +77 -0
  367. package/dist/watchers/requestWatcher.js.map +1 -0
  368. package/dist/watchers/resolveWatcher.d.ts +16 -0
  369. package/dist/watchers/resolveWatcher.d.ts.map +1 -0
  370. package/dist/watchers/resolveWatcher.js +50 -0
  371. package/dist/watchers/resolveWatcher.js.map +1 -0
  372. package/package.json +13 -14
  373. 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 <id>
16
- argus tail <id>
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 running Argus watchers and their IDs.
22
- - Use this first to find the `<id>` youll pass to other commands (often something like `app`).
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 <id>`**: Fetch a bounded slice of log history for a watcher.
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 `--grep` to narrow results.
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 <id>`**: Stream logs as they arrive (follow mode).
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; for `tail`, this is newline-delimited JSON (NDJSON) so each event is one line.
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
- - **`--grep <substring>`**: filter by message content.
52
- - **What**: only returns/emits events whose text contains the given substring.
53
- - **When**: when you’re hunting for a specific error (“Unhandled”, “ECONNREFUSED”, a request ID, etc.).
54
- - **Why**: quickly narrows large streams/histories without post-processing.
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 recent history (typically with `logs`).
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 tail app --grep "Unhandled"
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
  ```