# packetchaos/navi architecture

> Architecture diagram of the GitHub repository packetchaos/navi, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/packetchaos/navi
- Repository: https://github.com/packetchaos/navi

## Overview

##### Project type and purpose
- Navi is a command-line automation tool (not a web app) that drives the Tenable.io API to perform vulnerability management tasks.
- It’s structured as a Python package with a CLI front-end, a plugin framework for discrete operations, a local SQLite database for caching, and optional HTML templates for output.

##### File structure
- Top-level:
- Dockerfile and .gitignore for containerization and source control
- setup.py for packaging/install
- bulk_change_Network_TTL.py, navi_automation*.py for one-off automation scripts
- Queries.md for sample SQL queries
- navi/ directory containing:
– cli.py: entry point for the “navi” CLI
– __init__.py: package initializer
– plugins/: each .py is a standalone command or data-export module
- templates/: HTML templates used by certain plugins to render output
- tio-config.xlsx: sample or default configuration for Tenable I/O credentials

##### README for additional insights
- Confirms a threaded download engine (50 chunks × 10 threads)
- SQLite underpins the local navi.db store
- The tool ships in Docker to simplify dependencies
- Plugins cover tasks like exporting assets, compliance reports, emailing, and more

##### Elements
– Blue for internal modules (CLI, Engine, Plugins)
– Green for the local database
– Orange for external services (Tenable.io API)
– Gray for execution boundary (Docker container)

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Docker Container" 
        direction TB
        CLI["CLI Interface\n(navi/cli.py)"]:::internal
        Engine["Core Engine &\nPlugin Manager\n(navi/__init__.py)"]:::internal
        subgraph "Plugins" 
            direction TB
            PluginDir["Plugin Modules\n(navi/plugins/)"]:::internal
            APIPlugin["API Wrapper Plugin\n(navi/plugins/api_wrapper.py)"]:::internal
            DBPlugin["Database Plugin\n(navi/plugins/database.py)"]:::internal
        end
        SQLiteDB["SQLite Database\n(navi.db)"]:::database
        Templates["HTML Output Layer\ntemplates/"]:::internal
        Config["Tenable I/O Config\ntio-config.xlsx"]:::internal
        Setup["Packaging Script\nsetup.py"]:::internal
        Queries["SQL Queries\nQueries.md"]:::internal
        subgraph "Automation Scripts"
            direction TB
            BulkTTL["bulk_change_Network_TTL.py"]:::internal
            Auto1["navi_automation.py"]:::internal
            Auto2["navi_automation_bysheet.py"]:::internal
            Auto3["navi_ctf_automation.py"]:::internal
        end
    end

    TenableAPI["Tenable.io API"]:::external

    CLI -->|invokes| Engine
    BulkTTL -->|calls| Engine
    Auto1 -->|calls| Engine
    Auto2 -->|calls| Engine
    Auto3 -->|calls| Engine
    Engine -->|loads| PluginDir
    PluginDir -->|loads| APIPlugin
    PluginDir -->|loads| DBPlugin
    Engine -->|uses| DBPlugin
    DBPlugin -->|read/write| SQLiteDB
    Engine -->|calls| APIPlugin
    APIPlugin -->|HTTPS| TenableAPI
    Engine -->|renders via| Templates

    click CLI "https://github.com/packetchaos/navi/blob/master/navi/cli.py"
    click Engine "https://github.com/packetchaos/navi/blob/master/navi/__init__.py"
    click PluginDir "https://github.com/packetchaos/navi/tree/master/navi/plugins/"
    click APIPlugin "https://github.com/packetchaos/navi/blob/master/navi/plugins/api_wrapper.py"
    click DBPlugin "https://github.com/packetchaos/navi/blob/master/navi/plugins/database.py"
    click SQLiteDB "https://github.com/packetchaos/navi/blob/master/navi/navi.db"
    click Templates "https://github.com/packetchaos/navi/tree/master/templates/"
    click Config "https://github.com/packetchaos/navi/blob/master/tio-config.xlsx"
    click Setup "https://github.com/packetchaos/navi/blob/master/setup.py"
    click Queries "https://github.com/packetchaos/navi/blob/master/Queries.md"
    click BulkTTL "https://github.com/packetchaos/navi/blob/master/bulk_change_Network_TTL.py"
    click Auto1 "https://github.com/packetchaos/navi/blob/master/navi_automation.py"
    click Auto2 "https://github.com/packetchaos/navi/blob/master/navi_automation_bysheet.py"
    click Auto3 "https://github.com/packetchaos/navi/blob/master/navi_ctf_automation.py"

    classDef internal fill:#bbdefb,stroke:#1e88e5,color:#0d47a1;
    classDef database fill:#c8e6c9,stroke:#2e7d32,color:#1b5e20;
    classDef external fill:#ffe0b2,stroke:#fb8c00,color:#e65100;
    classDef container fill:#eeeeee,stroke:#9e9e9e,color:#424242;
```
