How kitops-ml/kitops works
KitOps is a CLI for defining, packaging, versioning, and exchanging AI/ML projects as OCI-compatible ModelKits or ModelPacks. The main workflow is to initialize or import a project, pack its Kitfile-defined assets, then push or pull the artifact through a registry and inspect or unpack it locally. Other documented stages include listing, tagging, diffing, authentication, and selective extraction. The tree also includes a local LLM development harness and browser chat UI. Command and storage wiring is inferred only where README capabilities and sampled code support it; unsampled subsystem links are omitted.
Main entry points: root.go Command routing · storage.go Local OCI store · pack.go Pack artifact · repository.go Remote repository
Components 24
CLI workflows
- CLI entry
main.go - Command routing
cmd/root.go - Initialize project
pkg/cmd/kitinit/cmd.go - Import assets
pkg/cmd/kitimport/cmd.go
Artifact lifecycle
- Pack artifact
pkg/cmd/pack/pack.go - Kitfile model
pkg/artifact/kitfile.go - OCI layers
pkg/lib/filesystem/local-storage.go - Unpack layers
pkg/cmd/unpack/cmd.go - Inspect artifact
pkg/cmd/inspect/inspect.go - Compare artifacts
pkg/cmd/diff/diff.go - Skill support
pkg/lib/skill/install.go
Storage and registries
- Local OCI store
pkg/lib/repo/local/storage.go - Local repository
pkg/lib/repo/local/repository.go - Push artifact
pkg/cmd/push/push.go - Pull artifact
pkg/cmd/pull/pull.go - Remote repository
pkg/lib/repo/remote/repository.go
LLM development
- Dev command
pkg/cmd/dev/dev.go - LLM harness
pkg/lib/harness/llm-harness.go - Chat interface
frontend/dev-mode/src/App.vue - Completion client
frontend/dev-mode/src/services/completion.ts
Other components
- CLI user
- OCI registry
- Hugging Face
- llama.cpp server
Connections 32
- CLI user → CLI entry: runs CLI
- CLI entry → Command routing: executes
- Command routing → Initialize project: dispatches
- Command routing → Import assets: dispatches
- Command routing → Pack artifact: dispatches
- Command routing → Unpack layers: dispatches
- Command routing → Inspect artifact: dispatches
- Command routing → Compare artifacts: dispatches
- Command routing → Push artifact: dispatches
- Command routing → Pull artifact: dispatches
- Command routing → Dev command: dispatches
- Initialize project → Kitfile model: generates
- Import assets → Hugging Face: imports from
- Import assets → Kitfile model: filters metadata
- Pack artifact → Kitfile model: reads definition
- Pack artifact → OCI layers: saves layers
- OCI layers → Local OCI store: writes blobs
- Pack artifact → Local repository: records manifest
- Unpack layers → Local OCI store: reads layers
- Inspect artifact → Local OCI store: reads artifact
- Compare artifacts → Local OCI store: compares artifacts
- Command routing → Skill support: supports skills
- Push artifact → Local OCI store: reads artifact
- Push artifact → Remote repository: uploads content
- Remote repository → OCI registry: sends OCI requests
- Pull artifact → Remote repository: fetches artifact
- Remote repository → OCI registry: reads OCI content
- Pull artifact → Local OCI store: stores content
- Dev command → LLM harness: manages server
- LLM harness → llama.cpp server: starts server
- Chat interface → Completion client: requests completion
- Completion client → llama.cpp server: calls API