# eremenko789/nexus_util architecture

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

- Interactive diagram: https://gitdiagram.com/eremenko789/nexus_util
- Repository: https://github.com/eremenko789/nexus_util

## Overview

Nexus Util is a CLI for managing assets and administration in Nexus OSS Raw Repository. The main workflow is a user invoking a command, which resolves connection settings from flags or YAML, then uses the Nexus client to perform a remote operation and report results. Asset commands cover upload, download, deletion, listing, and comparison; sync transfers between two Nexus instances. Separate branches initialize configuration and manage repositories and blob stores. The excerpts show client calls for push, pull, sync, and blob/repository administration; other asset-command links reflect README capabilities, not inspected implementations.

Main entry points: [`nexus/nexus.go`](https://github.com/eremenko789/nexus_util/blob/main/nexus/nexus.go) (Nexus operations), [`cmd/asset/asset.go`](https://github.com/eremenko789/nexus_util/blob/main/cmd/asset/asset.go) (Asset command), [`config/config.go`](https://github.com/eremenko789/nexus_util/blob/main/config/config.go) (Config loading), [`main.go`](https://github.com/eremenko789/nexus_util/blob/main/main.go) (Command entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI commands"]
  node_entry["Command entry<br/>[main.go]"]
  node_assetcmd["Asset command<br/>[asset.go]"]
end

subgraph group_asset["Asset workflows"]
  node_push["Push assets<br/>[push.go]"]
  node_pull["Pull assets<br/>[pull.go]"]
  node_delete["Delete assets<br/>[delete.go]"]
  node_list["List assets<br/>[list.go]"]
  node_diff["Compare assets<br/>[diff.go]"]
  node_sync["Sync repositories<br/>[sync.go]"]
end

subgraph group_admin["Nexus administration"]
  node_repo["List repositories<br/>[repo.go]"]
  node_blobcreate["Create blob store<br/>[create.go]"]
  node_bloblist["List blob stores<br/>[list.go]"]
  node_blobshow["Show blob store<br/>[show.go]"]
end

subgraph group_settings["Configuration"]
  node_init["Initialize config<br/>[init.go]"]
  node_config["Config loading<br/>[config.go]"]
end

subgraph group_client["Nexus client"]
  node_nexusclient["Nexus operations<br/>[nexus.go]"]
end

node_user(("CLI user"))
node_nexus(("Nexus OSS"))
node_localfiles["Local files"]

node_user -->|"runs commands"| node_entry
node_entry -->|"registers"| node_assetcmd
node_entry -->|"registers"| node_init
node_entry -->|"registers"| node_repo
node_entry -->|"registers"| node_sync
node_assetcmd -->|"offers"| node_push
node_assetcmd -->|"offers"| node_pull
node_assetcmd -->|"offers"| node_delete
node_assetcmd -->|"offers"| node_list
node_assetcmd -->|"offers"| node_diff
node_init -->|"saves settings"| node_config
node_push -->|"loads settings"| node_config
node_pull -->|"loads settings"| node_config
node_push -->|"uploads"| node_nexusclient
node_pull -->|"downloads"| node_nexusclient
node_sync -->|"loads settings"| node_config
node_sync -->|"transfers via"| node_nexusclient
node_repo -->|"loads settings"| node_config
node_repo -->|"lists repositories"| node_nexusclient
node_blobcreate -->|"loads settings"| node_config
node_blobcreate -->|"creates store"| node_nexusclient
node_bloblist -->|"loads settings"| node_config
node_bloblist -->|"lists stores"| node_nexusclient
node_nexusclient -->|"uses REST API"| node_nexus
node_localfiles -->|"provides uploads"| node_push
node_pull -->|"writes downloads"| node_localfiles
node_diff -.->|"compares repository"| node_nexusclient
node_delete -.->|"deletes assets"| node_nexusclient
node_list -.->|"lists assets"| node_nexusclient
node_blobshow -.->|"shows store"| node_nexusclient

click node_entry "https://github.com/eremenko789/nexus_util/blob/main/main.go"
click node_assetcmd "https://github.com/eremenko789/nexus_util/blob/main/cmd/asset/asset.go"
click node_push "https://github.com/eremenko789/nexus_util/blob/main/cmd/asset/push.go"
click node_pull "https://github.com/eremenko789/nexus_util/blob/main/cmd/asset/pull.go"
click node_delete "https://github.com/eremenko789/nexus_util/blob/main/cmd/asset/delete.go"
click node_list "https://github.com/eremenko789/nexus_util/blob/main/cmd/asset/list.go"
click node_diff "https://github.com/eremenko789/nexus_util/blob/main/cmd/asset/diff.go"
click node_sync "https://github.com/eremenko789/nexus_util/blob/main/cmd/sync/sync.go"
click node_init "https://github.com/eremenko789/nexus_util/blob/main/cmd/init/init.go"
click node_config "https://github.com/eremenko789/nexus_util/blob/main/config/config.go"
click node_repo "https://github.com/eremenko789/nexus_util/blob/main/cmd/repo/repo.go"
click node_blobcreate "https://github.com/eremenko789/nexus_util/blob/main/cmd/blob/create.go"
click node_bloblist "https://github.com/eremenko789/nexus_util/blob/main/cmd/blob/list.go"
click node_blobshow "https://github.com/eremenko789/nexus_util/blob/main/cmd/blob/show.go"
click node_nexusclient "https://github.com/eremenko789/nexus_util/blob/main/nexus/nexus.go"

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_entry,node_assetcmd,node_user toneBlue
class node_push,node_pull,node_delete,node_list,node_diff,node_sync toneAmber
class node_repo,node_blobcreate,node_bloblist,node_blobshow toneMint
class node_init,node_config toneRose
class node_nexusclient,node_nexus,node_localfiles toneIndigo
```

## Components

### CLI commands

- [Command entry](https://github.com/eremenko789/nexus_util/blob/main/main.go): `main.go`
- [Asset command](https://github.com/eremenko789/nexus_util/blob/main/cmd/asset/asset.go): `cmd/asset/asset.go`

### Asset workflows

- [Push assets](https://github.com/eremenko789/nexus_util/blob/main/cmd/asset/push.go): `cmd/asset/push.go`
- [Pull assets](https://github.com/eremenko789/nexus_util/blob/main/cmd/asset/pull.go): `cmd/asset/pull.go`
- [Delete assets](https://github.com/eremenko789/nexus_util/blob/main/cmd/asset/delete.go): `cmd/asset/delete.go`
- [List assets](https://github.com/eremenko789/nexus_util/blob/main/cmd/asset/list.go): `cmd/asset/list.go`
- [Compare assets](https://github.com/eremenko789/nexus_util/blob/main/cmd/asset/diff.go): `cmd/asset/diff.go`
- [Sync repositories](https://github.com/eremenko789/nexus_util/blob/main/cmd/sync/sync.go): `cmd/sync/sync.go`

### Nexus administration

- [List repositories](https://github.com/eremenko789/nexus_util/blob/main/cmd/repo/repo.go): `cmd/repo/repo.go`
- [Create blob store](https://github.com/eremenko789/nexus_util/blob/main/cmd/blob/create.go): `cmd/blob/create.go`
- [List blob stores](https://github.com/eremenko789/nexus_util/blob/main/cmd/blob/list.go): `cmd/blob/list.go`
- [Show blob store](https://github.com/eremenko789/nexus_util/blob/main/cmd/blob/show.go): `cmd/blob/show.go`

### Configuration

- [Initialize config](https://github.com/eremenko789/nexus_util/blob/main/cmd/init/init.go): `cmd/init/init.go`
- [Config loading](https://github.com/eremenko789/nexus_util/blob/main/config/config.go): `config/config.go`

### Nexus client

- [Nexus operations](https://github.com/eremenko789/nexus_util/blob/main/nexus/nexus.go): `nexus/nexus.go`

### Other components

- **CLI user**
- **Nexus OSS**
- **Local files**

## Connections

- CLI user → Command entry: runs commands (evidence: `main.go`)
- Command entry → Asset command: registers (evidence: `main.go`)
- Command entry → Initialize config: registers (evidence: `main.go`)
- Command entry → List repositories: registers (evidence: `main.go`)
- Command entry → Sync repositories: registers (evidence: `main.go`)
- Asset command → Push assets: offers
- Asset command → Pull assets: offers
- Asset command → Delete assets: offers
- Asset command → List assets: offers
- Asset command → Compare assets: offers
- Initialize config → Config loading: saves settings (evidence: `cmd/init/init.go`)
- Push assets → Config loading: loads settings (evidence: `cmd/asset/push.go`)
- Pull assets → Config loading: loads settings (evidence: `cmd/asset/pull.go`)
- Push assets → Nexus operations: uploads (evidence: `cmd/asset/push.go`)
- Pull assets → Nexus operations: downloads (evidence: `cmd/asset/pull.go`)
- Sync repositories → Config loading: loads settings (evidence: `cmd/sync/sync.go`)
- Sync repositories → Nexus operations: transfers via (evidence: `cmd/sync/sync.go`)
- List repositories → Config loading: loads settings (evidence: `cmd/repo/repo.go`)
- List repositories → Nexus operations: lists repositories (evidence: `cmd/repo/repo.go`)
- Create blob store → Config loading: loads settings (evidence: `cmd/blob/create.go`)
- Create blob store → Nexus operations: creates store (evidence: `cmd/blob/create.go`)
- List blob stores → Config loading: loads settings (evidence: `cmd/blob/list.go`)
- List blob stores → Nexus operations: lists stores (evidence: `cmd/blob/list.go`)
- Nexus operations → Nexus OSS: uses REST API (evidence: `README.md`)
- Local files → Push assets: provides uploads (evidence: `README.md`)
- Pull assets → Local files: writes downloads (evidence: `README.md`)
- Compare assets → Nexus operations: compares repository
- Delete assets → Nexus operations: deletes assets
- List assets → Nexus operations: lists assets
- Show blob store → Nexus operations: shows store
