Readable Next.js events
Readable build and runtime events for CLIs, preview shells, agents, and custom development tools.
Next dev → next-dev-bridge
listening
build:error
1 compiler issue
build:recovered
clean
runtime:error
mapped to source
Install
Connect to a running development server from Node or observe build and runtime state in the browser.
$
npm install next-dev-bridge
Agents Friendly
Let an agent watch a running app without opening the browser.
$ connect-next http://localhost:3000
>>> [WATCHING] localhost:3000
>>> [ERROR] count=1 change=shown
>>> [RECOVERED] warnings=0
Observe
Receive a compact event stream and decide how your interface should respond.
import { connect } from 'next-dev-bridge'
const connection = connect(
{ url: 'http://localhost:3000' },
(event, state) => {
console.log(event.type, state.phase)
}
)
process.once('SIGINT', () => connection.stop())
build:ready ok
build:error error
build:recovered ok
One clear interface
Keep framework transport details out of your development UI.
- Build state Ready, failed, updated, and recovered.
- Runtime errors Browser failures with mapped frames when available.
- Any surface Use it in a CLI, preview shell, agent, or custom UI.