Contributing
Local Plugin Development
sitectl has a core binary and optional plugin binaries named sitectl-<plugin>.
The current local development plugin chain in this workspace is:
sitectlsitectl-islesitectl-drupal
sitectl owns the operator-facing command shape. Plugins extend that behavior through internal extension commands that are dispatched based on the active context plugin.
Examples:
sitectl debugsitectl component describesitectl component set isle/fcrepo
isle, core sitectl routes the request to sitectl-isle. The ISLE plugin can then extend the result further by invoking included plugins such as sitectl-drupal.
Local Install Workflow
For local development, install the binaries into/usr/local/bin so the core binary can discover and invoke plugin binaries through PATH.
Run this from the core repo:
- Build and install
sitectl - Change into
../sitectl-isleand runmake install - Change into
../sitectl-drupaland runmake install
install targets run make work before building so they use the local core sitectl checkout during development.
If you are only working on a plugin, you can also install it directly:
Why Use make install
This matters for plugin chaining.
If you only rebuild sitectl locally but do not install the plugin binaries into a directory on PATH, core command dispatch will not see the current local plugin builds. Installing the full chain keeps the stack aligned while you work on:
- core command routing in
sitectl - stack logic in
sitectl-isle - Drupal-specific extensions in
sitectl-drupal
UI Architecture
sitectl supports two interaction modes:
- one-off command execution such as
sitectl compose ps - an embedded dashboard launched by running
sitectlwith no additional arguments
Rule
When a command needs interactive UI:- keep business logic separate from UI state and rendering
- make the UI self-contained inside the command or shared UI package
- ensure the same UI can run standalone or be embedded inside the dashboard
- service layer: pure command logic and side effects
- UI layer: Bubble Tea model and Bubbles-based components
- Cobra layer: chooses between non-interactive execution and launching the UI
Required Libraries
Interactivesitectl UIs should build on the shared stack already in use:
bubbleteafor state, events, and screen managementbubblesfor list, help, input, viewport, progress, and similar primitiveslipglossfor styling and layoutbubblezonefor click targets and mouse hit detection where neededharmonicafor motion and transitions where appropriatentchartsfor terminal charts where appropriate
What Not To Do
Do not implement custom terminal widgets when the library stack already provides them. Examples:- do not hand-roll a select menu when
bubbles/listfits - do not hand-roll a text input when
bubbles/textinputortextareafits - do not hand-roll help footers when
bubbles/helpfits - do not hand-roll scroll containers when
bubbles/viewportfits
lipgloss should be used for presentation and composition, not as a replacement for Bubble Tea or Bubbles interaction primitives.
Shared Components
Reusable interaction primitives should live in shared UI packages so commands and the dashboard can both consume them. Current direction:- shared prompt, select, and input components belong in
pkg/ui - command-specific interactive screens can live near the command, but should still be Bubble Tea models
- older bespoke prompt implementations should be migrated to shared Bubble Tea and Bubbles components over time
Design Goal
A command that has an interactive flow should be embeddable in the dashboard without rewriting its UI logic. That means a command UI should be structured so it can be:- launched directly from Cobra
- pushed or mounted inside the dashboard
Release Publishing
GoReleaser builds the release artifacts, including Linux packages vianfpms.
- GitHub release publishing runs from goreleaser.yaml
Linux package publishing
This repo also publishes Debian and RPM repositories through the shared libops packaging infrastructure. GitHub Actions workflow:- publish-apt-repo.yaml
- shared publishing script: publish-package-repo.sh
HOMEBREW_REPO: token used by GoReleaser for release publishing
LIBOPS_PACKAGES_GCLOUD_OIDC_POOL: Workload Identity provider resource nameLIBOPS_PACKAGES_GCLOUD_PROJECT: Google Cloud project ID that holds the package infrastructureLIBOPS_PACKAGES_GSA: Google service account email used by GitHub ActionsLIBOPS_PACKAGES_GCS_BUCKET: bucket name that hosts the published package repositoryLIBOPS_PACKAGES_APTLY_GPG_KEY_ID: GPG key ID or fingerprint to use for signingLIBOPS_PACKAGES_APTLY_GPG_PRIVATE_KEY_SECRET: Secret Manager secret ID that stores the armored private keyLIBOPS_PACKAGES_APTLY_GPG_PASSPHRASE_SECRET: Secret Manager secret ID that stores the signing key passphrase
GCS_BUCKET_PREFIXdefault: emptyAPTLY_DISTRIBUTIONSdefault:bookwormAPTLY_COMPONENTdefault:mainAPTLY_ARCHITECTURESdefault:amd64,arm64APTLY_PUBLISH_PREFIXdefault:.APTLY_ORIGINdefault:libopsAPTLY_LABELdefault:sitectlAPTLY_PUBLIC_KEY_NAMEdefault:sitectl-archive-keyringRPM_REPOSITORY_PATHdefault:rpm

