Skip to content

Contributing

Contributions are welcome! Whether it’s a bug fix, new provider, or documentation improvement.

Terminal window
git clone https://github.com/vineethkrishnan/ipwhoami.git
cd ipwhoami

No npm install needed — ipwhoami has zero dependencies.

Run the CLI directly:

Terminal window
node bin/ipwhoami.js --help
node bin/ipwhoami.js 8.8.8.8
node bin/ipwhoami.js -c 1.1.1.1

Check syntax:

Terminal window
node --check src/**/*.js bin/**/*.js
ipwhoami/
├── bin/ipwhoami.js # CLI entry point
├── src/ # CLI source code
│ ├── cli.js # Argument parsing & routing
│ ├── colors.js # Terminal colors
│ ├── config.js # Constants
│ ├── formatter.js # Output formatting
│ ├── ip.js # IP validation & detection
│ └── providers/ # Geolocation provider implementations
│ ├── base.js # Shared fetch logic
│ ├── index.js # Provider registry
│ ├── ipinfo.js # ipinfo.io
│ ├── ipapi.js # ipapi.co
│ └── ip-api.js # ip-api.com
├── test/ # CLI unit & integration tests
├── api/ # Self-hosted geolocation API
│ ├── src/ # Hono app, DB loader, rate limiter
│ ├── test/ # API tests
│ └── scripts/ # DB download script
├── scripts/ # Standalone Bash/PowerShell
├── docs/ # This documentation (Starlight)
├── Dockerfile # Docker image for CLI
├── package.json
├── LICENSE
└── README.md
  1. Create a branch for your change
  2. Make your edits
  3. Test locally with node bin/ipwhoami.js
  4. Submit a pull request

See the Adding a Provider guide for the full walkthrough.

The docs site is built with Astro Starlight. To work on docs:

Terminal window
cd docs
npm install
npm run dev

This starts a local dev server at http://localhost:4321.

  • ESM modules (import/export)
  • No dependencies — use Node.js built-ins
  • Keep provider implementations simple and consistent
  • Return normalized result shapes from all providers