Skip to main content

ra-infrastructure CLI

Repo: ra-infrastructure (private) CLI entry point: inv (installed via pip install -e ".[dev]") Framework: Typer 0.9+ Language: Python 3.11+

Personal infrastructure repository managing 10+ Docker containers. The inv CLI provides a full inventory management system for organizations, sites, zones, devices, networks, and database operations.

Global Options

OptionDescription
--helpShow command help

Command Groups

org -- Organization Management

CommandDescriptionDocs
inv org listList all organizations--
inv org show SLUGShow organization details--
inv org create NAMECreate a new organization--
inv org delete SLUGDelete an organization--

site -- Site Management

CommandDescriptionDocs
inv site listList all sites--
inv site show SLUGShow site details--
inv site create NAMECreate a new site--
inv site delete SLUGDelete a site and all its data--

zone -- Zone Management

CommandDescriptionDocs
inv zone listList zones--
inv zone show SLUGShow zone details--
inv zone create NAMECreate a new zone--
inv zone delete SLUGDelete a zone--
inv zone typesList zone type options--

device -- Device Management

CommandDescriptionDocs
inv device listList devices with filteringView
inv device show SLUGShow device details--
inv device create NAMECreate a new device--
inv device countCount devices by category, type, zone, status, or usage--
inv device update SLUGUpdate device properties--
inv device delete SLUGDelete a device--
inv device store SLUGMark device as stored--
inv device activate SLUGMark device as active--
inv device fail SLUGMark device as failed--
inv device retire SLUGMark device as retired--
inv device pending SLUGMark device as pending--

network -- Network Management

CommandDescriptionDocs
inv network listList networks--
inv network show SLUGShow network details--
inv network typesList network type options--
inv network ips NETWORKList IP allocations for a network--
inv network create NAMECreate a new network--
inv network delete SLUGDelete a network--

db -- Database Operations

CommandDescriptionDocs
inv db healthCheck database health statusView
inv db statusShow detailed database status--
inv db startStart the database container--
inv db stopStop the database container--
inv db restartRestart the database container--
inv db watchWatch database health with notifications--
inv db migrateRun database migrations--
inv db seedSeed database with initial data--
inv db resetReset database (drop all, re-migrate)--
inv db tablesList all database tables--
inv db statsShow database statistics--
inv db schemaGenerate schema diagram (SchemaSpy)--

system -- System Health

CommandDescriptionDocs
inv system selfcheckComprehensive health check of all services--
inv system check-endpoint URLCheck a specific HTTP/HTTPS endpoint--

Standalone

CommandDescription
inv versionShow version
inv statusShow system status and database connection

Prerequisites

  • Python 3.11+
  • pip install -e ".[dev]" from cli/ directory
  • PostgreSQL container running (via Docker Compose)
  • Docker Desktop for database and service containers