Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.mogenius.com/llms.txt

Use this file to discover all available pages before exploring further.

With mocli, you can manage your mogenius clusters, browse Kubernetes resources, stream logs, and set up port-forwarding — all from your terminal. The CLI includes an interactive Terminal UI (TUI) that provides k9s-style navigation without requiring a local kubeconfig. Authentication is handled through the mogenius platform, giving you secure access to any connected cluster from anywhere.

Installation

Mac, Linux

Use homebrew to install mocli:
brew tap mogenius/mocli
brew install mocli
On Linux with a headless machine, mocli requires a browser for the initial login. After the first login, your session persists locally.

Windows

scoop bucket add mocli https://github.com/mogenius/homebrew-mocli
scoop install mocli

Getting Started

You need a mogenius account to use mocli. If you don’t have one yet, sign up here.

Login

Run the following command to authenticate. Your browser will open automatically to complete the login:
mocli login
Your session is stored locally, so you only need to log in once per machine.

Terminal UI

Launch the interactive TUI to browse and manage your resources:
mocli
The TUI provides a visual interface for navigating your mogenius organization, clusters, and Kubernetes resources. All keybindings are displayed at the bottom of each screen. The TUI follows a hierarchical navigation pattern: Organization → Cluster → Namespace → Resources
KeyAction
Arrow keysMove up/down
EnterSelect / drill down
EscGo back
qQuit
/Filter list
:Command mode (switch resource types)

Browsing Resources

Once you select a namespace, you’ll see a list of Pods by default. Use command mode (:) to switch between resource types:
  • :pods or :po — Pods
  • :deployments or :deploy — Deployments
  • :services or :svc — Services
  • :statefulsets or :sts — StatefulSets
  • :daemonsets or :ds — DaemonSets
  • :jobs — Jobs
  • :cronjobs or :cj — CronJobs
  • :configmaps or :cm — ConfigMaps
  • :secrets — Secrets
  • :ingresses or :ing — Ingresses
The TUI also supports custom resources (CRDs) — type the resource name in command mode to browse any resource type available in your cluster.

Viewing Logs

Select a Pod and press Enter to view its logs in real-time. If the Pod has multiple containers, you’ll be prompted to select one.
KeyAction
PgUp / PgDnScroll through logs
sToggle autoscroll
wToggle word wrap
EscReturn to resource list

Port Forwarding

From the logs view or resource list, press t to create a port-forward tunnel to the selected Pod. Enter the port mapping (e.g., 8080:80) and the tunnel will be established. Active tunnels persist while the TUI is running. Press Esc from the port-forward view to return to browsing while keeping tunnels open.

CLI Commands

In addition to the TUI, mocli provides direct CLI commands:
# Authentication
mocli login
mocli logout

# Cluster management
mocli cluster connect    # Install the mogenius operator on a cluster
mocli cluster list       # List connected clusters

# Port forwarding
mocli portforward        # Manage port-forward sessions

# Version info
mocli version

Connecting a Cluster

You can use the CLI to install the mogenius operator on your Kubernetes cluster:
  1. In the mogenius UI, add a new cluster
  2. Run the connect command:
    mocli cluster connect
    
  3. Select the cluster from the list that matches your current kube context
  4. Confirm to deploy the operator
The operator will be deployed to your cluster. Verify the connection with mocli cluster list or through the mogenius UI.