Skip to content

[ Feature Request ] Richer UI options in mods (ANSI support, spinners, layout helpers) #591

Description

@Fletu94

Summary

When building interactive mods, we are limited to displaying raw text strings inside "cmd.ui.select()" and "cmd.ui.notify()". Creating structured layouts or showing background progress currently requires custom ASCII drawing or raw terminal printing, which is complex to keep aligned and does not support native-looking animations like spinners.

Expected Behavior

We would love to see the Mod Harness UI (cmd.ui) enriched with standard CLI primitives:

  1. ANSI Color Support: Allow titles inside selectors to parse standard color codes (e.g. using chalk or ANSI codes) to highlight choices or display clean warnings.
  2. Native Spinners: A simple loading indicator API for long-running processes (e.g., repository checks, configuration setups):
    const spinner = cmd.ui.spinner("Loading configuration...");
    await task();
    spinner.success("Done!");

3.Layout Primitives: Simple helper functions to display dividers or panels without having to manually calculate character lengths and borders in strings.

Providing these primitives natively would allow developers to build premium, consistent community mods that look and feel like built-in features of Command Code.

Actual Behavior

Installing standard Node/Bun packages like ora or @clack/prompts, but they require direct TTY controls which the harness sandbox does not permit.

Steps to reproduce the issue

  1. create a mod

Command Code Version

1.4.2

Operating System

macOS

Terminal/IDE

ghostty

Shell

command

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions