Skip to main content

pln-search

Tests

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

  1. Visit https://directory.plnetwork.io/ and log in
  2. Open browser Developer Tools (F12 or right-click → Inspect)
  3. Go to the Application tab (Chrome) or Storage tab (Firefox)
  4. In the left sidebar, expand Cookies and select: https://directory.plnetwork.io
  5. Find the authToken cookie and copy its VALUE (a long string starting with eyJ...)
  6. Optional: Also copy the refreshToken cookie 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.

Metadata

Release files for pln-search 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pln-search 0.1.3
File Size Uploaded Provenance
pln_search-0.1.3.tar.gz 56.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pln-search 0.1.3
File Interpreter ABI Platform
pln_search-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 70.4 kB

Release files / pln_search-0.1.3.tar.gz

Download URL pln_search-0.1.3.tar.gz
Size 56.9 kB
Tags Source
SHA-256 checksum
How to use checksums
575c5bef84782b30edc6d09473a991a63cd71aabf1a4ab85043d8a162d02eabd
BLAKE2b-256 checksum
How to use checksums
a058afdf5fed3fee882c1d474c039f435d048122d899004cdfc391a5fcf4ce64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.10

Release files / pln_search-0.1.3-py3-none-any.whl

Download URL pln_search-0.1.3-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd3f27a63439a2802f2dd936cfc08e493efe42df9b9dfeb9d46dc2b4704d1342
BLAKE2b-256 checksum
How to use checksums
923dfeaa3a9a14b9852a8a9cec630da7b7e1d27cd50ce3e8f329c952d0d2f2ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.10

Security for pln-search 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page