🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@shaneholloman/pow

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shaneholloman/pow

A CLI tool to manage git main/master branches and cleanup

latest
Source
npmnpm
Version
0.2.1
Version published
Maintainers
1
Created
Source

pow

A fast CLI tool to manage git main/master branches and cleanup operations.

Features

  • Auto-detects and switches to main/master branch
  • Cleans up branches with deleted remotes
  • Handles dirty working directory gracefully
  • Auto-updates dependencies when lockfile changes
  • Supports yarn, pnpm, and npm
  • Built with Bun for fast builds

Installation

npm install -g @shaneholloman/pow

Or use directly with npx:

npx @shaneholloman/pow

Usage

Run pow in any git repository:

pow [branch-name]

Without arguments, pow will switch to main/master. With a branch name, it will switch to or create that branch.

What it does

  • Fetches latest changes from remote
  • Switches to your main branch (or specified branch)
  • Pulls latest changes with fast-forward merge
  • Cleans up branches with deleted remotes
  • Installs dependencies if lockfile changed

Package Manager Support

Auto-detects based on lockfiles:

  • yarn.lockyarn --immutable
  • pnpm-lock.yamlpnpm install --frozen-lockfile
  • package-lock.jsonnpm ci

Development

Setup

npm install

Run Locally

npm start                   # Run with tsx (no build needed)
tsx src/cli.ts              # Direct tsx command
tsx src/cli.ts feature-123  # Run with arguments

Build

npm run build

Uses Bun to bundle TypeScript source into a single executable.

Testing

npm test                    # Run all tests
npm run test:watch          # Watch mode
npm run test:ui             # Interactive UI
npm run test:coverage       # Coverage report
npm run test:typecheck      # Type checking only

Direct commands:

vitest run                  # Run tests
vitest                      # Watch mode
vitest --ui                 # UI mode
vitest run --coverage       # Coverage
tsc --noEmit                # Type check

Test suite includes:

  • 12 integration tests (end-to-end CLI testing)
  • 18 unit tests (isolated function testing)
  • 30 total tests

Requirements

  • Node.js 22.x.x or higher (for tests)
  • Bun (for building)

Architecture

Source Structure

src/
├── cli.ts                    # Commander.js entry point
├── types.ts                  # TypeScript interfaces
├── logger.ts                 # Logging utilities
├── handle-git.ts             # Git operations
└── install-dependencies.ts   # Package manager detection

Test Structure

tests/
├── unit/         # Unit tests for individual functions
├── integration/  # End-to-end CLI tests
└── fixtures/     # Test data

Technology Stack

  • TypeScript with ESNext/NodeNext
  • Bun for building
  • Vitest for testing
  • zx for shell operations
  • Commander.js for CLI
  • Chalk for terminal colors

License

MIT

Keywords

git

FAQs

Package last updated on 07 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts