divekit-cli

module
v0.0.0-...-b5d3dca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2026 License: Apache-2.0

README

Divekit CLI

Divekit CLI is the core command-line application for creating, individualizing, distributing, and maintaining Git repositories for academic exercises.

This repository is the source of truth for implementation-coupled maintainer documentation. End-user documentation and published command pages belong in the companion Divekit docs project.

Documentation

User Quick Start

divekit version
divekit doctor
divekit auth
divekit init
divekit distribute --distribution <name>

Use divekit --help to inspect the current CLI surface.

Developer Quick Start

git clone https://gitlab.git.nrw/divekit/divekit-cli.git
cd divekit-cli
./scripts/dev/setup.sh
make build
make test
make check

For day-to-day development, start with:

Repository Scope

This repository contains:

  • the Cobra CLI entrypoints in internal/cli
  • application and handler orchestration in internal/app and internal/cmd
  • services, repositories, scripting, templating, and local infrastructure
  • the local GUI server and embedded web assets
  • maintainer-facing architecture, reference, and development documentation

This repository does not aim to be the long-form source of truth for end-user walkthroughs. Those belong in the published documentation site.

Build Notes

  • make build builds the CLI and embedded GUI assets
  • make dev starts the local GUI development workflow
  • make test runs the Go test suite
  • make check runs the work repository checks

Maintainers

Maintained by the ArchiLab team at TH Köln.

Directories

Path Synopsis
cmd
divekit command
Package main provides the entry point for the divekit CLI tool
Package main provides the entry point for the divekit CLI tool
tools/guiopenapi command
Package main implements the guiopenapi maintenance tool for bundling and deriving generated GUI API contract artifacts.
Package main implements the guiopenapi maintenance tool for bundling and deriving generated GUI API contract artifacts.
tools/interfaceguard command
Package main implements the interfaceguard tool for checking interface implementations
Package main implements the interfaceguard tool for checking interface implementations
internal
app/auth
Package auth provides authentication functionality for divekit commands
Package auth provides authentication functionality for divekit commands
app/config/explain
Package explain contains CLI handlers for explaining configuration schemas.
Package explain contains CLI handlers for explaining configuration schemas.
app/detectionoutput
Package detectionoutput contains shared console rendering for token and variation detection results.
Package detectionoutput contains shared console rendering for token and variation detection results.
app/dev
Package dev implements the dev command functionality
Package dev implements the dev command functionality
app/distributions/actionexec
Package actionexec executes persisted distribution actions for the GUI.
Package actionexec executes persisted distribution actions for the GUI.
app/distributions/actionmode
Package actionmode centralizes provider and dry-run mode normalization for distribution actions.
Package actionmode centralizes provider and dry-run mode normalization for distribution actions.
app/distributions/detail
Package detail exposes the distribution detail flow to the app layer.
Package detail exposes the distribution detail flow to the app layer.
app/distributions/distcommon
Package distcommon provides shared distribution loading types and helpers.
Package distcommon provides shared distribution loading types and helpers.
app/distributions/distribute
Package distribute implements the distribute command functionality
Package distribute implements the distribute command functionality
app/distributions/distribute/progress
Package progress provides progress tracking functionality for repository deletion operations using bubble tea UI components.
Package progress provides progress tracking functionality for repository deletion operations using bubble tea UI components.
app/distributions/distribute/ui
Package ui provides output formatting and rendering utilities for the distribute command, including URL styling, warning boxes, and path utilities.
Package ui provides output formatting and rendering utilities for the distribute command, including URL styling, warning boxes, and path utilities.
app/distributions/feedback
Package feedback manages manually authored report feedback for distributions.
Package feedback manages manually authored report feedback for distributions.
app/distributions/globallist
Package globallist exposes the global distribution list flow to the app layer.
Package globallist exposes the global distribution list flow to the app layer.
app/distributions/list
Package list exposes the per-origin distribution list flow to the app layer.
Package list exposes the per-origin distribution list flow to the app layer.
app/distributions/members
Package members exposes the member configuration flow to the app layer.
Package members exposes the member configuration flow to the app layer.
app/distributions/overview
Package overview implements the overview command functionality
Package overview implements the overview command functionality
app/distributions/patch
Package patch implements the patch command functionality
Package patch implements the patch command functionality
app/distributions/purge
Package purge provides CLI handlers for deleting distributed repositories.
Package purge provides CLI handlers for deleting distributed repositories.
app/distributions/repositories
Package repositories exposes the distribution repository listing flow to the app layer.
Package repositories exposes the distribution repository listing flow to the app layer.
app/distributions/role
Package role provides error types for role-related operations.
Package role provides error types for role-related operations.
app/doctor
Package doctor exposes the environment doctor flow to the app layer.
Package doctor exposes the environment doctor flow to the app layer.
app/fetch
Package fetch implements the fetch command functionality
Package fetch implements the fetch command functionality
app/index
Package index provides application-level helpers around the project index.
Package index provides application-level helpers around the project index.
app/index/add
Package add provides error types for the index add command.
Package add provides error types for the index add command.
app/index/refresh
Package refresh defines typed errors for the index refresh command.
Package refresh defines typed errors for the index refresh command.
app/index/search
Package search contains logic used by the interactive and non-interactive search commands, including config loading, action execution, and error handling.
Package search contains logic used by the interactive and non-interactive search commands, including config loading, action execution, and error handling.
app/initialize
Package initialize provides error types for the initialize command.
Package initialize provides error types for the initialize command.
app/inject
Package inject provides error types for the inject app flow.
Package inject provides error types for the inject app flow.
app/install
Package install provides error handling functionality for the divekit installation process.
Package install provides error handling functionality for the divekit installation process.
app/origins/list
Package list exposes the origin listing flow to the app layer.
Package list exposes the origin listing flow to the app layer.
app/origins/refresh
Package refresh exposes the origin index refresh flow to the app layer.
Package refresh exposes the origin index refresh flow to the app layer.
app/origins/remove
Package remove exposes the origin removal flow to the app layer.
Package remove exposes the origin removal flow to the app layer.
app/origins/set
Package set exposes the origin update flow to the app layer.
Package set exposes the origin update flow to the app layer.
app/origins/show
Package show exposes the origin show flow to the app layer.
Package show exposes the origin show flow to the app layer.
app/passcheck
Package passcheck provides functionality for checking and displaying pass/fail results for distributions.
Package passcheck provides functionality for checking and displaying pass/fail results for distributions.
app/plugin
Package plugin provides errors for evaluation-pipeline plugin management.
Package plugin provides errors for evaluation-pipeline plugin management.
app/report
Package report normalizes imported test reports for legacy Divekit exports.
Package report normalizes imported test reports for legacy Divekit exports.
app/run
Package run provides functionality for executing scripts in the divekit context.
Package run provides functionality for executing scripts in the divekit context.
app/settings/listhosts
Package listhosts exposes the host listing flow to the app layer.
Package listhosts exposes the host listing flow to the app layer.
app/settings/removehost
Package removehost exposes the host removal flow to the app layer.
Package removehost exposes the host removal flow to the app layer.
app/settings/renamehost
Package renamehost exposes the host rename flow to the app layer.
Package renamehost exposes the host rename flow to the app layer.
app/settings/upserthost
Package upserthost exposes the host upsert flow to the app layer.
Package upserthost exposes the host upsert flow to the app layer.
app/snapshot
Package snapshot creates history-stripped research snapshots of distributed repositories.
Package snapshot creates history-stripped research snapshots of distributed repositories.
app/uninstall
Package uninstall provides the managed Divekit uninstall workflow.
Package uninstall provides the managed Divekit uninstall workflow.
app/update
Package update provides functionality for updating the divekit CLI tool.
Package update provides functionality for updating the divekit CLI tool.
appcontext
Package appcontext provides helpers for sharing interaction settings via context values.
Package appcontext provides helpers for sharing interaction settings via context values.
apperror
Package apperror provides common error types and utilities for divekit application.
Package apperror provides common error types and utilities for divekit application.
assets
Package assets provides embedded resources for the divekit CLI including CI templates, scripts, and example files used for project initialization and distribution.
Package assets provides embedded resources for the divekit CLI including CI templates, scripts, and example files used for project initialization and distribution.
cli
Package cli defines the Cobra command surface for the divekit tool
Package cli defines the Cobra command surface for the divekit tool
cmd/flags
Package flags contains shared command flag helpers.
Package flags contains shared command flag helpers.
cmd/middleware
Package middleware provides middleware functionality for command execution, including context propagation, error handling, logging, and metrics.
Package middleware provides middleware functionality for command execution, including context propagation, error handling, logging, and metrics.
cmd/report
Package report provides the legacy HTML report command implementation.
Package report provides the legacy HTML report command implementation.
cmd/report/preview
Package preview drives a watch + serve loop around the divekit report renderer so that UI/UX changes to the report assets appear in the browser without a manual rebuild.
Package preview drives a watch + serve loop around the divekit report renderer so that UI/UX changes to the report assets appear in the browser without a manual rebuild.
constants
Package constants defines global constants and utility functions for the divekit CLI.
Package constants defines global constants and utility functions for the divekit CLI.
homepath
Package homepath resolves the effective Divekit home directory path.
Package homepath resolves the effective Divekit home directory path.
infrastructure
Package infrastructure aggregates low-level concerns such as filesystem, local data, secrets and concurrency utilities behind a cohesive domain import.
Package infrastructure aggregates low-level concerns such as filesystem, local data, secrets and concurrency utilities behind a cohesive domain import.
infrastructure/concurrency
Package concurrency provides utilities for merging and resolving concurrency configuration settings from multiple sources with proper precedence handling.
Package concurrency provides utilities for merging and resolving concurrency configuration settings from multiple sources with proper precedence handling.
infrastructure/divekitdb
Package divekitdb resolves and migrates the central local Divekit database.
Package divekitdb resolves and migrates the central local Divekit database.
infrastructure/filesystem
Package filesystem provides filesystem abstraction interfaces and implementations.
Package filesystem provides filesystem abstraction interfaces and implementations.
infrastructure/jsonfile
Package jsonfile provides helpers for decoding local JSON files with user-facing location diagnostics.
Package jsonfile provides helpers for decoding local JSON files with user-facing location diagnostics.
infrastructure/localdata
Package localdata contains types and helpers for local data storage.
Package localdata contains types and helpers for local data storage.
infrastructure/secrets
Package secrets provides secure storage and retrieval of sensitive data like tokens.
Package secrets provides secure storage and retrieval of sensitive data like tokens.
installation
Package installation manages the user-level Divekit install layout and shell PATH integration.
Package installation manages the user-level Divekit install layout and shell PATH integration.
orchestration/runs
Package runs provides contracts and persistence for orchestrated GUI actions.
Package runs provides contracts and persistence for orchestrated GUI actions.
pathutil
Package pathutil contains helpers for working with Divekit-specific path suffixes.
Package pathutil contains helpers for working with Divekit-specific path suffixes.
project
Package project provides project-related utilities and configuration handling
Package project provides project-related utilities and configuration handling
report
Package report contains transport-neutral report data shapes shared by app and service packages.
Package report contains transport-neutral report data shapes shared by app and service packages.
repository
Package repository aggregates repository-centric concerns such as providers, repository config, indexing and retry strategies under one import path.
Package repository aggregates repository-centric concerns such as providers, repository config, indexing and retry strategies under one import path.
repository/config
Package config provides utilities for loading and saving Divekit CLI configuration files.
Package config provides utilities for loading and saving Divekit CLI configuration files.
repository/config/individual
Package individual provides configuration structures and utilities for handling individualization.
Package individual provides configuration structures and utilities for handling individualization.
repository/config/resolver
Package resolver provides functionality for resolving configuration keys and values with support for aliases and environment variable references.
Package resolver provides functionality for resolving configuration keys and values with support for aliases and environment variable references.
repository/config/types
Package types defines shared configuration structures for Divekit distributions.
Package types defines shared configuration structures for Divekit distributions.
repository/dataprovider
Package dataprovider provides error types for repository data providers.
Package dataprovider provides error types for repository data providers.
repository/dataprovider/common
Package common contains shared helpers for dataprovider adapters.
Package common contains shared helpers for dataprovider adapters.
repository/dataprovider/gitlab
Package gitlab provides error types for the GitLab data provider.
Package gitlab provides error types for the GitLab data provider.
repository/dataprovider/localfs
Package localfs implements a dataprovider that works on the local filesystem.
Package localfs implements a dataprovider that works on the local filesystem.
repository/dataprovider/mock
Package mock provides mock implementations of provider interfaces for testing.
Package mock provides mock implementations of provider interfaces for testing.
repository/dataprovider/simulated
Package simulated implements an in-memory ResourceProvider used for tests and demos.
Package simulated implements an in-memory ResourceProvider used for tests and demos.
repository/index
Package index provides a simple SQLite-backed project index for search.
Package index provides a simple SQLite-backed project index for search.
repository/retry
Package retry provides helpers and typed errors for retrying operations.
Package retry provides helpers and typed errors for retrying operations.
repository/typescompat
Package typescompat provides small shared utility types and helpers.
Package typescompat provides small shared utility types and helpers.
resource
Package resource provides path and filesystem utilities and typed errors.
Package resource provides path and filesystem utilities and typed errors.
scripting
Package scripting provides functionality for discovering and loading Lua scripts used for customization and extension of divekit operations.
Package scripting provides functionality for discovering and loading Lua scripts used for customization and extension of divekit operations.
scripting/contracts
Package contracts defines interfaces for scripting and transformation operations.
Package contracts defines interfaces for scripting and transformation operations.
scripting/lua
Package lua provides Lua scripting engine integration
Package lua provides Lua scripting engine integration
server/gui
Package gui provides the embedded HTTP server and app-layer adapters for the GUI.
Package gui provides the embedded HTTP server and app-layer adapters for the GUI.
server/gui/openapi
Package openapi provides primitives to interact with the openapi HTTP API.
Package openapi provides primitives to interact with the openapi HTTP API.
server/gui/runtime
Package runtime wires the GUI command entry points to the shared server runtime.
Package runtime wires the GUI command entry points to the shared server runtime.
service
Package service hosts the shared service-layer contracts: typed errors, progress reporting interfaces, and cross-domain value types used by the domain sub-packages.
Package service hosts the shared service-layer contracts: typed errors, progress reporting interfaces, and cross-domain value types used by the domain sub-packages.
service/authentication
Package authentication implements auth setup and GitLab token validation.
Package authentication implements auth setup and GitLab token validation.
service/configuration
Package configuration manages user-level host and origin configuration.
Package configuration manages user-level host and origin configuration.
service/diagnostic
Package diagnostic implements doctor checks and environment diagnostics.
Package diagnostic implements doctor checks and environment diagnostics.
service/discovery
Package discovery indexes and finds Divekit projects on the local machine.
Package discovery indexes and finds Divekit projects on the local machine.
service/distribution
Package distribution executes distributions: project creation, content individualization, and member assignment.
Package distribution executes distributions: project creation, content individualization, and member assignment.
service/evaluation
Package evaluation implements evaluation-pipeline materialization, override handling, and pipeline asset rendering.
Package evaluation implements evaluation-pipeline materialization, override handling, and pipeline asset rendering.
service/individualization
Package individualization applies variation tokens and analyzes content.
Package individualization applies variation tokens and analyzes content.
service/initialization
Package initialization creates origin-repository scaffolding.
Package initialization creates origin-repository scaffolding.
service/injection
Package injection copies embedded default assets into projects.
Package injection copies embedded default assets into projects.
service/installation
Package installation manages the install lifecycle and release updates.
Package installation manages the install lifecycle and release updates.
service/naming
Package naming reconciles distributed repository names and URL paths.
Package naming reconciles distributed repository names and URL paths.
service/patching
Package patching orchestrates patch workflows over distributed repositories.
Package patching orchestrates patch workflows over distributed repositories.
service/repositories
Package repositories composes providers and handles fetch and download jobs.
Package repositories composes providers and handles fetch and download jobs.
service/roles
Package roles manages member access levels across projects.
Package roles manages member access levels across projects.
service/scriptexec
Package scriptexec executes user-provided scripts over repositories.
Package scriptexec executes user-provided scripts over repositories.
service/security
Package security implements password and access checks.
Package security implements password and access checks.
service/validation
Package validation checks distributed content for unresolved tokens.
Package validation checks distributed content for unresolved tokens.
shell
Package shell aggregates user interaction concerns (userinput, ui, flags) behind a cohesive import for CLI-related functionality.
Package shell aggregates user interaction concerns (userinput, ui, flags) behind a cohesive import for CLI-related functionality.
shell/flagsutil
Package flagsutil provides utility functions for command-line flag validation.
Package flagsutil provides utility functions for command-line flag validation.
shell/input
Package input provides user input handling and validation functionality
Package input provides user input handling and validation functionality
shell/log
Package log provides application-wide logging utilities and typed errors for consistent log level parsing and reporting.
Package log provides application-wide logging utilities and typed errors for consistent log level parsing and reporting.
shell/output
Package output provides styled helpers for user-facing console messages.
Package output provides styled helpers for user-facing console messages.
shell/progress
Package progress provides shared helpers around bubbles progress bars and programs.
Package progress provides shared helpers around bubbles progress bars and programs.
shell/secretinput
Package secretinput provides masked terminal input with temporary reveal support.
Package secretinput provides masked terminal input with temporary reveal support.
shell/theme
Package theme defines the shared color palette and base lipgloss styles.
Package theme defines the shared color palette and base lipgloss styles.
shell/ui
Package ui provides styling and formatting utilities for terminal UI components.
Package ui provides styling and formatting utilities for terminal UI components.
shell/uipreview
Package uipreview renders deterministic terminal UI component previews.
Package uipreview renders deterministic terminal UI component previews.
shell/userinput
Package userinput provides error types for user input operations.
Package userinput provides error types for user input operations.
templating
Package templating aggregates individualization, token generation and detection, as well as variable-value detection behind a cohesive import.
Package templating aggregates individualization, token generation and detection, as well as variable-value detection behind a cohesive import.
templating/detectionutil
Package detectionutil provides helpers for loading detection-related configuration used by variable/token detection logic.
Package detectionutil provides helpers for loading detection-related configuration used by variable/token detection logic.
templating/hashartifact
Package hashartifact renders hash directives into raw and hashed artifacts.
Package hashartifact renders hash directives into raw and hashed artifacts.
templating/individualizer
Package individualizer provides a flexible token replacement and file manipulation system.
Package individualizer provides a flexible token replacement and file manipulation system.
templating/solutiondeletion
Package solutiondeletion applies removal rules to filter solution content from repositories.
Package solutiondeletion applies removal rules to filter solution content from repositories.
templating/tablehash
Package tablehash renders hashed solution tables for work repositories.
Package tablehash renders hashed solution tables for work repositories.
templating/targetprocessing
Package targetprocessing wires built-in cross-target processors.
Package targetprocessing wires built-in cross-target processors.
templating/targetprocessor
Package targetprocessor defines processors that can transform multiple target repository contents together after normal per-target individualization.
Package targetprocessor defines processors that can transform multiple target repository contents together after normal per-target individualization.
templating/tokendetection
Package tokendetection provides functionality to detect and collect tokens in source code.
Package tokendetection provides functionality to detect and collect tokens in source code.
templating/tokendetection/transformers
Package transformers provides various string transformation functions used for generating individualization tokens from class names.
Package transformers provides various string transformation functions used for generating individualization tokens from class names.
templating/variablevalue
Package variablevalue provides detection utilities for spotting values from non-selected variations within individualized content.
Package variablevalue provides detection utilities for spotting values from non-selected variations within individualized content.
version
Package version provides version information for the application.
Package version provides version information for the application.
worker
Package worker provides shared worker pool configuration and execution primitives.
Package worker provides shared worker pool configuration and execution primitives.
scripts
gitlab/seed command
Command gitlab-seed seeds a GitLab instance with example groups and users for local testing and development.
Command gitlab-seed seeds a GitLab instance with example groups and users for local testing and development.
Package web embeds the built GUI assets into the CLI binary.
Package web embeds the built GUI assets into the CLI binary.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL