@alwaysmeticulous/cli 2.326.0 → 2.327.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.
Files changed (450) hide show
  1. package/dist/__tests__/commonjs-dependencies.spec.d.ts +2 -0
  2. package/dist/__tests__/commonjs-dependencies.spec.d.ts.map +1 -0
  3. package/dist/__tests__/commonjs-dependencies.spec.js +82 -0
  4. package/dist/__tests__/commonjs-dependencies.spec.js.map +1 -0
  5. package/dist/command-utils/__tests__/parse-rewrites.spec.js +2 -2
  6. package/dist/command-utils/__tests__/parse-rewrites.spec.js.map +1 -1
  7. package/dist/command-utils/__tests__/warn-regex-rewrites.spec.js +2 -2
  8. package/dist/command-utils/__tests__/warn-regex-rewrites.spec.js.map +1 -1
  9. package/dist/command-utils/common-options.js +2 -2
  10. package/dist/command-utils/common-options.js.map +1 -1
  11. package/dist/command-utils/detect-upload-mode.js +2 -2
  12. package/dist/command-utils/detect-upload-mode.js.map +1 -1
  13. package/dist/command-utils/detect-upload-mode.spec.js +2 -2
  14. package/dist/command-utils/detect-upload-mode.spec.js.map +1 -1
  15. package/dist/command-utils/download-session.utils.js +2 -2
  16. package/dist/command-utils/download-session.utils.js.map +1 -1
  17. package/dist/command-utils/json-args.js +2 -2
  18. package/dist/command-utils/json-args.js.map +1 -1
  19. package/dist/command-utils/json-args.spec.js +2 -2
  20. package/dist/command-utils/json-args.spec.js.map +1 -1
  21. package/dist/command-utils/parse-container-env.js +2 -2
  22. package/dist/command-utils/parse-container-env.js.map +1 -1
  23. package/dist/command-utils/parse-rewrites.js +2 -2
  24. package/dist/command-utils/parse-rewrites.js.map +1 -1
  25. package/dist/command-utils/print-json.js +2 -2
  26. package/dist/command-utils/print-json.js.map +1 -1
  27. package/dist/command-utils/sentry.utils.js +2 -2
  28. package/dist/command-utils/sentry.utils.js.map +1 -1
  29. package/dist/command-utils/warn-regex-rewrites.js +2 -2
  30. package/dist/command-utils/warn-regex-rewrites.js.map +1 -1
  31. package/dist/commands/agent/agent-review-writes.command.spec.js +2 -2
  32. package/dist/commands/agent/agent-review-writes.command.spec.js.map +1 -1
  33. package/dist/commands/agent/build-git-options.js +2 -2
  34. package/dist/commands/agent/build-git-options.js.map +1 -1
  35. package/dist/commands/agent/build-git-options.spec.js +2 -2
  36. package/dist/commands/agent/build-git-options.spec.js.map +1 -1
  37. package/dist/commands/agent/coverage-columns.util.js +2 -2
  38. package/dist/commands/agent/coverage-columns.util.js.map +1 -1
  39. package/dist/commands/agent/create-diff-comment.command.js +2 -2
  40. package/dist/commands/agent/create-diff-comment.command.js.map +1 -1
  41. package/dist/commands/agent/diff-comment-write.utils.js +2 -2
  42. package/dist/commands/agent/diff-comment-write.utils.js.map +1 -1
  43. package/dist/commands/agent/diff-comments.command.js +2 -2
  44. package/dist/commands/agent/diff-comments.command.js.map +1 -1
  45. package/dist/commands/agent/diff-comments.command.spec.js +2 -2
  46. package/dist/commands/agent/diff-comments.command.spec.js.map +1 -1
  47. package/dist/commands/agent/ignore-diff.command.js +2 -2
  48. package/dist/commands/agent/ignore-diff.command.js.map +1 -1
  49. package/dist/commands/agent/index.js +2 -2
  50. package/dist/commands/agent/index.js.map +1 -1
  51. package/dist/commands/agent/js-coverage-diff.command.js +2 -2
  52. package/dist/commands/agent/js-coverage-diff.command.js.map +1 -1
  53. package/dist/commands/agent/js-coverage.command.handler.spec.js +2 -2
  54. package/dist/commands/agent/js-coverage.command.handler.spec.js.map +1 -1
  55. package/dist/commands/agent/js-coverage.command.js +2 -2
  56. package/dist/commands/agent/js-coverage.command.js.map +1 -1
  57. package/dist/commands/agent/js-coverage.command.spec.js +2 -2
  58. package/dist/commands/agent/js-coverage.command.spec.js.map +1 -1
  59. package/dist/commands/agent/reject-diff.command.js +2 -2
  60. package/dist/commands/agent/reject-diff.command.js.map +1 -1
  61. package/dist/commands/agent/reject-diff.command.spec.js +2 -2
  62. package/dist/commands/agent/reject-diff.command.spec.js.map +1 -1
  63. package/dist/commands/agent/reply-to-diff-comment.command.js +2 -2
  64. package/dist/commands/agent/reply-to-diff-comment.command.js.map +1 -1
  65. package/dist/commands/agent/screenshot-dom-diff.command.js +2 -2
  66. package/dist/commands/agent/screenshot-dom-diff.command.js.map +1 -1
  67. package/dist/commands/agent/screenshot-image-files.command.js +2 -2
  68. package/dist/commands/agent/screenshot-image-files.command.js.map +1 -1
  69. package/dist/commands/agent/screenshot-image.command.js +2 -2
  70. package/dist/commands/agent/screenshot-image.command.js.map +1 -1
  71. package/dist/commands/agent/sessions.command.js +2 -2
  72. package/dist/commands/agent/sessions.command.js.map +1 -1
  73. package/dist/commands/agent/sessions.command.spec.js +2 -2
  74. package/dist/commands/agent/sessions.command.spec.js.map +1 -1
  75. package/dist/commands/agent/submit-feedback.command.js +2 -2
  76. package/dist/commands/agent/submit-feedback.command.js.map +1 -1
  77. package/dist/commands/agent/test-run-check.command.js +2 -2
  78. package/dist/commands/agent/test-run-check.command.js.map +1 -1
  79. package/dist/commands/agent/test-run-check.command.spec.js +2 -2
  80. package/dist/commands/agent/test-run-check.command.spec.js.map +1 -1
  81. package/dist/commands/agent/test-run-diffs.command.js +2 -2
  82. package/dist/commands/agent/test-run-diffs.command.js.map +1 -1
  83. package/dist/commands/agent/test-run-diffs.command.spec.js +2 -2
  84. package/dist/commands/agent/test-run-diffs.command.spec.js.map +1 -1
  85. package/dist/commands/agent/test-run-diffs.utils.js +2 -2
  86. package/dist/commands/agent/test-run-diffs.utils.js.map +1 -1
  87. package/dist/commands/agent/test-run-diffs.utils.spec.js +2 -2
  88. package/dist/commands/agent/test-run-diffs.utils.spec.js.map +1 -1
  89. package/dist/commands/agent/test-run-for-commit.command.js +2 -2
  90. package/dist/commands/agent/test-run-for-commit.command.js.map +1 -1
  91. package/dist/commands/agent/timeline.command.js +2 -2
  92. package/dist/commands/agent/timeline.command.js.map +1 -1
  93. package/dist/commands/agent/timeline.command.spec.js +2 -2
  94. package/dist/commands/agent/timeline.command.spec.js.map +1 -1
  95. package/dist/commands/agent/trigger-test-run.command.js +2 -2
  96. package/dist/commands/agent/trigger-test-run.command.js.map +1 -1
  97. package/dist/commands/agent/trigger-test-run.command.spec.js +2 -2
  98. package/dist/commands/agent/trigger-test-run.command.spec.js.map +1 -1
  99. package/dist/commands/agent/upload-build.command.js +2 -2
  100. package/dist/commands/agent/upload-build.command.js.map +1 -1
  101. package/dist/commands/all-commands.d.ts.map +1 -1
  102. package/dist/commands/all-commands.js +8 -6
  103. package/dist/commands/all-commands.js.map +1 -1
  104. package/dist/commands/auth/__tests__/get-project.command.spec.js +2 -2
  105. package/dist/commands/auth/__tests__/get-project.command.spec.js.map +1 -1
  106. package/dist/commands/auth/__tests__/list-projects.command.spec.js +2 -2
  107. package/dist/commands/auth/__tests__/list-projects.command.spec.js.map +1 -1
  108. package/dist/commands/auth/__tests__/login.command.spec.js +2 -2
  109. package/dist/commands/auth/__tests__/login.command.spec.js.map +1 -1
  110. package/dist/commands/auth/__tests__/logout.command.spec.js +2 -2
  111. package/dist/commands/auth/__tests__/logout.command.spec.js.map +1 -1
  112. package/dist/commands/auth/__tests__/set-project.command.spec.js +2 -2
  113. package/dist/commands/auth/__tests__/set-project.command.spec.js.map +1 -1
  114. package/dist/commands/auth/__tests__/whoami.command.spec.js +2 -2
  115. package/dist/commands/auth/__tests__/whoami.command.spec.js.map +1 -1
  116. package/dist/commands/auth/get-project.command.js +2 -2
  117. package/dist/commands/auth/get-project.command.js.map +1 -1
  118. package/dist/commands/auth/index.js +2 -2
  119. package/dist/commands/auth/index.js.map +1 -1
  120. package/dist/commands/auth/list-projects.command.js +2 -2
  121. package/dist/commands/auth/list-projects.command.js.map +1 -1
  122. package/dist/commands/auth/login.command.js +2 -2
  123. package/dist/commands/auth/login.command.js.map +1 -1
  124. package/dist/commands/auth/logout.command.js +2 -2
  125. package/dist/commands/auth/logout.command.js.map +1 -1
  126. package/dist/commands/auth/set-project.command.js +2 -2
  127. package/dist/commands/auth/set-project.command.js.map +1 -1
  128. package/dist/commands/auth/whoami.command.js +2 -2
  129. package/dist/commands/auth/whoami.command.js.map +1 -1
  130. package/dist/commands/ci/__tests__/label-commit.utils.spec.js +2 -2
  131. package/dist/commands/ci/__tests__/label-commit.utils.spec.js.map +1 -1
  132. package/dist/commands/ci/__tests__/session-filter.utils.spec.js +2 -2
  133. package/dist/commands/ci/__tests__/session-filter.utils.spec.js.map +1 -1
  134. package/dist/commands/ci/agent-test.command.js +2 -2
  135. package/dist/commands/ci/agent-test.command.js.map +1 -1
  136. package/dist/commands/ci/deprecated-trigger-options.js +2 -2
  137. package/dist/commands/ci/deprecated-trigger-options.js.map +1 -1
  138. package/dist/commands/ci/index.js +2 -2
  139. package/dist/commands/ci/index.js.map +1 -1
  140. package/dist/commands/ci/label-commit.command.js +2 -2
  141. package/dist/commands/ci/label-commit.command.js.map +1 -1
  142. package/dist/commands/ci/label-commit.core.js +2 -2
  143. package/dist/commands/ci/label-commit.core.js.map +1 -1
  144. package/dist/commands/ci/label-commit.types.js +2 -2
  145. package/dist/commands/ci/label-commit.types.js.map +1 -1
  146. package/dist/commands/ci/label-commit.utils.js +2 -2
  147. package/dist/commands/ci/label-commit.utils.js.map +1 -1
  148. package/dist/commands/ci/prepare.command.js +2 -2
  149. package/dist/commands/ci/prepare.command.js.map +1 -1
  150. package/dist/commands/ci/resolve-git-options.js +2 -2
  151. package/dist/commands/ci/resolve-git-options.js.map +1 -1
  152. package/dist/commands/ci/run-local.command.js +2 -2
  153. package/dist/commands/ci/run-local.command.js.map +1 -1
  154. package/dist/commands/ci/run-with-uploaded-asset-chunks.command.js +2 -2
  155. package/dist/commands/ci/run-with-uploaded-asset-chunks.command.js.map +1 -1
  156. package/dist/commands/ci/run-with-uploaded-asset-chunks.command.spec.js +2 -2
  157. package/dist/commands/ci/run-with-uploaded-asset-chunks.command.spec.js.map +1 -1
  158. package/dist/commands/ci/run-with-uploaded-asset-chunks.utils.js +2 -2
  159. package/dist/commands/ci/run-with-uploaded-asset-chunks.utils.js.map +1 -1
  160. package/dist/commands/ci/run.command.js +2 -2
  161. package/dist/commands/ci/run.command.js.map +1 -1
  162. package/dist/commands/ci/session-filter.utils.js +2 -2
  163. package/dist/commands/ci/session-filter.utils.js.map +1 -1
  164. package/dist/commands/ci/start-tunnel.command.js +2 -2
  165. package/dist/commands/ci/start-tunnel.command.js.map +1 -1
  166. package/dist/commands/ci/trigger-test-run.core.js +2 -2
  167. package/dist/commands/ci/trigger-test-run.core.js.map +1 -1
  168. package/dist/commands/ci/trigger-test-run.types.js +2 -2
  169. package/dist/commands/ci/trigger-test-run.types.js.map +1 -1
  170. package/dist/commands/ci/upload-asset-chunk.command.js +2 -2
  171. package/dist/commands/ci/upload-asset-chunk.command.js.map +1 -1
  172. package/dist/commands/ci/upload-assets.command.js +2 -2
  173. package/dist/commands/ci/upload-assets.command.js.map +1 -1
  174. package/dist/commands/ci/upload-container.command.js +2 -2
  175. package/dist/commands/ci/upload-container.command.js.map +1 -1
  176. package/dist/commands/crawl.command.js +2 -2
  177. package/dist/commands/crawl.command.js.map +1 -1
  178. package/dist/commands/debug/clean-workspaces.js +2 -2
  179. package/dist/commands/debug/clean-workspaces.js.map +1 -1
  180. package/dist/commands/debug/index.js +2 -2
  181. package/dist/commands/debug/index.js.map +1 -1
  182. package/dist/commands/debug/present-workspace.js +2 -2
  183. package/dist/commands/debug/present-workspace.js.map +1 -1
  184. package/dist/commands/debug/project-worktree.js +2 -2
  185. package/dist/commands/debug/project-worktree.js.map +1 -1
  186. package/dist/commands/deprecated-aliases.js +2 -2
  187. package/dist/commands/deprecated-aliases.js.map +1 -1
  188. package/dist/commands/download/index.js +2 -2
  189. package/dist/commands/download/index.js.map +1 -1
  190. package/dist/commands/download/replay.command.js +2 -2
  191. package/dist/commands/download/replay.command.js.map +1 -1
  192. package/dist/commands/download/session.command.js +2 -2
  193. package/dist/commands/download/session.command.js.map +1 -1
  194. package/dist/commands/download/test-run.command.js +2 -2
  195. package/dist/commands/download/test-run.command.js.map +1 -1
  196. package/dist/commands/local/get-edited-files.utils.js +2 -2
  197. package/dist/commands/local/get-edited-files.utils.js.map +1 -1
  198. package/dist/commands/local/get-edited-files.utils.spec.js +2 -2
  199. package/dist/commands/local/get-edited-files.utils.spec.js.map +1 -1
  200. package/dist/commands/local/index.js +2 -2
  201. package/dist/commands/local/index.js.map +1 -1
  202. package/dist/commands/local/relevant-sessions.command.js +2 -2
  203. package/dist/commands/local/relevant-sessions.command.js.map +1 -1
  204. package/dist/commands/onboard/__tests__/build-context.spec.d.ts +2 -0
  205. package/dist/commands/onboard/__tests__/build-context.spec.d.ts.map +1 -0
  206. package/dist/commands/onboard/__tests__/build-context.spec.js +179 -0
  207. package/dist/commands/onboard/__tests__/build-context.spec.js.map +1 -0
  208. package/dist/commands/onboard/__tests__/check-vcs-link.spec.d.ts +2 -0
  209. package/dist/commands/onboard/__tests__/check-vcs-link.spec.d.ts.map +1 -0
  210. package/dist/commands/onboard/__tests__/check-vcs-link.spec.js +164 -0
  211. package/dist/commands/onboard/__tests__/check-vcs-link.spec.js.map +1 -0
  212. package/dist/commands/onboard/__tests__/codex-mcp.spec.d.ts +2 -0
  213. package/dist/commands/onboard/__tests__/codex-mcp.spec.d.ts.map +1 -0
  214. package/dist/commands/onboard/__tests__/codex-mcp.spec.js +73 -0
  215. package/dist/commands/onboard/__tests__/codex-mcp.spec.js.map +1 -0
  216. package/dist/commands/onboard/__tests__/detect-framework.spec.d.ts +2 -0
  217. package/dist/commands/onboard/__tests__/detect-framework.spec.d.ts.map +1 -0
  218. package/dist/commands/onboard/__tests__/detect-framework.spec.js +277 -0
  219. package/dist/commands/onboard/__tests__/detect-framework.spec.js.map +1 -0
  220. package/dist/commands/onboard/__tests__/git-repo-info.spec.d.ts +2 -0
  221. package/dist/commands/onboard/__tests__/git-repo-info.spec.d.ts.map +1 -0
  222. package/dist/commands/onboard/__tests__/git-repo-info.spec.js +109 -0
  223. package/dist/commands/onboard/__tests__/git-repo-info.spec.js.map +1 -0
  224. package/dist/commands/onboard/__tests__/inline-doc-constants.spec.d.ts +2 -0
  225. package/dist/commands/onboard/__tests__/inline-doc-constants.spec.d.ts.map +1 -0
  226. package/dist/commands/onboard/__tests__/inline-doc-constants.spec.js +157 -0
  227. package/dist/commands/onboard/__tests__/inline-doc-constants.spec.js.map +1 -0
  228. package/dist/commands/onboard/__tests__/install-skills.spec.d.ts +2 -0
  229. package/dist/commands/onboard/__tests__/install-skills.spec.d.ts.map +1 -0
  230. package/dist/commands/onboard/__tests__/install-skills.spec.js +158 -0
  231. package/dist/commands/onboard/__tests__/install-skills.spec.js.map +1 -0
  232. package/dist/commands/onboard/__tests__/materialize-workspace.spec.d.ts +2 -0
  233. package/dist/commands/onboard/__tests__/materialize-workspace.spec.d.ts.map +1 -0
  234. package/dist/commands/onboard/__tests__/materialize-workspace.spec.js +116 -0
  235. package/dist/commands/onboard/__tests__/materialize-workspace.spec.js.map +1 -0
  236. package/dist/commands/onboard/__tests__/resolve-app.spec.d.ts +2 -0
  237. package/dist/commands/onboard/__tests__/resolve-app.spec.d.ts.map +1 -0
  238. package/dist/commands/onboard/__tests__/resolve-app.spec.js +166 -0
  239. package/dist/commands/onboard/__tests__/resolve-app.spec.js.map +1 -0
  240. package/dist/commands/onboard/__tests__/safe-repo-fs.spec.d.ts +2 -0
  241. package/dist/commands/onboard/__tests__/safe-repo-fs.spec.d.ts.map +1 -0
  242. package/dist/commands/onboard/__tests__/safe-repo-fs.spec.js +137 -0
  243. package/dist/commands/onboard/__tests__/safe-repo-fs.spec.js.map +1 -0
  244. package/dist/commands/onboard/__tests__/setup-agent-integrations.spec.d.ts +2 -0
  245. package/dist/commands/onboard/__tests__/setup-agent-integrations.spec.d.ts.map +1 -0
  246. package/dist/commands/onboard/__tests__/setup-agent-integrations.spec.js +286 -0
  247. package/dist/commands/onboard/__tests__/setup-agent-integrations.spec.js.map +1 -0
  248. package/dist/commands/onboard/build-context.d.ts +16 -0
  249. package/dist/commands/onboard/build-context.d.ts.map +1 -0
  250. package/dist/commands/onboard/build-context.js +104 -0
  251. package/dist/commands/onboard/build-context.js.map +1 -0
  252. package/dist/commands/onboard/check-vcs-link.d.ts +14 -0
  253. package/dist/commands/onboard/check-vcs-link.d.ts.map +1 -0
  254. package/dist/commands/onboard/check-vcs-link.js +111 -0
  255. package/dist/commands/onboard/check-vcs-link.js.map +1 -0
  256. package/dist/commands/onboard/codex-mcp.d.ts +24 -0
  257. package/dist/commands/onboard/codex-mcp.d.ts.map +1 -0
  258. package/dist/commands/onboard/codex-mcp.js +302 -0
  259. package/dist/commands/onboard/codex-mcp.js.map +1 -0
  260. package/dist/commands/onboard/customer-agents.d.ts +9 -0
  261. package/dist/commands/onboard/customer-agents.d.ts.map +1 -0
  262. package/dist/commands/onboard/customer-agents.js +19 -0
  263. package/dist/commands/onboard/customer-agents.js.map +1 -0
  264. package/dist/commands/onboard/customer-agents.json +17 -0
  265. package/dist/commands/onboard/customer-docs.d.ts +21 -0
  266. package/dist/commands/onboard/customer-docs.d.ts.map +1 -0
  267. package/dist/commands/onboard/customer-docs.js +31 -0
  268. package/dist/commands/onboard/customer-docs.js.map +1 -0
  269. package/dist/commands/onboard/customer-docs.json +35 -0
  270. package/dist/commands/onboard/detect-framework.d.ts +26 -0
  271. package/dist/commands/onboard/detect-framework.d.ts.map +1 -0
  272. package/dist/commands/onboard/detect-framework.js +305 -0
  273. package/dist/commands/onboard/detect-framework.js.map +1 -0
  274. package/dist/commands/onboard/discover-apps.d.ts +21 -0
  275. package/dist/commands/onboard/discover-apps.d.ts.map +1 -0
  276. package/dist/commands/onboard/discover-apps.js +318 -0
  277. package/dist/commands/onboard/discover-apps.js.map +1 -0
  278. package/dist/commands/onboard/docs-urls.d.ts +11 -0
  279. package/dist/commands/onboard/docs-urls.d.ts.map +1 -0
  280. package/dist/commands/onboard/docs-urls.js +17 -0
  281. package/dist/commands/onboard/docs-urls.js.map +1 -0
  282. package/dist/commands/onboard/git-repo-info.d.ts +15 -0
  283. package/dist/commands/onboard/git-repo-info.d.ts.map +1 -0
  284. package/dist/commands/onboard/git-repo-info.js +84 -0
  285. package/dist/commands/onboard/git-repo-info.js.map +1 -0
  286. package/dist/commands/onboard/index.d.ts +18 -0
  287. package/dist/commands/onboard/index.d.ts.map +1 -0
  288. package/dist/commands/onboard/index.js +164 -0
  289. package/dist/commands/onboard/index.js.map +1 -0
  290. package/dist/commands/onboard/inline-doc-constants.d.ts +21 -0
  291. package/dist/commands/onboard/inline-doc-constants.d.ts.map +1 -0
  292. package/dist/commands/onboard/inline-doc-constants.js +238 -0
  293. package/dist/commands/onboard/inline-doc-constants.js.map +1 -0
  294. package/dist/commands/onboard/launch-agent.d.ts +65 -0
  295. package/dist/commands/onboard/launch-agent.d.ts.map +1 -0
  296. package/dist/commands/onboard/launch-agent.js +311 -0
  297. package/dist/commands/onboard/launch-agent.js.map +1 -0
  298. package/dist/commands/onboard/materialize-workspace.d.ts +68 -0
  299. package/dist/commands/onboard/materialize-workspace.d.ts.map +1 -0
  300. package/dist/commands/onboard/materialize-workspace.js +177 -0
  301. package/dist/commands/onboard/materialize-workspace.js.map +1 -0
  302. package/dist/commands/onboard/print-summary.d.ts +10 -0
  303. package/dist/commands/onboard/print-summary.d.ts.map +1 -0
  304. package/dist/commands/onboard/print-summary.js +49 -0
  305. package/dist/commands/onboard/print-summary.js.map +1 -0
  306. package/dist/commands/onboard/resolve-app.d.ts +21 -0
  307. package/dist/commands/onboard/resolve-app.d.ts.map +1 -0
  308. package/dist/commands/onboard/resolve-app.js +78 -0
  309. package/dist/commands/onboard/resolve-app.js.map +1 -0
  310. package/dist/commands/onboard/resolve-project.d.ts +14 -0
  311. package/dist/commands/onboard/resolve-project.d.ts.map +1 -0
  312. package/dist/commands/onboard/resolve-project.js +92 -0
  313. package/dist/commands/onboard/resolve-project.js.map +1 -0
  314. package/dist/commands/onboard/safe-repo-fs.d.ts +59 -0
  315. package/dist/commands/onboard/safe-repo-fs.d.ts.map +1 -0
  316. package/dist/commands/onboard/safe-repo-fs.js +266 -0
  317. package/dist/commands/onboard/safe-repo-fs.js.map +1 -0
  318. package/dist/commands/onboard/setup-agent-integrations.d.ts +43 -0
  319. package/dist/commands/onboard/setup-agent-integrations.d.ts.map +1 -0
  320. package/dist/commands/onboard/setup-agent-integrations.js +324 -0
  321. package/dist/commands/onboard/setup-agent-integrations.js.map +1 -0
  322. package/dist/commands/onboard/templates/CLAUDE.md +213 -0
  323. package/dist/commands/onboard/templates/agents/auth-setup.md +117 -0
  324. package/dist/commands/onboard/templates/agents/ci-setup.md +742 -0
  325. package/dist/commands/onboard/templates/agents/csp-setup.md +78 -0
  326. package/dist/commands/onboard/templates/agents/false-positive-prevention.md +268 -0
  327. package/dist/commands/onboard/templates/agents/feature-flag-setup.md +133 -0
  328. package/dist/commands/onboard/templates/agents/local-simulation-verification.md +96 -0
  329. package/dist/commands/onboard/templates/agents/persisted-graphql-queries.md +150 -0
  330. package/dist/commands/onboard/templates/agents/recorder-installation.md +194 -0
  331. package/dist/commands/onboard/templates/agents/replay-fetch-retry-compatibility.md +252 -0
  332. package/dist/commands/onboard/templates/agents/reviewer.md +788 -0
  333. package/dist/commands/onboard/templates/agents/service-worker-compatibility.md +254 -0
  334. package/dist/commands/onboard/templates/agents/session-context.md +133 -0
  335. package/dist/commands/onboard/templates/agents/shared-worker-compatibility.md +187 -0
  336. package/dist/commands/onboard/templates/docs/additional-guides/backend-recorder.ts +340 -0
  337. package/dist/commands/onboard/templates/docs/ci/not-yet-run-checks.ts +58 -0
  338. package/dist/commands/onboard/templates/docs/ci.ts +19 -0
  339. package/dist/commands/onboard/templates/docs/cloud-replay.ts +145 -0
  340. package/dist/commands/onboard/templates/docs/constants.ts +37 -0
  341. package/dist/commands/onboard/templates/docs/github-actions-v2.ts +859 -0
  342. package/dist/commands/onboard/templates/docs/how-to/auth/bypassing-auth.ts +27 -0
  343. package/dist/commands/onboard/templates/docs/how-to/auth/enabling-full-auth.ts +91 -0
  344. package/dist/commands/onboard/templates/docs/how-to/configure-ignore-patterns.ts +77 -0
  345. package/dist/commands/onboard/templates/docs/how-to/enable-source-coverage.ts +84 -0
  346. package/dist/commands/onboard/templates/docs/how-to/fix-false-positive-diffs.ts +156 -0
  347. package/dist/commands/onboard/templates/docs/how-to/link-bitbucket.ts +15 -0
  348. package/dist/commands/onboard/templates/docs/how-to/link-gitlab.ts +22 -0
  349. package/dist/commands/onboard/templates/docs/how-to/record-session-context.ts +129 -0
  350. package/dist/commands/onboard/templates/docs/how-to/recorder-script.ts +139 -0
  351. package/dist/commands/onboard/templates/docs/how-to/testing-feature-flags.ts +97 -0
  352. package/dist/commands/onboard/templates/docs/how-to/testing-multiple-apps-or-app-variants.ts +40 -0
  353. package/dist/commands/onboard/templates/docs/how-to/troubleshoot-auth.ts +58 -0
  354. package/dist/commands/onboard/templates/docs/how-to/troubleshoot-failed-simulations.ts +97 -0
  355. package/dist/commands/onboard/templates/docs/how-to/typescript-types.ts +51 -0
  356. package/dist/commands/onboard/templates/docs/how-to/window-meticulous-object.ts +685 -0
  357. package/dist/commands/onboard/templates/docs/onboarding-guide.ts +415 -0
  358. package/dist/commands/onboard/templates/docs/recorder-getting-started.ts +24 -0
  359. package/dist/commands/onboard/templates/docs/recorder-snippets/constants.ts +1 -0
  360. package/dist/commands/onboard/templates/docs/recorder-snippets/explanation-of-methods-to-add-recorder.ts +21 -0
  361. package/dist/commands/onboard/templates/docs/recorder-snippets/npm-package-based-instructions/angular-instructions.ts +34 -0
  362. package/dist/commands/onboard/templates/docs/recorder-snippets/npm-package-based-instructions/any-other-framework-instructions.ts +118 -0
  363. package/dist/commands/onboard/templates/docs/recorder-snippets/npm-package-based-instructions/vue-instructions.ts +39 -0
  364. package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/next-js-instructions.ts +49 -0
  365. package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/nuxtjs-instructions.ts +68 -0
  366. package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/rsbuild-instructions.ts +66 -0
  367. package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/storybook-instructions.ts +59 -0
  368. package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/sveltekit-instructions.ts +113 -0
  369. package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/vite-instructions.ts +58 -0
  370. package/dist/commands/onboard/templates/docs/recorder-snippets/script-requirements.ts +51 -0
  371. package/dist/commands/onboard/templates/docs/recorder-snippets/steps-after-installing-recorder.ts +25 -0
  372. package/dist/commands/onboard/templates/docs/reference/cli-commands.ts +1324 -0
  373. package/dist/commands/onboard/templates/docs/session-recording/csp-exceptions.ts +17 -0
  374. package/dist/commands/onboard/templates/docs/session-recording/recorder-npm-dependency.ts +62 -0
  375. package/dist/commands/onboard/templates/docs-imports/src/lib/next/next.constants.ts +46 -0
  376. package/dist/commands/onboard/templates/docs-imports/src/lib/utils/internal-urls/docs-urls.utils.ts +254 -0
  377. package/dist/commands/onboard/templates/settings.json +14 -0
  378. package/dist/commands/project/index.js +2 -2
  379. package/dist/commands/project/index.js.map +1 -1
  380. package/dist/commands/project/show.command.js +2 -2
  381. package/dist/commands/project/show.command.js.map +1 -1
  382. package/dist/commands/project/upload-source.command.js +2 -2
  383. package/dist/commands/project/upload-source.command.js.map +1 -1
  384. package/dist/commands/record/__tests__/backend-dev-command.utils.spec.js +2 -2
  385. package/dist/commands/record/__tests__/backend-dev-command.utils.spec.js.map +1 -1
  386. package/dist/commands/record/__tests__/backend-sidecar.utils.spec.js +2 -2
  387. package/dist/commands/record/__tests__/backend-sidecar.utils.spec.js.map +1 -1
  388. package/dist/commands/record/__tests__/backend.command.spec.js +2 -2
  389. package/dist/commands/record/__tests__/backend.command.spec.js.map +1 -1
  390. package/dist/commands/record/__tests__/login.command.spec.js +2 -2
  391. package/dist/commands/record/__tests__/login.command.spec.js.map +1 -1
  392. package/dist/commands/record/__tests__/session.command.spec.js +2 -2
  393. package/dist/commands/record/__tests__/session.command.spec.js.map +1 -1
  394. package/dist/commands/record/backend-dev-command.utils.js +2 -2
  395. package/dist/commands/record/backend-dev-command.utils.js.map +1 -1
  396. package/dist/commands/record/backend-sidecar.utils.js +2 -2
  397. package/dist/commands/record/backend-sidecar.utils.js.map +1 -1
  398. package/dist/commands/record/backend.command.js +2 -2
  399. package/dist/commands/record/backend.command.js.map +1 -1
  400. package/dist/commands/record/index.js +2 -2
  401. package/dist/commands/record/index.js.map +1 -1
  402. package/dist/commands/record/login.command.js +2 -2
  403. package/dist/commands/record/login.command.js.map +1 -1
  404. package/dist/commands/record/session.command.js +2 -2
  405. package/dist/commands/record/session.command.js.map +1 -1
  406. package/dist/commands/replay-debugger.ui.js +2 -2
  407. package/dist/commands/replay-debugger.ui.js.map +1 -1
  408. package/dist/commands/replay.command.js +2 -2
  409. package/dist/commands/replay.command.js.map +1 -1
  410. package/dist/commands/schema.command.js +2 -2
  411. package/dist/commands/schema.command.js.map +1 -1
  412. package/dist/commands/schema.command.spec.js +2 -2
  413. package/dist/commands/schema.command.spec.js.map +1 -1
  414. package/dist/index.js +2 -2
  415. package/dist/index.js.map +1 -1
  416. package/dist/main.js +2 -2
  417. package/dist/main.js.map +1 -1
  418. package/dist/utils/__tests__/handle-auth-failure.spec.js +2 -2
  419. package/dist/utils/__tests__/handle-auth-failure.spec.js.map +1 -1
  420. package/dist/utils/__tests__/project-selection-hint.spec.js +2 -2
  421. package/dist/utils/__tests__/project-selection-hint.spec.js.map +1 -1
  422. package/dist/utils/__tests__/resolve-project-identifier.spec.js +2 -2
  423. package/dist/utils/__tests__/resolve-project-identifier.spec.js.map +1 -1
  424. package/dist/utils/__tests__/resolve-test-run-from-commit.spec.js +2 -2
  425. package/dist/utils/__tests__/resolve-test-run-from-commit.spec.js.map +1 -1
  426. package/dist/utils/__tests__/select-project.spec.js +5 -4
  427. package/dist/utils/__tests__/select-project.spec.js.map +1 -1
  428. package/dist/utils/cli-user-error.js +2 -2
  429. package/dist/utils/cli-user-error.js.map +1 -1
  430. package/dist/utils/constants.js +2 -2
  431. package/dist/utils/constants.js.map +1 -1
  432. package/dist/utils/environment.utils.js +2 -2
  433. package/dist/utils/environment.utils.js.map +1 -1
  434. package/dist/utils/format-coverage-ranges.js +2 -2
  435. package/dist/utils/format-coverage-ranges.js.map +1 -1
  436. package/dist/utils/handle-auth-failure.js +2 -2
  437. package/dist/utils/handle-auth-failure.js.map +1 -1
  438. package/dist/utils/out-of-date-client-error.js +2 -2
  439. package/dist/utils/out-of-date-client-error.js.map +1 -1
  440. package/dist/utils/project-selection-hint.js +2 -2
  441. package/dist/utils/project-selection-hint.js.map +1 -1
  442. package/dist/utils/resolve-project-identifier.js +2 -2
  443. package/dist/utils/resolve-project-identifier.js.map +1 -1
  444. package/dist/utils/resolve-test-run-from-commit.js +2 -2
  445. package/dist/utils/resolve-test-run-from-commit.js.map +1 -1
  446. package/dist/utils/select-project.d.ts +9 -0
  447. package/dist/utils/select-project.d.ts.map +1 -1
  448. package/dist/utils/select-project.js +58 -15
  449. package/dist/utils/select-project.js.map +1 -1
  450. package/package.json +13 -11
