Command-line tool for searching the PLN Directory API.
pip install pln-searchgit clone https://github.com/dannyob/pln-search.git
cd pln-search
pip install -e .The PLN Directory uses Privy for web authentication. Until we implement a full OAuth2 flow for CLI tools, you'll need to manually configure your authentication token:
Step 1: Get your token from the browser
- Visit https://directory.plnetwork.io/ and log in
- Open browser Developer Tools (F12 or right-click → Inspect)
- Go to the Application tab (Chrome) or Storage tab (Firefox)
- In the left sidebar, expand Cookies and select:
https://directory.plnetwork.io - Find the
authTokencookie and copy its VALUE (a long string starting witheyJ...) - Optional: Also copy the
refreshTokencookie value
Step 2: Configure the token
Option A - Interactive (recommended):
pln-search auth token --interactiveOption B - Command line:
pln-search auth token YOUR_TOKEN_HERECheck authentication status:
pln-search auth statusLogout (clear credentials):
pln-search auth logoutSearch:
pln-search search "John Doe" # Global search
pln-search search --members "John Doe" # Search members
pln-search search --teams "Protocol Labs" # Search teams
pln-search search --projects "IPFS" # Search projectsOptions:
pln-search search "query" --limit 50 # Show up to 50 results
pln-search search "query" --json # JSON output
pln-search search "query" --no-color # Plain text outputInstall dependencies:
make install-devRun tests:
make testFormat code:
make formatImplemented:
- ✓ Data models (Member, Team, Project)
- ✓ Configuration management with XDG directories
- ✓ API client with search methods
- ✓ Output formatters (rich, plain, JSON)
- ✓ OAuth2 token refresh
- ✓ CLI commands
- ✓ Test suite
TODO for production use:
- Full OAuth2 browser flow (currently stub)
- Integration testing with real API
- Error message improvements
- Performance optimization
- PyPI packaging
The project includes a comprehensive test suite. Note that OAuth2 browser authentication is currently a stub and requires manual token setup for testing against the real API.
For local development and testing, mock the API responses.