# ndsvm/nds-sh architecture

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

- Interactive diagram: https://gitdiagram.com/ndsvm/nds-sh
- Repository: https://github.com/ndsvm/nds-sh

## Overview

Nodes is a small Bash-based Node.js version manager. The documented workflow starts with a shell user invoking `nds`, then dispatches commands for installing, listing, selecting, switching, setting defaults, and removing versions. Separate documented capabilities add project-marker auto-switching and shell initialization. The source was not excerpted, so relationships below reflect README statements only; implementation details and storage internals are not inferred.

Main entry points: [`nds.sh`](https://github.com/ndsvm/nds-sh/blob/main/nds.sh) (nds commands)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_nds["Nodes version manager"]
  node_cli["nds commands<br/>[nds.sh]"]
  node_versions["Version management<br/>[nds.sh]"]
  node_pickers["Interactive pickers<br/>[nds.sh]"]
  node_shell["Shell integration<br/>[nds.sh]"]
  node_autoswitch["Project auto-switch<br/>[nds.sh]"]
end

node_user(("Shell user"))
node_markers["Project markers"]
node_fzf["fzf"]

node_user -->|"runs"| node_cli
node_cli -->|"manages versions"| node_versions
node_cli -->|"offers picks"| node_pickers
node_pickers -.->|"uses optionally"| node_fzf
node_cli -->|"initializes shell"| node_shell
node_cli -->|"enables switching"| node_autoswitch
node_autoswitch -->|"reads markers"| node_markers

click node_cli "https://github.com/ndsvm/nds-sh/blob/main/nds.sh"
click node_versions "https://github.com/ndsvm/nds-sh/blob/main/nds.sh"
click node_pickers "https://github.com/ndsvm/nds-sh/blob/main/nds.sh"
click node_shell "https://github.com/ndsvm/nds-sh/blob/main/nds.sh"
click node_autoswitch "https://github.com/ndsvm/nds-sh/blob/main/nds.sh"

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_cli,node_versions,node_pickers,node_shell,node_autoswitch,node_user toneBlue
class node_markers,node_fzf toneIndigo
```

## Components

### Nodes version manager

- [nds commands](https://github.com/ndsvm/nds-sh/blob/main/nds.sh): `nds.sh`
- [Version management](https://github.com/ndsvm/nds-sh/blob/main/nds.sh): `nds.sh`
- [Interactive pickers](https://github.com/ndsvm/nds-sh/blob/main/nds.sh): `nds.sh`
- [Shell integration](https://github.com/ndsvm/nds-sh/blob/main/nds.sh): `nds.sh`
- [Project auto-switch](https://github.com/ndsvm/nds-sh/blob/main/nds.sh): `nds.sh`

### Other components

- **Shell user**
- **Project markers**
- **fzf**

## Connections

- Shell user → nds commands: runs (evidence: `README.md`)
- nds commands → Version management: manages versions (evidence: `README.md`)
- nds commands → Interactive pickers: offers picks (evidence: `README.md`)
- Interactive pickers → fzf: uses optionally (evidence: `README.md`)
- nds commands → Shell integration: initializes shell (evidence: `README.md`)
- nds commands → Project auto-switch: enables switching (evidence: `README.md`)
- Project auto-switch → Project markers: reads markers (evidence: `README.md`)
