open-index/open-npm huggingface dataset:
npm package: @peektree/banner
Description: UI banner component for peek
Latest version: 0.4.2

# @peektree/banner

Status overlay component for Peek — visual feedback during development.

## What It Does

Renders an unobtrusive status bar in your browser showing:

- Current worktree/branch name
- **Back** button to return to main
- **Copy Scope** button to grab context for AI
- HMR status and switch confirmations

## Install

Usually installed as a dependency of `@peektree/vite-plugin` or `@peektree/next-plugin`.

```bash
npm install @peektree/banner
```

## Usage

### Vanilla JS

```typescript
import { createBanner } from '@peektree/banner'
import '@peektree/banner/styles.css'

createBanner({
  branch: 'feature-auth',
  onBack: () => { /* switch to main */ },
  onCopyScope: () => { /* copy context */ }
})
```

### React

```tsx
import { PeekBanner } from '@peektree/banner/react'
import '@peektree/banner/styles.css'

function App() {
  return (
    <>
      <PeekBanner
        branch="feature-auth"
        onBack={() => { /* switch to main */ }}
        onCopyScope={() => { /* copy context */ }}
      />
      {/* your app */}
    </>
  )
}
```

## Why Separate?

The banner is a separate package to:

1. Allow Vite and Next plugins to share UI
2. Enable users to customize or eject
3. Support independent versioning

## License

MIT
npm package: @peektree/cli
Description: Any agent, any branch, one command - CLI for peek
Latest version: 0.4.2

# @peektree/cli

The command-line interface for Peek — instant branch switching without restarting your dev server.

## Install

```bash
npm install -D @peektree/cli
```

## Quick Start

```bash
peek s my-feature     # create session
# browser shows my-feature code

peek .                # back to main
peek -                # toggle (like cd -)

peek save             # merge to main
peek discard          # abandon
```

## Commands

| Command | Description |
|---------|-------------|
| `peek s <name>` | Start new session |
| `peek save` | Merge + cleanup |
| `peek discard` | Abandon session |
| `peek sw <target>` | Switch worktree |
| `peek .` | Back to main |
| `peek -` | Previous (toggle) |
| `peek ls` | List worktrees |
| `peek recover` | Restore discarded work |
| `peek doctor` | Diagnose + fix |

## Recovery

Changes are never lost. When you discard a session with uncommitted work:

```bash
peek discard -f auth-fix
# ⚠️ Changes stashed to .peek/stash/auth-fix.patch

peek recover
# Lists all recoverable stashes

peek recover --apply stash-xxx
# ✓ Restored 3 files, 127 lines
```

## Configuration

```bash
PEEK_PORT=3000
PEEK_WORKTREE_DIR=/tmp/peek
```

Or `~/.config/peek/config.json`:
```json
{ "port": 3000, "worktreeDir": "/tmp/peek" }
```

## Requires

- Git 2.20+
- Node 18+

## Links

