gnpctl is the gNMI discovery and path-catalog control CLI for
gnp-stack. It mimics the LibreNMS
discovery model but for multivendor gNMI: build an inventory from a source
of truth, fingerprint each device from its gNMI Capabilities (plus a targeted
Get), and register which gNMI path-catalog entry each device should stream. A
separate process renders the gnmic subscription spec by reading the SQLite state.
inventory pull ──► targets table ──► discover ──► fingerprint + catalog_key ──► (renderer)
└─ test: gNMI Get the matched paths
# install (uv creates .venv with deps + dev/docs groups)
uv sync
# minimal config
cat > gnpctl.yaml <<'YAML'
database: ./state.db
catalog: ./catalog
log:
level: info
YAML
# register an inventory source, sync, discover, test
uv run gnpctl inventory add clab --type nornir -p path=./hosts.yml
uv run gnpctl inventory pull
uv run gnpctl discover
uv run gnpctl testRun the test suite with uv run pytest.
Full documentation lives in docs/ and is published as a
MkDocs Material site (build locally with uv run mkdocs serve):
- Getting Started — install, configuration, secrets
- Guides — inventory, discovery, testing
- Operations — scheduling, troubleshooting, the SQLite state/renderer contract
- Extending — authoring catalog entries, writing source plugins
- Reference — CLI, configuration, data model
The shipped
catalog/entries (Nokia SR Linux, Arista EOS) use representative gNMI paths and must be validated against real devices / containerlab before production — see Authoring catalog entries.