@aegisrunner/next
v0.2.1
Published
Next.js config wrapper that attaches AegisRunner to your dev server — scan your localhost app with AI, no deploy.
Maintainers
Readme
@aegisrunner/next
Attach AegisRunner to your Next.js dev server. Wrap your next.config, run next dev, and an AI scan of your localhost app is one keypress away — no deploy, no staging URL, no second terminal.
Next has no clean "server listening" plugin hook, so this wraps your config: in the dev phase it opens a secure outbound-only tunnel to your dev port and — on a or on startup — crawls your running app, generates tests, and streams progress into your terminal.
Install
npm install -D @aegisrunner/next// next.config.mjs
import withAegisRunner from '@aegisrunner/next'
/** @type {import('next').NextConfig} */
const nextConfig = { /* your config */ }
export default withAegisRunner(nextConfig, {
scanOn: 'manual', // 'manual' (press a) | 'startup' (scan on boot)
})export AEGIS_TOKEN=aegis_xxxxxxxx # a project CI trigger token (Pro/Business)
npm run dev ▲ Next.js — Local: http://localhost:3000
◆ aegis tunnel open → https://ab12cd.tunnel.aegisrunner.com
◆ aegis press [a] + Enter to scan your local appOptions
| Option | Default | Description |
|--------|---------|-------------|
| token | process.env.AEGIS_TOKEN | CI trigger token (Pro/Business). |
| scanOn | 'manual' | 'manual' — press a. 'startup' — scan once when the tunnel opens. |
| port | -p / PORT / 3000 | Dev-server port. Set it explicitly if you run on a non-standard port and don't pass -p. |
| host | '127.0.0.1' | Local host the tunnel forwards to. |
| label | package name | Shown in every log line as ◆ aegis·<label> — disambiguates tunnels when several dev servers run at once (monorepos). |
| api | public API | process.env.AEGIS_API override. |
The wrapper is a pure pass-through in every phase except dev — it never runs in next build or production. The tunnel, scan trigger and live-progress stream are reused from @aegisrunner/cli. Prefer no config change? aegis dev -- next dev is identical.
Docs
MIT © AegisRunner