- [Full command reference](https://github.com/ekarya0x/peek/blob/master/docs/cli/commands.md)
- [Workflows](https://github.com/ekarya0x/peek/blob/master/docs/cli/workflows.md)
- [Error codes](https://github.com/ekarya0x/peek/blob/master/docs/cli/errors.md)

## License

MIT
npm package: @peektree/middleware
Description: Core worktree switching logic for peek - any agent, any branch, one command
Latest version: 0.4.2

# @peektree/middleware

Core engine for Peek — worktree management, state, and HMR coordination.

## Install

```bash
npm install @peektree/middleware
```

## Usage

```typescript
import { PeekCore } from '@peektree/middleware'

const core = new PeekCore({ mainPath: process.cwd() })

// Create worktree
const info = core.create({ branch: 'feature-auth' })

// Switch active worktree
core.switch({ to: info.path })

// Get current state
const state = core.getState()
// { active: '/tmp/peek/feature-auth', main: '/project' }

// List worktrees
const worktrees = core.list()

// Listen to switches
core.on('switch', ({ from, to, info }) => {
  console.log(`Switched from ${from} to ${to}`)
})
```

## Features

- **Worktree lifecycle**: create, switch, remove
- **Dependency sharing**: symlink, hardlink, reflink, copy strategies
- **Lockfile divergence detection**: prevents corrupted node_modules
- **Stash management**: auto-stash on discard, recover later
- **Metrics collection**: session duration, save rates
- **Lock coordination**: prevents concurrent operations

## Configuration

Uses `.peekrc.json` and `.peekignore` from project root.

```json
// .peekrc.json
{
  "port": 3000,
  "worktreeDir": "/tmp/peek",
  "branchPrefix": "agent"
}
```

```
# .peekignore
node_modules symlink
.next skip
dist skip
```

## License

MIT
npm package: @peektree/next-plugin
Description: Next.js plugin for peek - live worktree switching
Latest version: 0.4.2

# @peektree/next-plugin

Next.js plugin for Peek — hot-swap branches without restarting your dev server.

## Install

```bash
npm install -D @peektree/cli @peektree/next-plugin
```

## Setup

```typescript
// next.config.ts
import withPeek from '@peektree/next-plugin'

export default withPeek()({
  // your next config
})
```

## Options

```typescript
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

1. Plugin wraps Next.js middleware and webpack config
2. WebSocket server listens for switch commands
3. When you run `peek sw feature-auth`, the plugin triggers a full reload
4. 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

- [CLI commands](https://github.com/ekarya0x/peek/blob/master/docs/cli/commands.md)
- [Workflows](https://github.com/ekarya0x/peek/blob/master/docs/cli/workflows.md)

## License

MIT
npm package: @peektree/vite-plugin
Description: Vite plugin for peek - any agent, any branch, one command
Latest version: 0.4.2

# @peektree/vite-plugin

Vite plugin for Peek — hot-swap branches without restarting your dev server.

## Install

```bash
npm install -D @peektree/cli @peektree/vite-plugin
```

## Setup

```typescript
// vite.config.ts
import { defineConfig } from 'vite'
import peek from '@peektree/vite-plugin'

export default defineConfig({
  plugins: [peek()]
})
```

## Options

```typescript
peek({
  port: 24789,   // WebSocket port (default: 24789)
  banner: true   // Show status overlay (default: true)
})
```

## How It Works

1. Plugin opens WebSocket on port 24789
2. When you run `peek sw feature-auth`, the dev server root changes
3. Browser receives HMR signal and hot-reloads
4. Status banner updates to show current branch

Switch takes ~87ms. No cold start. No stash.

## 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

- [CLI commands](https://github.com/ekarya0x/peek/blob/master/docs/cli/commands.md)
- [Workflows](https://github.com/ekarya0x/peek/blob/master/docs/cli/workflows.md)

## License

MIT
npm package: @peepoglad/commercetools-messages
Description: Mock of commercetools messages
Latest version: 2.1.0

# Commercetools Messages

This library mocks the Commercetools messages to ease testing of your typescript codebases.

## Supported resources
* order
* customer
* product
* category

## Installation
For npm:
* `npm i @peepoglad/commercetools-messages --save-dev`

For yarn:
* `yarn add @peepoglad/commercetools-messages --dev`

## Usage
To build payload, import the package into your file:

```typescript
import { ProductAddedToCategoryMessage } from '@commercetools/platform-sdk'
import { ProductAddedToCategory } from '@peepoglad/commercetools-messages'

const payload: ProductAddedToCategoryMessage = ProductAddedToCategory()
  .id('gigaId')
  .build()

...
```

## Contributing
1. Fork it!
2. Create your feature branch: `git checkout -b my-new-giga-feature`
3. Commit your changes: `git commit -am 'Add some giga feature'`
4. Push to the branch: `git push origin my-new-giga-feature`
5. Submit a pull request :D
npm package: @peepso/hooks
Description: WordPress-like filter and action hooks implementation.
Author: Rudy Susanto
Latest version: 1.0.3

# Hooks
WordPress-like filter and action hooks implementation.

## Installation
```bash
npm install @peepso/hooks --save
```

## Usage
```javascript
import Hooks from '@peepso/hooks';

// You can instantiate it manually like in the example below:
let hooks = new Hooks();
hooks.addAction( 'actionName', 'fnName', ( ...args ) => console.log( args ) );

// Or, you can extend it to another class:
class Person extends Hooks {
	constructor() {
		this.addAction( 'actionName', 'fnName', ( ...args ) => console.log( args ) );
	}
}
```

## Methods

### Filter methods
`addFilter( filterName, handlerName, handler, [priority=10] )`  
`removeFilters( filterName, [handlerName, [handler]] )`  
`applyFilters( filterName, ...args )`  

### Action methods
`addAction( actionName, handlerName, handler, [priority=10] )`  
`removeActions( actionName, [handlerName, [handler]] )`  
`doAction( actionName, ...args )`
npm package: @peepso/prettier-config
Description: Prettier shareable configuration for PeepSo projects.
Author: Rudy Susanto
Latest version: 1.1.0

# `@peepso/prettier-config`

Prettier shareable configuration for PeepSo projects.

## Installation

```bash
npm install --save-dev prettier @prettier/plugin-php @peepso/prettier-config
```

## Usage

**Edit `package.json`**:

```jsonc
{
  // ...
  "prettier": "@peepso/prettier-config"
}
```