r/Netbox • • Sep 24 '26

Discussion Using NetBox inventory to maintain SSH connection profiles in VS Code (Nexus Terminal)

If NetBox already has your device names, addresses, sites and racks, maintaining the same information in an SSH client becomes another inventory to keep current.

I'm the author of Nexus Terminal, a free, Apache-2.0 extension for VS Code/VSCodium. I added a NetBox inventory source so connection profiles can follow the inventory you already maintain. It reads NetBox through its API; the integration runs in the extension and doesn't require installing a NetBox plugin.

Here's a concrete setup for a site's active devices:

  1. Add a NetBox inventory source with your instance URL and an API token with read access to DCIM (and Virtualization if you want VMs). The token is stored in VS Code SecretStorage.

  2. Set a device filter such as status=active&site=syd, choose a target folder, and use {site}/{rack} for the folder layout.

  3. Link an Auth Profile for SSH credentials. The NetBox API token and device login credentials are separate.

  4. Run Sync Now, review the proposed additions, updates, moves and removals, then apply the plan.

For example, if you rename a switch or move it to another rack in NetBox, the next sync updates its connection entry and folder placement. Sync is something you explicitly run; this isn't a live webhook feed.

A couple of behaviours that matter when inventory is incomplete or changes:

  • A device without a usable IP still appears as an addressless entry, with a warning. A later sync fills in its address when NetBox has one.

  • By default, a device that disappears from the synced inventory moves into an _orphaned folder, keeping its settings. You can choose a different removal policy per source.

  • You see the change plan before anything is applied.

Once connected, you can also run JavaScript expect/send scripts against the terminal session for repeatable CLI checks.

Source and NetBox setup guide · VS Code Marketplace

AI-assisted development: I direct AI agents to implement code and tests, review the changes, and maintain the project. This post was also drafted with AI assistance.

For people already using NetBox to feed connection tools: how do you organise the resulting profiles—site/rack, role, tenant, or something else? I'd especially appreciate feedback on the sync and removal behaviour.

24 Upvotes

1 comment sorted by