cli

module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: Apache-2.0

README

KubeRocketCI CLI

❗ Please refer to the KubeRocketCI documentation to get the notion of the main concepts and guidelines.

Command-line interface for the KubeRocketCI platform — enables developers and AI agents to manage projects, deployments, pipelines, and environments from the terminal.

Overview

krci is a CLI client that interacts with KubeRocketCI platform resources via Kubernetes API. It provides secure OIDC-based authentication with Keycloak and styled terminal output for human users, with JSON output for automation and AI agent workflows.

Features

  • Authentication — OIDC Authorization Code + PKCE flow with Keycloak, encrypted token storage (AES-256-GCM), OS keyring integration
  • Projects — List and inspect Codebase resources
  • Deployments — List and inspect CDPipeline and Stage resources (planned)
  • Output — Styled tables for terminals, plain text for pipes, JSON for automation

Installation

brew tap KubeRocketCI/homebrew-tap
brew install krci

Or download a binary from GitHub Releases.

Quick Start

# Authenticate with your KubeRocketCI instance
krci auth login --issuer-url https://your-keycloak/realms/your-realm

# Check auth status
krci auth status

# List projects
krci project list

# Get project details
krci project get my-app

# JSON output for scripting
krci project list -o json

Prerequisites

  • Go 1.26+ (for building from source)
  • Access to a KubeRocketCI instance with Keycloak configured

Building

make build

License

Apache License 2.0

Directories

Path Synopsis
cmd
krci command
Package main is the entry point for the krci CLI.
Package main is the entry point for the krci CLI.
internal
auth
Package auth provides OIDC authentication for the krci CLI.
Package auth provides OIDC authentication for the krci CLI.
cmdutil
Package cmdutil provides shared CLI utilities, including the Factory dependency container.
Package cmdutil provides shared CLI utilities, including the Factory dependency container.
config
Package config provides configuration loading for the krci CLI.
Package config provides configuration loading for the krci CLI.
iostreams
Package iostreams provides I/O stream abstractions for CLI commands.
Package iostreams provides I/O stream abstractions for CLI commands.
k8s
Package k8s provides Kubernetes API access for the krci CLI.
Package k8s provides Kubernetes API access for the krci CLI.
output
Package output provides rendering utilities for CLI command output.
Package output provides rendering utilities for CLI command output.
portal
Package portal provides a client for the KubeRocketCI Portal public API.
Package portal provides a client for the KubeRocketCI Portal public API.
token
Package token provides encrypted token persistence for the krci CLI.
Package token provides encrypted token persistence for the krci CLI.
pkg
cmd/auth
Package auth implements the "krci auth" command group.
Package auth implements the "krci auth" command group.
cmd/auth/login
Package login implements the "krci auth login" command.
Package login implements the "krci auth login" command.
cmd/auth/logout
Package logout implements the "krci auth logout" command.
Package logout implements the "krci auth logout" command.
cmd/auth/status
Package status implements the "krci auth status" command.
Package status implements the "krci auth status" command.
cmd/deployment
Package deployment implements the "krci deployment" command group.
Package deployment implements the "krci deployment" command group.
cmd/deployment/get
Package get implements the "krci deployment get" command.
Package get implements the "krci deployment get" command.
cmd/deployment/list
Package list implements the "krci deployment list" command.
Package list implements the "krci deployment list" command.
cmd/project
Package project implements the "krci project" command group.
Package project implements the "krci project" command group.
cmd/project/get
Package get implements the "krci project get" command.
Package get implements the "krci project get" command.
cmd/project/list
Package list implements the "krci project list" command.
Package list implements the "krci project list" command.
cmd/root
Package root assembles the top-level cobra.Command for the krci CLI.
Package root assembles the top-level cobra.Command for the krci CLI.
cmd/version
Package version implements the "krci version" command.
Package version implements the "krci version" command.

Jump to

Keyboard shortcuts

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