{"_id":"@anthonyfree96/zap","_rev":"3-21764b43c0e2c81bb07a2d188e7463d5","name":"@anthonyfree96/zap","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@anthonyfree96/zap","version":"0.1.0","keywords":[],"author":{"name":"Anthony Scott"},"license":"ISC","_id":"@anthonyfree96/zap@0.1.0","maintainers":[{"name":"anthonyfree96","email":"anthonyfree96@gmail.com"}],"bin":{"zap":"dist/index.js"},"dist":{"shasum":"97dcde8d47c92d78cf8d3e7bf77e36fc6995a53c","tarball":"https://registry.npmjs.org/@anthonyfree96/zap/-/zap-0.1.0.tgz","fileCount":20,"integrity":"sha512-im2cS1Vokuhd7B092a6Ll2jbgeNW7ILajmead3joJTL8rjCPUEHcgFAFsH0tEfoTGI16ByTNvbUbDRIvBkOaSA==","signatures":[{"sig":"MEYCIQCQxw+MW+oMWrxg4i9Pjio+71S+bxITFECe55OMBuZ6dAIhAO9plTPJARiWtgPnz5qLtB/3GlKIrTl/n9bIU4hxYbsB","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14923},"main":"index.js","type":"module","gitHead":"f6810897599b535cbc6db7ea294acde27a5316ee","scripts":{"dev":"tsx src/index.ts","build":"npm run clean && tsc","clean":"rimraf dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"anthonyfree96","email":"anthonyfree96@gmail.com"},"_npmVersion":"11.6.4","description":"A developer port and process manager","directories":{},"_nodeVersion":"25.2.1","dependencies":{"ora":"^9.4.1","chalk":"^5.6.2","execa":"^9.6.1","commander":"^15.0.0","systeminformation":"^5.31.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.22.4","rimraf":"^6.1.3","typescript":"^6.0.3","@types/node":"^26.0.1"},"_npmOperationalInternal":{"tmp":"tmp/zap_0.1.0_1782742665770_0.7262170730691766","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@anthonyfree96/zap","version":"0.1.1","keywords":[],"author":{"name":"Anthony Scott"},"license":"ISC","_id":"@anthonyfree96/zap@0.1.1","maintainers":[{"name":"anthonyfree96","email":"anthonyfree96@gmail.com"}],"homepage":"https://github.com/AndyFree96/zap","bugs":{"url":"https://github.com/AndyFree96/zap/issues"},"bin":{"zap":"dist/index.js"},"dist":{"shasum":"35a1fe555f9c8b3c3bd2008df1c03620ec25aa9c","tarball":"https://registry.npmjs.org/@anthonyfree96/zap/-/zap-0.1.1.tgz","fileCount":20,"integrity":"sha512-3W8iJYaH/UILMm8+NTnFpInrIcERlOAa+8+Vxl57hA23bpAmmncu/QPSsU/M0NZzqnq4se8BrUPzL0OZMJpXNA==","signatures":[{"sig":"MEUCIChjob7qtlnYIGby1Z3xF29uLvLNYX+GbcsGXl0k18MbAiEAo5Ht/DuIywg6DqUWYY1rvHnGIea2umhSx4xkgdv0tGM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15008},"main":"index.js","type":"module","gitHead":"f6810897599b535cbc6db7ea294acde27a5316ee","scripts":{"dev":"tsx src/index.ts","build":"npm run clean && tsc","clean":"rimraf dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"anthonyfree96","email":"anthonyfree96@gmail.com"},"repository":{"url":"git+https://github.com/AndyFree96/zap.git","type":"git"},"_npmVersion":"11.6.4","description":"A developer port and process manager","directories":{},"_nodeVersion":"25.2.1","dependencies":{"ora":"^9.4.1","chalk":"^5.6.2","execa":"^9.6.1","commander":"^15.0.0","systeminformation":"^5.31.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.22.4","rimraf":"^6.1.3","typescript":"^6.0.3","@types/node":"^26.0.1"},"_npmOperationalInternal":{"tmp":"tmp/zap_0.1.1_1782743369697_0.6297092156545911","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@anthonyfree96/zap","version":"0.1.2","description":"A developer port and process manager","type":"module","main":"dist/index.js","types":"dist/index.d.ts","bin":{"zap":"dist/index.js"},"engines":{"node":">=22.12.0"},"scripts":{"dev":"tsx src/index.ts","build":"npm run clean && tsc","clean":"rimraf dist","lint":"eslint .","format":"prettier --write .","format:check":"prettier --check .","test":"node --import tsx --test test/core.test.ts","prepublishOnly":"npm run build"},"keywords":["port","process","kill","network","cli","lsof","devtools"],"repository":{"type":"git","url":"git+https://github.com/AndyFree96/zap.git"},"homepage":"https://github.com/AndyFree96/zap","author":{"name":"Anthony Scott"},"license":"ISC","publishConfig":{"access":"public"},"dependencies":{"chalk":"^5.6.2","commander":"^15.0.0","execa":"^9.6.1","systeminformation":"^5.31.11"},"devDependencies":{"@eslint/js":"^9.0.0","@types/node":"^26.0.1","eslint":"^9.0.0","prettier":"^3.0.0","rimraf":"^6.1.3","tsx":"^4.22.4","typescript":"^6.0.3","typescript-eslint":"^8.0.0"},"gitHead":"55a09d0ea9aa93a8665b97495899306e6b3d459a","_id":"@anthonyfree96/zap@0.1.2","bugs":{"url":"https://github.com/AndyFree96/zap/issues"},"_nodeVersion":"25.2.1","_npmVersion":"11.6.4","dist":{"integrity":"sha512-Ll1gssHZ6EJp8MbemF2Dt7vUnRQrRNRIHQvxEPZxG1agkiptwS8+J8qol8Q44Kb57nNcR5NiwBfin4YjJTNMNA==","shasum":"e56b9a8b8ad4c8bf26693c9b770ae27c50b57330","tarball":"https://registry.npmjs.org/@anthonyfree96/zap/-/zap-0.1.2.tgz","fileCount":24,"unpackedSize":26432,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCr7M5TiZIHTXyusTRUpUd4TMvdQiSP4r6ZZPKM1N7HXwIgN2ocSc2fG8ZmSxjFFvdwv7tu+Gj65STk8+Wgh272VB4="}]},"_npmUser":{"name":"anthonyfree96","email":"anthonyfree96@gmail.com"},"directories":{},"maintainers":[{"name":"anthonyfree96","email":"anthonyfree96@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/zap_0.1.2_1787914060206_0.22784048795681056"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-29T14:17:45.630Z","modified":"2026-08-28T10:47:40.532Z","0.1.0":"2026-06-29T14:17:45.913Z","0.1.1":"2026-06-29T14:29:29.834Z","0.1.2":"2026-08-28T10:47:40.365Z"},"bugs":{"url":"https://github.com/AndyFree96/zap/issues"},"author":{"name":"Anthony Scott"},"license":"ISC","homepage":"https://github.com/AndyFree96/zap","keywords":["port","process","kill","network","cli","lsof","devtools"],"repository":{"type":"git","url":"git+https://github.com/AndyFree96/zap.git"},"description":"A developer port and process manager","maintainers":[{"name":"anthonyfree96","email":"anthonyfree96@gmail.com"}],"readme":"# ⚡ zap\n\n> A blazing-fast developer port and process manager for the command line.\n\n[![License](https://img.shields.io/badge/license-ISC-blue.svg)](LICENSE)\n[![Node.js](https://img.shields.io/badge/node-%3E%3D22-brightgreen.svg)](https://nodejs.org/)\n[![TypeScript](https://img.shields.io/badge/TypeScript-6.0-blue.svg)](https://www.typescriptlang.org/)\n\n**zap** is a cross-platform CLI tool that helps developers quickly find, list, kill, and monitor network ports and the processes behind them. No more guessing which process is hogging port 3000 — just zap it.\n\n## ✨ Features\n\n- 🔍 **Find** which process is using a specific port\n- 💀 **Kill** the process occupying a port with a single command\n- 📋 **List** all listening ports in a clean table\n- 👀 **Watch** ports in real-time to detect new or closed connections\n- 🖥️ **Cross-platform** — works on Windows, macOS, and Linux\n- 🎨 **Colorful output** with chalk for better readability\n- ⚡ **Fast** — built with modern ESM and TypeScript\n\n## 📦 Installation\n\n```bash\nnpm install -g @anthonyfree96/zap\n```\n\nOr run directly with npx:\n\n```bash\nnpx @anthonyfree96/zap <command>\n```\n\n## 🚀 Usage\n\n```\nUsage: zap [options] [command]\n\nzap developer port manager\n\nOptions:\n  -V, --version   output the version number\n  -h, --help      display help for command\n\nCommands:\n  find <port>     Find which process is using a port\n  kill [options] <port>  Kill the process using a port\n  list            List all listening ports\n  watch           Watch port changes in real-time\n  help [command]  display help for command\n```\n\n### 🔍 Find a process by port\n\nFind out what's running on a specific port:\n\n```bash\nzap find 3000\nzap find 8080\n```\n\n### 💀 Kill a process by port\n\nKill the process that's using a specific port:\n\n```bash\nzap kill 3000\nzap kill 8080\n```\n\nForce-kill by default; pass `--graceful` to terminate gracefully instead.\n\n### 📋 List all listening ports\n\nDisplay all currently listening ports in a table:\n\n```bash\nzap list\n```\n\nExample output:\n\n```\n┌───────┬────────┬──────────┐\n│ port  │ pid    │ protocol │\n├───────┼────────┼──────────┤\n│ 3000  │ 12345  │ tcp      │\n│ 5432  │ 67890  │ tcp      │\n│ 8080  │ 11111  │ tcp      │\n└───────┴────────┴──────────┘\n```\n\n### 👀 Watch port changes\n\nMonitor ports in real-time — see when new ports start listening or when existing ones close:\n\n```bash\nzap watch\n```\n\nNew connections appear with a green `+`, closed connections with a yellow `-`:\n\n```\nWatching ports...\n+ port=3000 pid=12345\n+ port=8080 pid=11111\n- port=3000\n```\n\n## 🛠️ Development\n\n### Prerequisites\n\n- [Node.js](https://nodejs.org/) >= 22.12.0\n- [npm](https://www.npmjs.com/) >= 9\n\n### Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/AndyFree96/zap.git\ncd zap\n\n# Install dependencies\nnpm install\n\n# Run in development mode\nnpm run dev -- <command>\n```\n\n### Available Scripts\n\n| Script           | Description                               |\n| ---------------- | ----------------------------------------- |\n| `npm run dev`    | Run with tsx (hot-reload for development) |\n| `npm run build`  | Clean and compile TypeScript              |\n| `npm run clean`  | Remove the `dist` directory               |\n| `npm run lint`   | Lint with ESLint                          |\n| `npm run format` | Format with Prettier                      |\n| `npm test`       | Run unit tests                            |\n\n### Build\n\n```bash\nnpm run build\n```\n\nThis compiles TypeScript from `src/` to JavaScript in `dist/`.\n\n## 🏗️ Project Structure\n\n```\nzap/\n├── src/\n│   ├── index.ts             # CLI entry point & command definitions\n│   ├── commands/\n│   │   └── list.ts          # List command implementation\n│   └── core/\n│       ├── port.ts           # Port lookup (find which process uses a port)\n│       ├── process.ts        # Process management (kill processes)\n│       ├── scanner.ts        # Network connection scanner\n│       └── watcher.ts        # Real-time port change watcher\n├── dist/                    # Compiled output (generated)\n├── package.json\n├── tsconfig.json\n└── README.md\n```\n\n## 🔧 Tech Stack\n\n- **[TypeScript](https://www.typescriptlang.org/)** — Type-safe JavaScript\n- **[Commander.js](https://github.com/tj/commander.js)** — CLI framework\n- **[execa](https://github.com/sindresorhus/execa)** — Process execution\n- **[chalk](https://github.com/chalk/chalk)** — Terminal string styling\n- **[systeminformation](https://github.com/sebhildebrandt/systeminformation)** — System and network info\n\n## 🌍 Platform Support\n\n| Feature      | Windows                           | macOS / Linux       |\n| ------------ | --------------------------------- | ------------------- |\n| Port lookup  | PowerShell `Get-NetTCPConnection` | `lsof`              |\n| Process kill | `taskkill`                        | `process.kill()`    |\n| Network scan | `systeminformation`               | `systeminformation` |\n\n## 📄 License\n\n[ISC](LICENSE) © Anthony Scott\n","readmeFilename":"README.md"}