# mrjcap/snipeitps architecture

> Architecture diagram of the GitHub repository mrjcap/snipeitps, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mrjcap/snipeitps
- Repository: https://github.com/mrjcap/snipeitps

## Overview

SnipeitPS is a cross-platform PowerShell client for the Snipe-IT REST API. Users connect with server credentials, then invoke commands to query or manage inventory and related administrative resources; results can flow through PowerShell pipelines. The documented feature set also includes bulk asset operations, desired-state synchronization, multi-tenant sessions, cached tab completion, default formatting, and an MCP server. Source excerpts were unavailable, so relationships below rely on README statements; internal call paths and response handling are not asserted.

Main entry points: [`SnipeitPS/Public`](https://github.com/mrjcap/snipeitps/tree/master/SnipeitPS/Public) (REST Commands), [`SnipeitPS/Classes/SnipeitSession.ps1`](https://github.com/mrjcap/snipeitps/blob/master/SnipeitPS/Classes/SnipeitSession.ps1) (Tenant Sessions), [`SnipeitPS/Classes/SnipeitCompleters.ps1`](https://github.com/mrjcap/snipeitps/blob/master/SnipeitPS/Classes/SnipeitCompleters.ps1) (Tab Completion), [`SnipeitPS/Classes/SnipeitCache.ps1`](https://github.com/mrjcap/snipeitps/blob/master/SnipeitPS/Classes/SnipeitCache.ps1) (Lookup Cache)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["PowerShell Client"]
  node_connect["Connection Setup"]
  node_commands["REST Commands"]
end

subgraph group_inventory["Inventory Operations"]
  node_asset_bulk["Bulk Asset Actions"]
  node_asset_sync["Asset State Sync"]
end

subgraph group_support["Client Features"]
  node_sessions["Tenant Sessions<br/>[SnipeitSession.ps1]"]
  node_completion["Tab Completion"]
  node_cache[("Lookup Cache<br/>[SnipeitCache.ps1]")]
  node_formatting["Output Formatting"]
end

subgraph group_integration["External Interfaces"]
  node_snipe_api{{"Snipe-IT API"}}
  node_mcp["MCP Server"]
  node_ai_client(("AI Client"))
end

node_user(("PowerShell User"))

node_user -->|"configures"| node_connect
node_user -->|"invokes"| node_commands
node_commands -->|"REST requests"| node_snipe_api
node_commands -->|"bulk actions"| node_asset_bulk
node_commands -->|"syncs desired state"| node_asset_sync
node_user -->|"creates session"| node_sessions
node_sessions -->|"supplies tenant"| node_commands
node_commands -->|"offers completion"| node_completion
node_completion -->|"caches lookups"| node_cache
node_user -->|"clears cache"| node_cache
node_commands -->|"formats output"| node_formatting
node_ai_client -->|"uses stdio"| node_mcp

click node_connect "https://github.com/mrjcap/snipeitps/blob/master/SnipeitPS/Public/Connect-SnipeitPS.ps1"
click node_commands "https://github.com/mrjcap/snipeitps/tree/master/SnipeitPS/Public"
click node_asset_bulk "https://github.com/mrjcap/snipeitps/tree/master/SnipeitPS/Public"
click node_asset_sync "https://github.com/mrjcap/snipeitps/blob/master/SnipeitPS/Public/Sync-SnipeitAsset.ps1"
click node_sessions "https://github.com/mrjcap/snipeitps/blob/master/SnipeitPS/Classes/SnipeitSession.ps1"
click node_completion "https://github.com/mrjcap/snipeitps/blob/master/SnipeitPS/Classes/SnipeitCompleters.ps1"
click node_cache "https://github.com/mrjcap/snipeitps/blob/master/SnipeitPS/Classes/SnipeitCache.ps1"
click node_formatting "https://github.com/mrjcap/snipeitps/blob/master/SnipeitPS/SnipeitPS.format.ps1xml"
click node_mcp "https://github.com/mrjcap/snipeitps/blob/master/mcp/SnipeitMcpServer.ps1"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_connect,node_commands,node_user toneBlue
class node_asset_bulk,node_asset_sync toneAmber
class node_sessions,node_completion,node_cache,node_formatting toneMint
class node_snipe_api,node_mcp,node_ai_client toneRose
```

## Components

### PowerShell Client

- [Connection Setup](https://github.com/mrjcap/snipeitps/blob/master/SnipeitPS/Public/Connect-SnipeitPS.ps1): `SnipeitPS/Public/Connect-SnipeitPS.ps1`
- [REST Commands](https://github.com/mrjcap/snipeitps/tree/master/SnipeitPS/Public): `SnipeitPS/Public`

### Inventory Operations

- [Bulk Asset Actions](https://github.com/mrjcap/snipeitps/tree/master/SnipeitPS/Public): `SnipeitPS/Public`
- [Asset State Sync](https://github.com/mrjcap/snipeitps/blob/master/SnipeitPS/Public/Sync-SnipeitAsset.ps1): `SnipeitPS/Public/Sync-SnipeitAsset.ps1`

### Client Features

- [Tenant Sessions](https://github.com/mrjcap/snipeitps/blob/master/SnipeitPS/Classes/SnipeitSession.ps1): `SnipeitPS/Classes/SnipeitSession.ps1`
- [Tab Completion](https://github.com/mrjcap/snipeitps/blob/master/SnipeitPS/Classes/SnipeitCompleters.ps1): `SnipeitPS/Classes/SnipeitCompleters.ps1`
- [Lookup Cache](https://github.com/mrjcap/snipeitps/blob/master/SnipeitPS/Classes/SnipeitCache.ps1): `SnipeitPS/Classes/SnipeitCache.ps1`
- [Output Formatting](https://github.com/mrjcap/snipeitps/blob/master/SnipeitPS/SnipeitPS.format.ps1xml): `SnipeitPS/SnipeitPS.format.ps1xml`

### External Interfaces

- **Snipe-IT API**
- [MCP Server](https://github.com/mrjcap/snipeitps/blob/master/mcp/SnipeitMcpServer.ps1): `mcp/SnipeitMcpServer.ps1`
- **AI Client**

### Other components

- **PowerShell User**

## Connections

- PowerShell User → Connection Setup: configures (evidence: `README.md`)
- PowerShell User → REST Commands: invokes (evidence: `README.md`)
- REST Commands → Snipe-IT API: REST requests (evidence: `README.md`)
- REST Commands → Bulk Asset Actions: bulk actions (evidence: `README.md`)
- REST Commands → Asset State Sync: syncs desired state (evidence: `README.md`)
- PowerShell User → Tenant Sessions: creates session (evidence: `README.md`)
- Tenant Sessions → REST Commands: supplies tenant (evidence: `README.md`)
- REST Commands → Tab Completion: offers completion (evidence: `README.md`)
- Tab Completion → Lookup Cache: caches lookups (evidence: `README.md`)
- PowerShell User → Lookup Cache: clears cache (evidence: `README.md`)
- REST Commands → Output Formatting: formats output (evidence: `README.md`)
- AI Client → MCP Server: uses stdio (evidence: `README.md`)
