# jozu-ai/kitops architecture

> Architecture diagram of the GitHub repository jozu-ai/kitops, 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/jozu-ai/kitops
- Repository: https://github.com/jozu-ai/kitops

## Overview

KitOps is a Go CLI for generating Kitfiles, packaging AI/ML project assets as OCI-based ModelKits or ModelPacks, and managing those artifacts locally or in registries. The principal workflow is to initialize or import project contents, pack them, push or pull a version, then inspect or selectively unpack it. The graph also includes documented listing, comparison, authentication, and skill-install capabilities. Relationships among unsampled command implementations are shown only where the README documents them; edges to external systems reflect documented product behavior.

Main entry points: [`cmd/root.go`](https://github.com/jozu-ai/kitops/blob/main/cmd/root.go) (CLI command root), [`pkg/cmd/push/cmd.go`](https://github.com/jozu-ai/kitops/blob/main/pkg/cmd/push/cmd.go) (Push artifact), [`pkg/cmd/pull/pull.go`](https://github.com/jozu-ai/kitops/blob/main/pkg/cmd/pull/pull.go) (Pull artifact), [`pkg/cmd/kitimport/cmd.go`](https://github.com/jozu-ai/kitops/blob/main/pkg/cmd/kitimport/cmd.go) (Import model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI workflows"]
  node_root["CLI command root<br/>[root.go]"]
  node_push["Push artifact<br/>[cmd.go]"]
  node_pull["Pull artifact<br/>[pull.go]"]
  node_unpack["Selective unpack<br/>[core.go]"]
  node_inspect["Inspect artifact<br/>[cmd.go]"]
  node_diff["Compare artifacts<br/>[cmd.go]"]
  node_list["List artifacts<br/>[cmd.go]"]
  node_skills["Install agent skills<br/>[install.go]"]
end

subgraph group_authoring["Kitfile and packaging"]
  node_init["Initialize Kitfile<br/>[cmd.go]"]
  node_import["Import model<br/>[cmd.go]"]
  node_generate["Kitfile generation<br/>[generate.go]"]
  node_pack["Pack artifact<br/>[cmd.go]"]
end

subgraph group_artifact["Artifact storage"]
  node_save["Build OCI layers<br/>[local-storage.go]"]
  node_kitfile["Kitfile model<br/>[kitfile.go]"]
  node_local[("Local OCI repository<br/>[repository.go]")]
  node_localstore[("Local OCI store<br/>[storage.go]")]
  node_remote["Remote registry client<br/>[repository.go]"]
end

subgraph group_integrations["External integrations"]
  node_auth["Registry authentication<br/>[auth.go]"]
  node_hf["Hugging Face"]
  node_git["Git repositories"]
  node_registry[("OCI registry")]
end

node_user(("CLI user"))

node_user -->|"runs commands"| node_root
node_root -->|"registers command"| node_init
node_root -->|"registers command"| node_import
node_root -->|"registers command"| node_pack
node_root -->|"registers command"| node_push
node_root -->|"registers command"| node_pull
node_root -->|"registers command"| node_unpack
node_root -->|"registers command"| node_inspect
node_root -->|"registers command"| node_diff
node_root -->|"registers command"| node_list
node_init -->|"generates Kitfile"| node_generate
node_init -->|"lists remote files"| node_hf
node_import -->|"downloads model"| node_hf
node_import -->|"supports download"| node_git
node_pack -->|"packages project"| node_save
node_save -->|"reads metadata"| node_kitfile
node_push -->|"uploads artifact"| node_remote
node_pull -->|"retrieves artifact"| node_remote
node_push -->|"reads local artifact"| node_local
node_pull -->|"stores artifact"| node_local
node_local -->|"uses OCI store"| node_localstore
node_remote -->|"transfers OCI content"| node_registry
node_unpack -->|"supports remote pulls"| node_registry
node_unpack -->|"installs skill layers"| node_skills
node_push -.->|"uses credentials"| node_auth
node_pull -.->|"uses credentials"| node_auth
node_import -->|"packages downloaded files"| node_pack
node_user -->|"views contents"| node_inspect
node_user -->|"compares versions"| node_diff
node_user -->|"lists artifacts"| node_list

click node_root "https://github.com/jozu-ai/kitops/blob/main/cmd/root.go"
click node_init "https://github.com/jozu-ai/kitops/blob/main/pkg/cmd/kitinit/cmd.go"
click node_import "https://github.com/jozu-ai/kitops/blob/main/pkg/cmd/kitimport/cmd.go"
click node_generate "https://github.com/jozu-ai/kitops/blob/main/pkg/lib/kitfile/generate/generate.go"
click node_pack "https://github.com/jozu-ai/kitops/blob/main/pkg/cmd/pack/cmd.go"
click node_save "https://github.com/jozu-ai/kitops/blob/main/pkg/lib/filesystem/local-storage.go"
click node_kitfile "https://github.com/jozu-ai/kitops/blob/main/pkg/artifact/kitfile.go"
click node_local "https://github.com/jozu-ai/kitops/blob/main/pkg/lib/repo/local/repository.go"
click node_localstore "https://github.com/jozu-ai/kitops/blob/main/pkg/lib/repo/local/storage.go"
click node_remote "https://github.com/jozu-ai/kitops/blob/main/pkg/lib/repo/remote/repository.go"
click node_push "https://github.com/jozu-ai/kitops/blob/main/pkg/cmd/push/cmd.go"
click node_pull "https://github.com/jozu-ai/kitops/blob/main/pkg/cmd/pull/pull.go"
click node_unpack "https://github.com/jozu-ai/kitops/blob/main/pkg/lib/filesystem/unpack/core.go"
click node_inspect "https://github.com/jozu-ai/kitops/blob/main/pkg/cmd/inspect/cmd.go"
click node_diff "https://github.com/jozu-ai/kitops/blob/main/pkg/cmd/diff/cmd.go"
click node_list "https://github.com/jozu-ai/kitops/blob/main/pkg/cmd/list/cmd.go"
click node_skills "https://github.com/jozu-ai/kitops/blob/main/pkg/lib/skill/install.go"
click node_auth "https://github.com/jozu-ai/kitops/blob/main/pkg/lib/network/auth.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_root,node_push,node_pull,node_unpack,node_inspect,node_diff,node_list,node_skills,node_user toneBlue
class node_init,node_import,node_generate,node_pack toneAmber
class node_save,node_kitfile,node_local,node_localstore,node_remote toneMint
class node_auth,node_hf,node_git,node_registry toneRose
```

## Components

### CLI workflows

- [CLI command root](https://github.com/jozu-ai/kitops/blob/main/cmd/root.go): `cmd/root.go`
- [Push artifact](https://github.com/jozu-ai/kitops/blob/main/pkg/cmd/push/cmd.go): `pkg/cmd/push/cmd.go`
- [Pull artifact](https://github.com/jozu-ai/kitops/blob/main/pkg/cmd/pull/pull.go): `pkg/cmd/pull/pull.go`
- [Selective unpack](https://github.com/jozu-ai/kitops/blob/main/pkg/lib/filesystem/unpack/core.go): `pkg/lib/filesystem/unpack/core.go`
- [Inspect artifact](https://github.com/jozu-ai/kitops/blob/main/pkg/cmd/inspect/cmd.go): `pkg/cmd/inspect/cmd.go`
- [Compare artifacts](https://github.com/jozu-ai/kitops/blob/main/pkg/cmd/diff/cmd.go): `pkg/cmd/diff/cmd.go`
- [List artifacts](https://github.com/jozu-ai/kitops/blob/main/pkg/cmd/list/cmd.go): `pkg/cmd/list/cmd.go`
- [Install agent skills](https://github.com/jozu-ai/kitops/blob/main/pkg/lib/skill/install.go): `pkg/lib/skill/install.go`

### Kitfile and packaging

- [Initialize Kitfile](https://github.com/jozu-ai/kitops/blob/main/pkg/cmd/kitinit/cmd.go): `pkg/cmd/kitinit/cmd.go`
- [Import model](https://github.com/jozu-ai/kitops/blob/main/pkg/cmd/kitimport/cmd.go): `pkg/cmd/kitimport/cmd.go`
- [Kitfile generation](https://github.com/jozu-ai/kitops/blob/main/pkg/lib/kitfile/generate/generate.go): `pkg/lib/kitfile/generate/generate.go`
- [Pack artifact](https://github.com/jozu-ai/kitops/blob/main/pkg/cmd/pack/cmd.go): `pkg/cmd/pack/cmd.go`

### Artifact storage

- [Build OCI layers](https://github.com/jozu-ai/kitops/blob/main/pkg/lib/filesystem/local-storage.go): `pkg/lib/filesystem/local-storage.go`
- [Kitfile model](https://github.com/jozu-ai/kitops/blob/main/pkg/artifact/kitfile.go): `pkg/artifact/kitfile.go`
- [Local OCI repository](https://github.com/jozu-ai/kitops/blob/main/pkg/lib/repo/local/repository.go): `pkg/lib/repo/local/repository.go`
- [Local OCI store](https://github.com/jozu-ai/kitops/blob/main/pkg/lib/repo/local/storage.go): `pkg/lib/repo/local/storage.go`
- [Remote registry client](https://github.com/jozu-ai/kitops/blob/main/pkg/lib/repo/remote/repository.go): `pkg/lib/repo/remote/repository.go`

### External integrations

- [Registry authentication](https://github.com/jozu-ai/kitops/blob/main/pkg/lib/network/auth.go): `pkg/lib/network/auth.go`
- **Hugging Face**
- **Git repositories**
- **OCI registry**

### Other components

- **CLI user**

## Connections

- CLI user → CLI command root: runs commands
- CLI command root → Initialize Kitfile: registers command (evidence: `cmd/root.go`)
- CLI command root → Import model: registers command (evidence: `cmd/root.go`)
- CLI command root → Pack artifact: registers command (evidence: `cmd/root.go`)
- CLI command root → Push artifact: registers command (evidence: `cmd/root.go`)
- CLI command root → Pull artifact: registers command (evidence: `cmd/root.go`)
- CLI command root → Selective unpack: registers command (evidence: `cmd/root.go`)
- CLI command root → Inspect artifact: registers command (evidence: `cmd/root.go`)
- CLI command root → Compare artifacts: registers command (evidence: `cmd/root.go`)
- CLI command root → List artifacts: registers command (evidence: `cmd/root.go`)
- Initialize Kitfile → Kitfile generation: generates Kitfile (evidence: `pkg/cmd/kitinit/cmd.go`)
- Initialize Kitfile → Hugging Face: lists remote files (evidence: `pkg/cmd/kitinit/cmd.go`)
- Import model → Hugging Face: downloads model (evidence: `pkg/cmd/kitimport/cmd.go`)
- Import model → Git repositories: supports download (evidence: `pkg/cmd/kitimport/cmd.go`)
- Pack artifact → Build OCI layers: packages project (evidence: `pkg/cmd/pack/cmd.go`)
- Build OCI layers → Kitfile model: reads metadata (evidence: `pkg/lib/filesystem/local-storage.go`)
- Push artifact → Remote registry client: uploads artifact (evidence: `pkg/cmd/push/cmd.go`)
- Pull artifact → Remote registry client: retrieves artifact (evidence: `pkg/cmd/pull/pull.go`)
- Push artifact → Local OCI repository: reads local artifact (evidence: `pkg/cmd/push/cmd.go`)
- Pull artifact → Local OCI repository: stores artifact (evidence: `pkg/cmd/pull/pull.go`)
- Local OCI repository → Local OCI store: uses OCI store (evidence: `pkg/lib/repo/local/repository.go`)
- Remote registry client → OCI registry: transfers OCI content (evidence: `pkg/lib/repo/remote/repository.go`)
- Selective unpack → OCI registry: supports remote pulls
- Selective unpack → Install agent skills: installs skill layers
- Push artifact → Registry authentication: uses credentials
- Pull artifact → Registry authentication: uses credentials
- Import model → Pack artifact: packages downloaded files (evidence: `pkg/cmd/kitimport/cmd.go`)
- CLI user → Inspect artifact: views contents
- CLI user → Compare artifacts: compares versions
- CLI user → List artifacts: lists artifacts
