| 24 | const READY_INTERVAL_MS = 500; |
| 25 | |
| 26 | function printUsage() { |
| 27 | console.log(`Usage: node scripts/start-obsidian-e2e-instance.mjs [options] |
| 28 | |
| 29 | Options: |
| 30 | --vault <name> Vault/profile name. Defaults to quickadd-<worktree>. |
| 31 | --root <path> Directory that contains provisioned vaults. Defaults to .obsidian-e2e-vaults. |
| 32 | --worktree <path> QuickAdd worktree to link plugin files from. Defaults to cwd. |
| 33 | --data <path> Optional QuickAdd data.json seed to copy on first provision. |
| 34 | --profile-root <path> Directory for per-vault Obsidian HOME profiles. Defaults to /tmp/quickadd-obsidian-e2e. |
| 35 | --obsidian-app <name> Obsidian app name for macOS open. Defaults to Obsidian. |
| 36 | --obsidian-bin <path> Obsidian CLI executable. Defaults to obsidian. |
| 37 | --force Recreate plugin symlinks if they already exist. |
| 38 | --no-launch Prepare the profile and vault without launching Obsidian. |
| 39 | --print-env Print exports for running e2e tests against this instance. |
| 40 | --json Print a machine-readable summary. |
| 41 | --help Show this help. |
| 42 | `); |
| 43 | } |
| 44 | |
| 45 | export function parseArgs(argv) { |
| 46 | const options = { |