@@ -0,0 +1,859 @@
1
+ import { METICULOUS_SUPPORT_EMAIL } from "src/lib/next/next.constants";
2
+ import {
3
+ BRANCHES_REQUIRED_TO_RUN_ON_URL,
4
+ CLOUD_REPLAY_URL,
5
+ ENABLE_SOURCE_COVERAGE_URL,
6
+ MAKE_CHECK_BLOCKING_URL,
7
+ } from "src/lib/utils/internal-urls/docs-urls.utils";
8
+ import {
9
+ GITHUB_ACTION_UPLOAD_ASSETS_NAME,
10
+ GITHUB_ACTION_UPLOAD_CONTAINER_NAME,
11
+ METICULOUS_GITHUB_APP_INSTALL_URL,
12
+ } from "./constants";
13
+ import { linkBitbucketInstructions } from "./how-to/link-bitbucket";
14
+ import { linkGitLabInstructions } from "./how-to/link-gitlab";
15
+
16
+ const STATIC_ASSET_URLS_WARNING = `
17
+ {% callout_card variant="warning" title="Important: Static Asset URLs" %}
18
+ Meticulous automatically swaps the base URL (origin) for navigation and API requests, but **static assets (CSS, JS, images) referenced with absolute URLs in your HTML are NOT automatically rewritten**.
19
+
20
+ If your HTML contains absolute URLs like:
21
+ \`\`\`html
22
+ <script src="https://example.com/dist/app.js"></script>
23
+ <link href="https://example.com/styles/main.css" rel="stylesheet">
24
+ \`\`\`
25
+
26
+ You should change them to relative URLs:
27
+ \`\`\`html
28
+ <script src="/dist/app.js"></script>
29
+ <link href="/styles/main.css" rel="stylesheet">
30
+ \`\`\`
31
+
32
+ This ensures assets are loaded from the correct test environment rather than the original recording environment.
33
+ {% /callout_card %}
34
+ `;
35
+
36
+ const workflowTrigger = `
37
+ # Important: The workflow needs to run both on pushes to your main branch and on
38
+ # pull requests. It needs to run on your main branch because it'll use the results
39
+ # from the base commit of the PR on the main branch to compare against.
40
+ on:
41
+ push:
42
+ branches:
43
+ - main
44
+ pull_request: {}
45
+ # Important: We need the workflow to be triggered on workflow_dispatch events,
46
+ # so that Meticulous can run the workflow on the base commit to compare
47
+ # against if an existing workflow hasn't run
48
+ workflow_dispatch: {}`;
49
+
50
+ const workflowShared = `
51
+ name: Meticulous
52
+ ${workflowTrigger}
53
+
54
+ # Important: The workflow needs all the permissions below.
55
+ # These permissions are mainly needed to post and update the status check and
56
+ # feedback comment on your PR. Meticulous won't work without them.
57
+ permissions:
58
+ actions: write
59
+ contents: read
60
+ issues: write
61
+ pull-requests: write
62
+ statuses: read
63
+
64
+ jobs:
65
+ test:
66
+ name: Meticulous
67
+ runs-on: ubuntu-latest
68
+
69
+ steps:
70
+ - name: Checkout repository
71
+ uses: actions/checkout@v4
72
+
73
+ - name: Install pnpm
74
+ uses: pnpm/action-setup@v4
75
+ with:
76
+ version: 10
77
+ run_install: false
78
+
79
+ - name: Use Node.js LTS
80
+ uses: actions/setup-node@v4
81
+ with:
82
+ node-version: "24"
83
+ cache: pnpm
84
+
85
+ - name: Cache node_modules
86
+ uses: actions/cache@v4
87
+ with:
88
+ path: node_modules
89
+ key: node-modules-\${{ runner.os }}-\${{ hashFiles('**/pnpm-lock.yaml') }}
90
+ restore-keys: |
91
+ node-modules-\${{ runner.os }}
92
+
93
+ - name: Install dependencies
94
+ run: |
95
+ pnpm install --frozen-lockfile
96
+
97
+ - name: Build project
98
+ # METICULOUS_BUILD marks this as a build for Meticulous testing (see note above).
99
+ env:
100
+ METICULOUS_BUILD: "true"
101
+ run: |
102
+ pnpm build
103
+ `;
104
+
105
+ const meticulousBuildEnvNote = `
106
+ {% callout_card variant="info" title="The METICULOUS_BUILD environment variable" %}
107
+ The example workflows below set \`METICULOUS_BUILD=true\` on the build (and, for container
108
+ builds, on the image). This marks the build as one that Meticulous will test, so your app can
109
+ detect it and adjust behaviour that would otherwise be unreliable during replay — most
110
+ commonly **skipping retry-heavy data fetches** in server-side lifecycle hooks
111
+ (\`getServerSideProps\`, \`getInitialProps\`, loaders) that have no recorded response during
112
+ replay and would otherwise fail and be retried repeatedly.
113
+
114
+ Because it is set **only** in your Meticulous build (never in production), it is safe to gate
115
+ behaviour on — unlike a request header, it cannot be spoofed. In server / build-time code read
116
+ it with \`process.env.METICULOUS_BUILD === "true"\`; in browser code prefer
117
+ \`window.Meticulous?.isRunningAsTest\`. If your app does not need it, leaving it set is harmless.
118
+ {% /callout_card %}
119
+ `;
120
+
121
+ export const document = `---
122
+ {
123
+ "title": "Setting up Meticulous tests to run in your CI provider"
124
+ }
125
+ ---
126
+
127
+ # {% $frontmatter.title %}
128
+
129
+ In this guide, we'll show you how to set up Meticulous to run in your CI system.
130
+
131
+ {% tabs tabNameSpace="provider" %}
132
+ {% tab label="GitHub" %}
133
+
134
+ ## 1. Install the Meticulous GitHub App
135
+
136
+ Visit [${METICULOUS_GITHUB_APP_INSTALL_URL}](${METICULOUS_GITHUB_APP_INSTALL_URL}) to install our GitHub App.
137
+
138
+ ## 2. Add your Meticulous API token as a secret to your GitHub repository
139
+
140
+ Select the project below that contains the sessions you wish to simulate, copy
141
+ and paste the API token, and add it to your GitHub repository as a secret named
142
+ \`METICULOUS_API_TOKEN\`:
143
+
144
+ {% code_with_project_selector %}
145
+ METICULOUS_API_TOKEN:
146
+ {% standalone_api_token /%}
147
+ {% /code_with_project_selector %}
148
+
149
+ *Be very careful with this API token, since it allows the holder access to your recorded sessions.*
150
+
151
+ {% expand title="How do I add it as a secret to my GitHub repository?" %}
152
+ Open your repo and go to the settings tab:
153
+
154
+ ![Settings tab](https://assets.meticulous.ai/docs/repo-settings-tab.png)
155
+
156
+ Select the actions tab within the secrets tab:
157
+
158
+ ![Secrets tab](https://assets.meticulous.ai/docs/actions-secrets-tab.png)
159
+
160
+ And click the new repository secret button:
161
+
162
+ ![New repository secret button](https://assets.meticulous.ai/docs/new-repo-secret-button.png)
163
+
164
+ Name the secret \`METICULOUS_API_TOKEN\`, and paste in the API token you copied from the previous step, and click add secret:
165
+
166
+ ![Add secret](https://assets.meticulous.ai/docs/new-secret-screen.png)
167
+ {% /expand %}
168
+
169
+ ## 3. Add a GitHub Actions workflow to run your tests
170
+
171
+ To run Meticulous on CI add a new \`.github/workflows/meticulous.yaml\` file, or, if you already use GitHub Actions, you
172
+ can add it as a job to an existing workflow. The workflow needs to run on both [pushes to your main branch and on pull requests](${BRANCHES_REQUIRED_TO_RUN_ON_URL}).
173
+
174
+ We offer two approaches to running Meticulous tests on CI. We recommend choosing the first approach that works for your app:
175
+
176
+ 1. **Upload your built assets** for us to test. This is the recommended approach if your app is a static site, i.e. it can be served as a folder of static assets (HTML/JS/CSS) without any server-side rendering or complex request rewriting. This approach is **NOT recommended** for Next.js applications as they typically cannot be served as static assets.
177
+ 2. **Upload a built container image** (e.g. a Docker image) for us to test. This is the recommended approach for most other apps, including Next.js applications. Almost any app can be containerized, so this is the universal fallback.
178
+
179
+ {% callout_card variant="info" title="Recommended approaches" %}
180
+ We recommend **uploading static assets** or **uploading a container image**. These are the simplest and most reliable ways to run Meticulous tests.
181
+
182
+ If you use a preview URL provider such as Vercel, Netlify, or similar, Meticulous can also test your PRs using [cloud replay](${CLOUD_REPLAY_URL}). Uploading static assets or a container image are still the preferred approaches.
183
+ {% /callout_card %}
184
+ ${meticulousBuildEnvNote}
185
+ {% tabs tabNameSpace="type" %}
186
+ {% tab label="Upload static assets" %}
187
+
188
+ This workflow file should use our \`upload-assets\` action to upload your built assets for us to test.
189
+
190
+ See below for an example workflow file, which you can add to your repo. Note that you'll need to update it with the build steps for your app.
191
+
192
+ File name: \`.github/workflows/meticulous.yaml\`.
193
+
194
+ File contents:
195
+
196
+ \`\`\`yaml
197
+ # Workflow for building frontend and running Meticulous tests against static assets
198
+ ${workflowShared}
199
+ - name: Run Meticulous tests
200
+ uses: ${GITHUB_ACTION_UPLOAD_ASSETS_NAME}@v1
201
+ with:
202
+ api-token: \${{ secrets.METICULOUS_API_TOKEN }}
203
+ # TODO: Update the directory path below to match your app's build output directory
204
+ # For example, if you're using Vite, this is typically "dist"
205
+ app-directory: "dist"
206
+ \`\`\`
207
+
208
+ ${STATIC_ASSET_URLS_WARNING}
209
+ {% /tab %}
210
+ {% tab label="Upload container image" %}
211
+
212
+ This workflow file should use our \`upload-container\` action to upload your built container image for us to test.
213
+
214
+ Some requirements for the docker image you build are:
215
+ - It should be built for the \`linux/amd64\` platform
216
+ - It should respect the \`PORT\` environment variable, or if it doesn't, you should specify the port using the \`container-port\` input to the \`upload-container\` action.
217
+ - It should respond to the \`GET /\` endpoint for a health check probe.
218
+
219
+ You can provide additional environment variables, if needed, to the container using the \`container-env\` input to the \`upload-container\` action,
220
+ specifying them as a newline-delimited list of \`NAME=value\` pairs.
221
+
222
+ See below for an example workflow file, which you can add to your repo. Note that you'll need to update it with the build steps for your app.
223
+
224
+ File name: \`.github/workflows/meticulous.yaml\`.
225
+
226
+ File contents:
227
+
228
+ \`\`\`yaml
229
+ # Workflow for building frontend and running Meticulous tests against a container image
230
+ ${workflowShared}
231
+ - name: Set up Docker Buildx
232
+ uses: docker/setup-buildx-action@v3
233
+
234
+ - name: Docker Build (no push)
235
+ uses: docker/build-push-action@v6
236
+ with:
237
+ context: .
238
+ tags: my-app:\${{ github.sha }}
239
+ push: false
240
+ # Marks the image as a Meticulous build (see note above). Consume it in your
241
+ # Dockerfile with \`ARG METICULOUS_BUILD\` / \`ENV METICULOUS_BUILD=$METICULOUS_BUILD\`
242
+ # if you need it at build time (e.g. getStaticProps / static generation).
243
+ build-args: |
244
+ METICULOUS_BUILD=true
245
+
246
+ - name: Run Meticulous tests
247
+ uses: ${GITHUB_ACTION_UPLOAD_CONTAINER_NAME}@v1
248
+ with:
249
+ api-token: \${{ secrets.METICULOUS_API_TOKEN }}
250
+ image-tag: my-app:\${{ github.sha }}
251
+ # Optional inputs:
252
+ container-port: 1234
253
+ # METICULOUS_BUILD is also passed at runtime so server-side code (e.g.
254
+ # getServerSideProps) can detect the Meticulous replay. See note above.
255
+ container-env: |
256
+ MY_ENV_VAR=my-value
257
+ METICULOUS_BUILD=true
258
+ \`\`\`
259
+
260
+ ${STATIC_ASSET_URLS_WARNING}
261
+ {% /tab %}
262
+ {% /tabs %}
263
+
264
+ If you hit any issues then email [${METICULOUS_SUPPORT_EMAIL}](mailto:${METICULOUS_SUPPORT_EMAIL}) and we'll help you get set up.
265
+
266
+ {% expand title="Naming workflows, jobs and secrets in a monorepo (recommended)" %}
267
+
268
+ If your repository only ever ships one frontend, the generic names from the example
269
+ above (\`.github/workflows/meticulous.yaml\`, workflow \`name: Meticulous\`,
270
+ \`METICULOUS_API_TOKEN\` secret) are fine and you can skip this section.
271
+
272
+ If your repository is a monorepo with more than one frontend, **or might host another
273
+ Meticulous-tested frontend later**, per-app naming from the start makes future expansion
274
+ painless: a second project can be added side-by-side without renaming the existing
275
+ workflow file, job, or repository secret. The convention costs nothing on day one and
276
+ keeps later additions contained to a new file.
277
+
278
+ Two pieces of identity drive everything:
279
+
280
+ - **\`<app-kebab>\`** — lowercase hyphenated, usually the last path segment of the
281
+ app you're onboarding (e.g. an app at \`apps/dashboard\` becomes \`dashboard\`). Used
282
+ in the workflow filename, the workflow \`name:\`, and the job \`name:\`.
283
+ - **\`<APP_SLUG>\`** — the same identity as \`SCREAMING_SNAKE_CASE\` (e.g. \`dashboard\`
284
+ becomes \`DASHBOARD\`, \`marketing-site\` becomes \`MARKETING_SITE\`). Used in the GitHub
285
+ repository secret name and every \`secrets.*\` expression that reads it. A second
286
+ Meticulous project on the same monorepo later picks a different \`<APP_SLUG>\`, so
287
+ the two never collide.
288
+
289
+ The convention we recommend:
290
+
291
+ | | Recommended | Avoid |
292
+ | --- | --- | --- |
293
+ | New workflow file | \`.github/workflows/meticulous-<app-kebab>.yml\` | \`.github/workflows/meticulous.yaml\` |
294
+ | Workflow YAML top-level \`name:\` | \`Meticulous (<app-kebab>)\` | bare \`Meticulous\` |
295
+ | Job \`name:\` (\`jobs.<id>.name\`) | \`Meticulous (<app-kebab>)\` | bare \`Meticulous\` |
296
+ | GitHub repository secret | \`METICULOUS_API_TOKEN_<APP_SLUG>\` | bare \`METICULOUS_API_TOKEN\` |
297
+ | YAML reference to the API token | \`\${{ secrets.METICULOUS_API_TOKEN_<APP_SLUG> }}\` | \`\${{ secrets.METICULOUS_API_TOKEN }}\` |
298
+
299
+ We also recommend scoping the workflow to the selected app's directory (and the
300
+ shared UI libraries it imports) using \`paths:\` filters on both \`push\` and
301
+ \`pull_request\` triggers, so the workflow only runs on commits that actually touch
302
+ the relevant code.
303
+
304
+ Pulling those together for an app at \`apps/dashboard\` (so \`<app-kebab>\` is
305
+ \`dashboard\` and \`<APP_SLUG>\` is \`DASHBOARD\`):
306
+
307
+ \`\`\`yaml
308
+ # .github/workflows/meticulous-dashboard.yml
309
+ name: Meticulous (dashboard)
310
+
311
+ on:
312
+ push:
313
+ branches: [main]
314
+ paths:
315
+ - "apps/dashboard/**"
316
+ # any UI libraries the app imports:
317
+ - "packages/ui/**"
318
+ pull_request:
319
+ paths:
320
+ - "apps/dashboard/**"
321
+ - "packages/ui/**"
322
+ workflow_dispatch: {}
323
+
324
+ permissions:
325
+ actions: write
326
+ contents: read
327
+ issues: write
328
+ pull-requests: write
329
+ statuses: read
330
+
331
+ jobs:
332
+ test:
333
+ name: Meticulous (dashboard)
334
+ runs-on: ubuntu-latest
335
+
336
+ steps:
337
+ - uses: actions/checkout@v4
338
+ - uses: actions/setup-node@v4
339
+ with:
340
+ node-version: "24"
341
+ cache: pnpm
342
+ - run: pnpm install --frozen-lockfile
343
+ - run: pnpm --filter dashboard build
344
+ env:
345
+ METICULOUS_BUILD: "true"
346
+ - uses: ${GITHUB_ACTION_UPLOAD_ASSETS_NAME}@v1
347
+ with:
348
+ api-token: \${{ secrets.METICULOUS_API_TOKEN_DASHBOARD }}
349
+ app-directory: "apps/dashboard/dist"
350
+ \`\`\`
351
+
352
+ When a second app on the same monorepo is later onboarded to Meticulous, copy this
353
+ file to \`meticulous-<other-app-kebab>.yml\` and substitute the second app's
354
+ \`<app-kebab>\` and \`<APP_SLUG>\` — the existing workflow stays untouched.
355
+
356
+ If a CLI step in the workflow reads \`$METICULOUS_API_TOKEN\` directly (for example a
357
+ script that calls \`npx @alwaysmeticulous/cli\` outside the action), re-expose the
358
+ suffixed secret under the bare environment-variable name on that job or step:
359
+
360
+ \`\`\`yaml
361
+ jobs:
362
+ test:
363
+ # ...
364
+ env:
365
+ METICULOUS_API_TOKEN: \${{ secrets.METICULOUS_API_TOKEN_<APP_SLUG> }}
366
+ \`\`\`
367
+
368
+ The GitHub repository secret name and every \`\${{ secrets.* }}\` expression still use
369
+ the suffixed form; only the in-job environment variable is re-exposed under the
370
+ generic name.
371
+
372
+ {% /expand %}
373
+
374
+ {% expand title="Choosing the runner size (optional)" %}
375
+
376
+ The example workflow uses \`runs-on: ubuntu-latest\` — GitHub's free runner. Meticulous's
377
+ build + replay step can be resource-heavy, so a larger runner can roughly halve the
378
+ wall-clock time of the job at extra cost. GitHub provides progressively larger labels
379
+ such as \`ubuntu-latest-4-cores\`, \`ubuntu-latest-8-cores\`, and \`ubuntu-latest-16-cores\`
380
+ (the exact labels available depend on your account's plan and any
381
+ [larger runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-larger-runners)
382
+ you have configured).
383
+
384
+ If you already build the app on a larger runner in another workflow, the simplest
385
+ choice is to use the same \`runs-on\` label here so the Meticulous job has at least as
386
+ much capacity as your normal build. Otherwise \`ubuntu-latest\` is a safe starting
387
+ point — you can scale up later if the job runs slowly.
388
+
389
+ {% /expand %}
390
+
391
+ {% expand title="Enable source maps (recommended)" %}
392
+
393
+ Meticulous uses source maps to attribute coverage to the original files in your repository
394
+ so you can see which parts of your code are exercised by the tested sessions. The cleanest
395
+ way to enable them is **inside this Meticulous workflow only**, via a CLI flag or
396
+ environment variable on the build command — your committed build config stays untouched,
397
+ and your other workflows (PR builds, production deploys) keep their existing behaviour.
398
+
399
+ Pick the snippet for your framework and apply it to the \`Build project\` step of the
400
+ example workflow above:
401
+
402
+ **Vite** — pass \`--sourcemap\` to \`vite build\`:
403
+
404
+ \`\`\`yaml
405
+ - name: Build project
406
+ run: pnpm build -- --sourcemap
407
+ \`\`\`
408
+
409
+ **Create React App** — set \`GENERATE_SOURCEMAP=true\`:
410
+
411
+ \`\`\`yaml
412
+ - name: Build project
413
+ env:
414
+ GENERATE_SOURCEMAP: "true"
415
+ run: pnpm build
416
+ \`\`\`
417
+
418
+ **Angular CLI** — pass \`--source-map\` to \`ng build\`:
419
+
420
+ \`\`\`yaml
421
+ - name: Build project
422
+ run: pnpm exec ng build --source-map
423
+ \`\`\`
424
+
425
+ **webpack (custom config)** — set \`SOURCEMAP=true\` in CI and read it from
426
+ \`webpack.config.js\`:
427
+
428
+ \`\`\`yaml
429
+ - name: Build project
430
+ env:
431
+ SOURCEMAP: "true"
432
+ run: pnpm build
433
+ \`\`\`
434
+
435
+ \`\`\`js
436
+ // webpack.config.js
437
+ module.exports = (env, argv) => ({
438
+ // ...
439
+ devtool: process.env.SOURCEMAP === "true" ? "source-map" : argv.devtool,
440
+ });
441
+ \`\`\`
442
+
443
+ **Next.js** and **Vue CLI** don't accept a build-time flag for this; they require a
444
+ one-line config change:
445
+
446
+ - Next.js — add \`productionBrowserSourceMaps: true\` to \`next.config.js\` (covers App
447
+ Router and Pages Router).
448
+ - Vue CLI — add \`productionSourceMap: true\` to \`vue.config.js\`.
449
+
450
+ These settings are safe to leave on permanently; they don't change runtime behaviour.
451
+
452
+ Source maps must be served alongside the built assets — either as \`.map\` files in the
453
+ same directory, via \`sourceMappingURL\` comments in the bundles, or via the \`SourceMap\`
454
+ HTTP header. The \`upload-assets\` and \`upload-container\` actions pick them up
455
+ automatically when they sit next to the bundles in your build output.
456
+
457
+ For monorepo source maps that span multiple packages, see the
458
+ [Viewing source coverage information in Meticulous guide](${ENABLE_SOURCE_COVERAGE_URL}).
459
+
460
+ {% callout_card variant="warning" title="Cloud Replay only" %}
461
+ If you use cloud replay against a public preview URL (Vercel, Netlify, etc.), enabling
462
+ source maps will expose them on that public URL. If you would like coverage in this case,
463
+ email [${METICULOUS_SUPPORT_EMAIL}](mailto:${METICULOUS_SUPPORT_EMAIL}) — we can help you scope
464
+ source-map publishing to the default branch or switch to \`upload-assets\` /
465
+ \`upload-container\` where they stay internal.
466
+ {% /callout_card %}
467
+
468
+ {% /expand %}
469
+
470
+ ### GitHub Action Configuration Reference
471
+
472
+ All available inputs are documented in the action definition files:
473
+ - [\`upload-assets\`](https://github.com/alwaysmeticulous/report-diffs-action/blob/main/upload-assets/action.yaml) - Upload static assets for testing (recommended for static sites)
474
+ - [\`upload-container\`](https://github.com/alwaysmeticulous/report-diffs-action/blob/main/upload-container/action.yml) - Upload a container image for testing
475
+ - [\`report-diffs-action\`](https://github.com/alwaysmeticulous/report-diffs-action/blob/main/action.yml) - Run tests in GitHub Actions runner (legacy)
476
+
477
+ ## 4. Validate that your workflow is working correctly
478
+
479
+ Create a new pull request to add the above workflow. Then validate that Meticulous is able to access your application
480
+ correctly and is successfully simulating sessions by viewing the test run for your PR in the Meticulous UI.
481
+
482
+ {% callout_card variant="info" title="PR comments are off by default" %}
483
+ Comments on PRs are disabled by default for new projects (this is an admin-only setting). You'll be able to see all test runs in the Meticulous UI under your project's "Test runs" tab. If you'd like to enable PR comments for your project, contact us at [${METICULOUS_SUPPORT_EMAIL}](mailto:${METICULOUS_SUPPORT_EMAIL}).
484
+ {% /callout_card %}
485
+
486
+ ## 5. Merge the PR to add your new GitHub workflow, and open a new PR to test Meticulous
487
+
488
+ Merge the PR to add the above workflow. You won&apos;t see any results on the PR that adds the workflow because you need to wait for the workflow to run on your main branch for it to detect any diffs.
489
+
490
+ Once the PR has merged and Meticulous has run on your base branch you can open a new PR to test Meticulous. The test run will be visible in the Meticulous UI under your project's "Test runs" tab, where you can review any visual diffs before merging your PR.
491
+
492
+ If PR comments are enabled for your project, Meticulous will also post a comment on the PR if it changed any of the screens or logic for the workflows you've recorded sessions for:
493
+
494
+ ![Meticulous comment](https://assets.meticulous.ai/docs/github-actions-v2-006.png)
495
+
496
+ ## 6. (Optional) Require approving diffs before merging a PR
497
+
498
+ If you've installed the [Meticulous GitHub App](https://github.com/apps/alwaysmeticulous) Meticulous will add a check on your PR that is red
499
+ if there are diffs that haven't been approved yet and becomes green once you click the green 'Approve all Visual Differences' button.
500
+ This button can be found on the test run page in the Meticulous UI (or by clicking the link in the Meticulous PR comment, if comments are enabled).
501
+
502
+ If you wish, you can make this check blocking by following the instructions [here](${MAKE_CHECK_BLOCKING_URL}). Doing so will prevent developers
503
+ from merging a PR which has visual differences until they have clicked the button to acknowledge the differences.
504
+
505
+ {% /tab %}
506
+ {% tab label="GitLab" %}
507
+
508
+ If you are able to build your app such that it can be served as a folder of static assets (HTML/JS/CSS) without any server-side rendering or complex request rewriting,
509
+ then you can use our \`ci upload-assets\` CLI command to upload your built assets for us to test.
510
+
511
+ ## 1. Link GitLab to Meticulous
512
+
513
+ ${linkGitLabInstructions}
514
+
515
+ ## 2. Add your Meticulous API token as a CI/CD variable
516
+
517
+ Select the project below that contains the sessions you wish to simulate, copy and paste the API token, and add it to your GitLab project
518
+ as a CI/CD variable named \`METICULOUS_API_TOKEN\`:
519
+
520
+ {% code_with_project_selector %}
521
+ METICULOUS_API_TOKEN:
522
+ {% standalone_api_token /%}
523
+ {% /code_with_project_selector %}
524
+
525
+ *Be very careful with this API token, since it allows the holder access to your recorded sessions.*
526
+
527
+ ## 3. Add a GitLab CI/CD pipeline to run your tests
528
+
529
+ To run Meticulous on CI, add a new \`.gitlab-ci.yml\` file to your repository. The pipeline needs to run on both pushes to your main branch and on merge requests.
530
+
531
+ This pipeline should use our \`ci upload-assets\` CLI command to upload your built assets for us to test.
532
+ ${meticulousBuildEnvNote}
533
+ File name: \`.gitlab-ci.yml\`
534
+
535
+ File contents:
536
+
537
+ \`\`\`yaml
538
+ stages:
539
+ - build
540
+ - test
541
+
542
+ variables:
543
+ NODE_VERSION: "24"
544
+
545
+ build:
546
+ stage: build
547
+ image: node:24-alpine
548
+ # METICULOUS_BUILD marks this as a build for Meticulous testing (see note above).
549
+ variables:
550
+ METICULOUS_BUILD: "true"
551
+ script:
552
+ - pnpm install --frozen-lockfile
553
+ - pnpm build
554
+ artifacts:
555
+ paths:
556
+ - dist/
557
+ expire_in: 1 hour
558
+ only:
559
+ - main
560
+ - merge_requests
561
+
562
+ test:
563
+ stage: test
564
+ image: node:24-alpine
565
+ dependencies:
566
+ - build
567
+ script:
568
+ - >
569
+ npx @alwaysmeticulous/cli ci upload-assets
570
+ --apiToken="$METICULOUS_API_TOKEN"
571
+ --appDirectory="dist"
572
+ --commitSha="$CI_COMMIT_SHA"
573
+ --waitForBase
574
+ only:
575
+ - main
576
+ - merge_requests
577
+ \`\`\`
578
+
579
+ **Important:** Make sure to update the \`appDirectory\` path to match your app's build output directory. For example, if you're using Vite, this is typically "dist".
580
+
581
+ {% expand title="Naming jobs and variables in a monorepo (recommended)" %}
582
+
583
+ If your repository only ever ships one frontend, the generic names from the example
584
+ above (\`meticulous:\` job, \`METICULOUS_API_TOKEN\` variable) are fine and you can skip
585
+ this section.
586
+
587
+ If your repository is a monorepo with more than one frontend, **or might host another
588
+ Meticulous-tested frontend later**, per-app naming from the start makes future expansion
589
+ painless: a second project can be added side-by-side without renaming the existing job
590
+ or CI/CD variable. The convention costs nothing on day one and keeps later additions
591
+ contained to a new job (or a new included pipeline file).
592
+
593
+ Two pieces of identity drive everything:
594
+
595
+ - **\`<app-kebab>\`** — lowercase hyphenated, usually the last path segment of the
596
+ app you're onboarding (e.g. an app at \`apps/dashboard\` becomes \`dashboard\`). Used
597
+ in the job key and the optional included file name.
598
+ - **\`<APP_SLUG>\`** — the same identity as \`SCREAMING_SNAKE_CASE\` (e.g. \`dashboard\`
599
+ becomes \`DASHBOARD\`, \`marketing-site\` becomes \`MARKETING_SITE\`). Used in the GitLab
600
+ CI/CD variable name and every YAML reference to it. A second Meticulous project on
601
+ the same monorepo later picks a different \`<APP_SLUG>\`, so the two never collide.
602
+
603
+ The convention we recommend:
604
+
605
+ | | Recommended | Avoid |
606
+ | --- | --- | --- |
607
+ | Job key in \`.gitlab-ci.yml\` (or included pipeline file) | \`meticulous-<app-kebab>:\` | bare \`meticulous:\` |
608
+ | GitLab CI/CD variable | \`METICULOUS_API_TOKEN_<APP_SLUG>\` | bare \`METICULOUS_API_TOKEN\` |
609
+ | YAML reference to the API token | \`$METICULOUS_API_TOKEN_<APP_SLUG>\` | bare \`$METICULOUS_API_TOKEN\` |
610
+ | Optional included pipeline file | \`.gitlab/ci/meticulous-<app-kebab>.yml\` (then \`include:\` it from \`.gitlab-ci.yml\`) | a second bare \`meticulous\` block in \`.gitlab-ci.yml\` |
611
+
612
+ We also recommend scoping the job to the selected app's path (and the shared UI
613
+ libraries it imports) using \`rules: changes:\`, so the Meticulous job only runs on
614
+ commits that actually touch the relevant code. If your existing pipeline uses
615
+ \`only:\` instead of \`rules:\`, mirror that style with \`only: changes:\`.
616
+
617
+ Pulling those together for an app at \`apps/dashboard\` (so \`<app-kebab>\` is
618
+ \`dashboard\` and \`<APP_SLUG>\` is \`DASHBOARD\`):
619
+
620
+ \`\`\`yaml
621
+ meticulous-dashboard:
622
+ stage: test
623
+ image: node:24-alpine
624
+ variables:
625
+ METICULOUS_BUILD: "true"
626
+ rules:
627
+ - if: $CI_PIPELINE_SOURCE == "merge_request_event"
628
+ changes:
629
+ - "apps/dashboard/**/*"
630
+ # any UI libraries the app imports:
631
+ - "packages/ui/**/*"
632
+ - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
633
+ changes:
634
+ - "apps/dashboard/**/*"
635
+ - "packages/ui/**/*"
636
+ script:
637
+ - pnpm install --frozen-lockfile
638
+ - pnpm --filter dashboard build
639
+ - >
640
+ npx @alwaysmeticulous/cli ci upload-assets
641
+ --apiToken="$METICULOUS_API_TOKEN_DASHBOARD"
642
+ --appDirectory="apps/dashboard/dist"
643
+ --commitSha="$CI_COMMIT_SHA"
644
+ --waitForBase
645
+ \`\`\`
646
+
647
+ When a second app on the same monorepo is later onboarded to Meticulous, copy this
648
+ block and substitute the second app's \`<app-kebab>\` and \`<APP_SLUG>\` — the existing
649
+ job stays untouched.
650
+
651
+ If you'd rather expose the suffixed variable under the bare \`METICULOUS_API_TOKEN\`
652
+ name inside the job (for example because the build script reads
653
+ \`process.env.METICULOUS_API_TOKEN\` directly), add a job-scoped \`variables:\` mapping:
654
+
655
+ \`\`\`yaml
656
+ meticulous-<app-kebab>:
657
+ # ...
658
+ variables:
659
+ METICULOUS_API_TOKEN: $METICULOUS_API_TOKEN_<APP_SLUG>
660
+ \`\`\`
661
+
662
+ The CI/CD variable name and every direct YAML reference still use the suffixed form;
663
+ only the in-job environment variable is re-exposed under the generic name.
664
+
665
+ {% /expand %}
666
+
667
+ {% expand title="Choosing the image and tags (optional)" %}
668
+
669
+ \`image:\` controls the Docker image used for the job (Node version, OS). The example
670
+ above uses \`node:24-alpine\`; if your existing pipeline uses a different Node version,
671
+ or a non-Alpine image (e.g. \`node:24\` for native build tooling that needs glibc),
672
+ use the same image for the Meticulous job. If your pipeline references a project-level
673
+ \`NODE_VERSION\` variable (e.g. \`image: node:\${NODE_VERSION}-alpine\`), reuse that variable
674
+ rather than hard-coding the version.
675
+
676
+ \`tags:\` controls which registered runner picks up the job, and you usually do not need
677
+ to set it. Most projects rely on a default runner configured at the project or group
678
+ level, and adding tags can route the job to a runner that doesn't exist. If your
679
+ existing pipeline already sets \`tags:\` on build-heavy jobs (literal strings — not
680
+ \`$VAR\` or \`!reference\` indirection), copy the same list onto the Meticulous job.
681
+
682
+ If you're on GitLab.com SaaS shared runners and the default \`saas-linux-small-amd64\`
683
+ turns out to be too slow for Meticulous's build + replay, you can opt into a larger
684
+ runner by adding \`tags: [saas-linux-large-amd64]\` (or similar). This is optional and
685
+ only applies to GitLab.com SaaS — self-managed instances configure runner sizes
686
+ differently.
687
+
688
+ {% /expand %}
689
+
690
+ {% expand title="Enable source maps (recommended)" %}
691
+
692
+ Meticulous uses source maps to attribute coverage to the original files in your repository
693
+ so you can see which parts of your code are exercised by the tested sessions. The cleanest
694
+ way to enable them is **inside this Meticulous pipeline only**, via a CLI flag or
695
+ environment variable on the build command — your committed build config stays untouched,
696
+ and your other pipelines (MR builds, production deploys) keep their existing behaviour.
697
+
698
+ Pick the snippet for your framework and apply it to the \`build\` job of the example
699
+ pipeline above:
700
+
701
+ **Vite** — pass \`--sourcemap\` to \`vite build\`:
702
+
703
+ \`\`\`yaml
704
+ build:
705
+ script:
706
+ - pnpm install --frozen-lockfile
707
+ - pnpm build -- --sourcemap
708
+ \`\`\`
709
+
710
+ **Create React App** — set \`GENERATE_SOURCEMAP=true\`:
711
+
712
+ \`\`\`yaml
713
+ build:
714
+ variables:
715
+ GENERATE_SOURCEMAP: "true"
716
+ script:
717
+ - pnpm install --frozen-lockfile
718
+ - pnpm build
719
+ \`\`\`
720
+
721
+ **Angular CLI** — pass \`--source-map\` to \`ng build\`:
722
+
723
+ \`\`\`yaml
724
+ build:
725
+ script:
726
+ - pnpm install --frozen-lockfile
727
+ - pnpm exec ng build --source-map
728
+ \`\`\`
729
+
730
+ **webpack (custom config)** — set \`SOURCEMAP=true\` in CI and read it from
731
+ \`webpack.config.js\`:
732
+
733
+ \`\`\`yaml
734
+ build:
735
+ variables:
736
+ SOURCEMAP: "true"
737
+ script:
738
+ - pnpm install --frozen-lockfile
739
+ - pnpm build
740
+ \`\`\`
741
+
742
+ \`\`\`js
743
+ // webpack.config.js
744
+ module.exports = (env, argv) => ({
745
+ // ...
746
+ devtool: process.env.SOURCEMAP === "true" ? "source-map" : argv.devtool,
747
+ });
748
+ \`\`\`
749
+
750
+ **Next.js** and **Vue CLI** don't accept a build-time flag for this; they require a
751
+ one-line config change:
752
+
753
+ - Next.js — add \`productionBrowserSourceMaps: true\` to \`next.config.js\` (covers App
754
+ Router and Pages Router).
755
+ - Vue CLI — add \`productionSourceMap: true\` to \`vue.config.js\`.
756
+
757
+ These settings are safe to leave on permanently; they don't change runtime behaviour.
758
+
759
+ Source maps must be served alongside the built assets — either as \`.map\` files in the
760
+ same directory, via \`sourceMappingURL\` comments in the bundles, or via the \`SourceMap\`
761
+ HTTP header. The \`ci upload-assets\` and \`ci upload-container\` commands pick them up
762
+ automatically when they sit next to the bundles in your build output.
763
+
764
+ For monorepo source maps that span multiple packages, see the
765
+ [Viewing source coverage information in Meticulous guide](${ENABLE_SOURCE_COVERAGE_URL}).
766
+
767
+ {% /expand %}
768
+
769
+ ## 4. Merge the MR to add your new GitLab CI/CD pipeline, and open a new MR to test Meticulous
770
+
771
+ Merge the MR to add the above pipeline configuration. You won't see any results on the MR that adds the pipeline because you need to wait for the pipeline to run on your main branch for it to detect any diffs.
772
+
773
+ Once the MR has merged and Meticulous has run on your base branch you can open a new MR to test Meticulous.
774
+ Comments are typically disabled when you first create a project in Meticulous, but you'll be able to see the test results within the Meticulous UI.
775
+
776
+ {% /tab %}
777
+ {% tab label="BitBucket" %}
778
+
779
+ If you are able to build your app such that it can be served as a folder of static assets (HTML/JS/CSS) without any server-side rendering or complex request rewriting,
780
+ then you can use our \`ci upload-assets\` CLI command to upload your built assets for us to test.
781
+
782
+ ## 1. Link Bitbucket to Meticulous
783
+
784
+ ${linkBitbucketInstructions}
785
+
786
+ ## 2. Add your Meticulous API token as a repository variable
787
+
788
+ Select the project below that contains the sessions you wish to simulate, copy and paste the API token, and add it to your Bitbucket repository
789
+ as a secured repository variable named \`METICULOUS_API_TOKEN\`:
790
+
791
+ {% code_with_project_selector %}
792
+ METICULOUS_API_TOKEN:
793
+ {% standalone_api_token /%}
794
+ {% /code_with_project_selector %}
795
+
796
+ *Be very careful with this API token, since it allows the holder access to your recorded sessions.*
797
+
798
+ ## 3. Add a Bitbucket Pipelines configuration to run your tests
799
+
800
+ To run Meticulous on CI, add a \`bitbucket-pipelines.yml\` file to your repository. The pipeline needs to run on both pushes to your main branch and on pull requests.
801
+
802
+ This pipeline should use our \`ci upload-assets\` CLI command to upload your built assets for us to test.
803
+ ${meticulousBuildEnvNote}
804
+ On pull request builds, Bitbucket merges the destination branch into the source branch during **Build Setup** before your steps run. Meticulous does **not** support testing that ephemeral merge commit. **Checkout the PR source tip** before building so uploads use a commit Bitbucket exposes via the API and the backend can compare against the **merge-base** with the destination branch.
805
+
806
+ Add this step at the start of your pull-request pipeline script:
807
+
808
+ \`\`\`bash
809
+ git reset --hard "$BITBUCKET_COMMIT"
810
+ \`\`\`
811
+
812
+ The Meticulous CLI uploads \`git rev-parse HEAD\` (the source tip after the reset above). You do **not** need to pass \`--commitSha\` or \`--baseSha\` manually on PR pipelines.
813
+
814
+ File name: \`bitbucket-pipelines.yml\`
815
+
816
+ File contents:
817
+
818
+ \`\`\`yaml
819
+ image: node:24
820
+
821
+ pipelines:
822
+ branches:
823
+ main:
824
+ - step:
825
+ name: Build and test
826
+ caches:
827
+ - node
828
+ script:
829
+ - npm ci
830
+ # METICULOUS_BUILD marks this as a build for Meticulous testing (see note above).
831
+ - METICULOUS_BUILD=true npm run build
832
+ - >
833
+ npx @alwaysmeticulous/cli ci upload-assets
834
+ --apiToken="$METICULOUS_API_TOKEN"
835
+ --appDirectory="dist"
836
+ --waitForBase
837
+ pull-requests:
838
+ "**":
839
+ - step:
840
+ name: Build and test
841
+ caches:
842
+ - node
843
+ script:
844
+ - git reset --hard "$BITBUCKET_COMMIT"
845
+ - npm ci
846
+ # METICULOUS_BUILD marks this as a build for Meticulous testing (see note above).
847
+ - METICULOUS_BUILD=true npm run build
848
+ - >
849
+ npx @alwaysmeticulous/cli ci upload-assets
850
+ --apiToken="$METICULOUS_API_TOKEN"
851
+ --appDirectory="dist"
852
+ --waitForBase
853
+ \`\`\`
854
+
855
+ **Important:** Make sure to update the \`appDirectory\` path to match your app's build output directory. For example, if you're using Vite, this is typically "dist".
856
+
857
+ {% /tab %}
858
+ {% /tabs %}
859
+ `;