Package Exports
- @peektree/next-plugin
Readme
@peektree/next-plugin
Next.js plugin for Peek — hot-swap branches without restarting your dev server.
Install
npm install -D @peektree/cli @peektree/next-pluginSetup
// next.config.ts
import withPeek from '@peektree/next-plugin'
export default withPeek()({
// your next config
})Options
withPeek({
port: 24789, // WebSocket port (default: 24789)
banner: true, // Show status overlay (default: true)
debug: false // Log switch events (default: false)
})({
// your next config
})How It Works
- Plugin wraps Next.js middleware and webpack config
- WebSocket server listens for switch commands
- When you run
peek sw feature-auth, the plugin triggers a full reload - Status banner updates to show current branch
Browser Overlay
When active, Peek shows a status bar in your app:
- Back: Return to main
- Copy Scope: Grab context for AI
- Status: HMR errors, switch confirmations
Links
License
MIT