garrytan/gstack · error · Error

Usage: network --export <path>

Error message

Usage: network --export <path>

What it means

Error "Usage: network --export <path>" thrown in garrytan/gstack.

Source

Thrown at browse/src/read-commands.ts:424

        }

        // Start capture
        if (isCaptureActive()) return 'Capture already active. Use --capture stop first.';
        const filterIdx = args.indexOf('--filter');
        const filterPattern = filterIdx >= 0 ? args[filterIdx + 1] : undefined;
        const info = startCapture(filterPattern);
        // Attach listener to current page
        const page = bm.getPage();
        const listener = getCaptureListener();
        if (listener) page.on('response', listener);
        return `Network capture started${info.filter ? ` (filter: ${info.filter})` : ''}. Use --capture stop to stop.`;
      }

      if (args[0] === '--export') {
        const { exportCapture } = await import('./network-capture');
        const { validateOutputPath: vop } = await import('./path-security');
        const exportPath = args[1];
        if (!exportPath) throw new Error('Usage: network --export <path>');
        vop(exportPath);
        const count = exportCapture(exportPath);
        return `Exported ${count} captured responses to ${exportPath}`;
      }

      if (args[0] === '--bodies') {
        const { getCaptureBuffer } = await import('./network-capture');
        return getCaptureBuffer().summary();
      }

      // Default: show request metadata
      if (networkBuffer.length === 0) return '(no network requests)';
      return networkBuffer.toArray().map(e =>
        `${e.method} ${e.url} → ${e.status || 'pending'} (${e.duration || '?'}ms, ${e.size || '?'}B)`
      ).join('\n');
    }

    case 'dialog': {

View on GitHub (pinned to 94993f7401)

When it happens

Trigger: Thrown at browse/src/read-commands.ts:424 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of garrytan/gstack@94993f7401 (2026-08-12). Data as JSON: /api/errors/657e4a0381b7e6ef. Report an issue: GitHub.