{"_id":"@adamhancock/portx","name":"@adamhancock/portx","dist-tags":{"latest":"2.2.1"},"versions":{"2.2.1":{"name":"@adamhancock/portx","version":"2.2.1","description":"Port testing CLI tool - TypeScript version","main":"dist/index.js","bin":{"portx":"dist/index.js"},"keywords":["port","testing","cli","network","connectivity"],"author":{"name":"Adam Hancock"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/adamhancock/cli.git","directory":"packages/portx"},"dependencies":{"axios":"^1.7.7","chalk":"^4.1.2","commander":"^12.1.0","handlebars":"^4.7.8","is-ip":"^5.0.1","is-port-reachable":"^4.0.0"},"devDependencies":{"@types/node":"^24.1.0","tsx":"^4.20.3","typescript":"^5.9.2"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc","dev":"tsx src/index.ts"},"_id":"@adamhancock/portx@2.2.1","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/adamhancock/cli/issues"},"homepage":"https://github.com/adamhancock/cli#readme","_integrity":"sha512-jK32hagxy/mbzSfaDC07kRp+uMg1iVXMrMuNrbICMMOILktXKFnc5xvl1OtjTD6q/QCqVNFTtCGWlgN6qFvdIg==","_resolved":"/tmp/9746bcb86fc429d24a9c56408bc2dee3/adamhancock-portx-2.2.1.tgz","_from":"file:adamhancock-portx-2.2.1.tgz","_nodeVersion":"22.17.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-jK32hagxy/mbzSfaDC07kRp+uMg1iVXMrMuNrbICMMOILktXKFnc5xvl1OtjTD6q/QCqVNFTtCGWlgN6qFvdIg==","shasum":"69b8b081f4884d49fc60a0dd7a87f033351b2957","tarball":"https://registry.npmjs.org/@adamhancock/portx/-/portx-2.2.1.tgz","fileCount":40,"unpackedSize":26205,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICRbpx6heMz0wSWzie0uBw6f17H4dhmmqzKW6JFSQr7RAiABmcKaIYxg38kepOBrRrxqkJVp4jcsJ1rmjqgCdLuSiQ=="}]},"_npmUser":{"name":"adam1571","email":"adammhancock@gmail.com"},"directories":{},"maintainers":[{"name":"adam1571","email":"adammhancock@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/portx_2.2.1_1754304039788_0.7784057042971666"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-04T10:40:39.619Z","2.2.1":"2025-08-04T10:40:39.959Z","modified":"2025-08-04T10:40:40.338Z"},"maintainers":[{"name":"adam1571","email":"adammhancock@gmail.com"}],"description":"Port testing CLI tool - TypeScript version","homepage":"https://github.com/adamhancock/cli#readme","keywords":["port","testing","cli","network","connectivity"],"repository":{"type":"git","url":"git+https://github.com/adamhancock/cli.git","directory":"packages/portx"},"author":{"name":"Adam Hancock"},"bugs":{"url":"https://github.com/adamhancock/cli/issues"},"license":"ISC","readme":"# PortX - TypeScript Edition\n\nA modern TypeScript port testing CLI tool for checking network connectivity and HTTP status.\n\n## Installation\n\n```bash\nnpm install -g @adamhancock/portx\n```\n\n## Usage\n\n### Test a single host\n```bash\nportx -h google.com:443\n```\n\n### Test with HTTP status check\n```bash\nportx -h google.com:443 -s\nportx -h google.com:443 -s https\n```\n\n### Test from a file\n```bash\nportx -f hosts.json\n```\n\n### Test with environment templating\n```bash\nportx -f template-hosts.json -e dev,staging,prod\n```\n\n## Configuration Files\n\n### Simple hosts file (`hosts.json`)\n```json\n[\n  {\n    \"name\": \"Google\",\n    \"host\": \"google.com\",\n    \"port\": 443\n  },\n  {\n    \"name\": \"GitHub\", \n    \"host\": \"github.com\",\n    \"port\": 443\n  }\n]\n```\n\n### Template hosts file with environment variables\n```json\n[\n  {\n    \"name\": \"API Server\",\n    \"host\": \"{{env}}.api.example.com\",\n    \"port\": 443\n  }\n]\n```\n\n## Options\n\n- `-h, --host <string>`: Test a single host in format `host:port`\n- `-f, --file <string>`: Load hosts from a JSON file\n- `-e, --env <string>`: Environment templating (comma-separated environments)\n- `-s, --status [type]`: Check HTTP status code (optional: specify 'http' or 'https')\n- `-v, --version`: Show version number\n\n## Features\n\n- ✅ Port connectivity testing\n- ✅ DNS resolution\n- ✅ HTTP/HTTPS status checking\n- ✅ Environment templating with Handlebars\n- ✅ Colorized output\n- ✅ TypeScript with full type safety\n- ✅ Modern async/await patterns\n\n## Examples\n\nCheck if services are accessible:\n```bash\nportx -h api.example.com:443 -s https\n```\n\nTest multiple environments:\n```bash\nportx -f hosts.json -e dev,staging,prod\n```\n\n## License\n\nISC","readmeFilename":"README.md","_rev":"1-f58b3594f63c0a4dd57554aeca6147d1"}