CLI tool for searching the Protocol Labs Network Directory
Project description
pln-search
Command-line tool for searching the Protocol Labs Network Directory API.
Installation
From PyPI (recommended)
pip install pln-search
From source
git clone https://github.com/dannyob/pln-search.git
cd pln-search
pip install -e .
Usage
Authentication
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 --interactive
Option B - Command line:
pln-search auth token YOUR_TOKEN_HERE
Check authentication status:
pln-search auth status
Logout (clear credentials):
pln-search auth logout
Searching
Search:
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 projects
Options:
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 output
Development
Install dependencies:
make install-dev
Run tests:
make test
Format code:
make format
Development Status
Implemented:
- ✓ 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
Testing
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pln_search-0.1.3.tar.gz.
File metadata
- Download URL: pln_search-0.1.3.tar.gz
- Upload date:
- Size: 56.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
575c5bef84782b30edc6d09473a991a63cd71aabf1a4ab85043d8a162d02eabd
|
|
| MD5 |
e7a28e6a9548a0d6b8c3cb2515445483
|
|
| BLAKE2b-256 |
a058afdf5fed3fee882c1d474c039f435d048122d899004cdfc391a5fcf4ce64
|
File details
Details for the file pln_search-0.1.3-py3-none-any.whl.
File metadata
- Download URL: pln_search-0.1.3-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd3f27a63439a2802f2dd936cfc08e493efe42df9b9dfeb9d46dc2b4704d1342
|
|
| MD5 |
f398999c872cde6c9581a64f2988d051
|
|
| BLAKE2b-256 |
923dfeaa3a9a14b9852a8a9cec630da7b7e1d27cd50ce3e8f329c952d0d2f2ce
|