#terminal-command #framework #cli-framework #command-line-tool #cli

bin+lib mod-cli

A fully customizable, feature-rich CLI framework for Rust. Define commands, prefixes, styled output, and more—built for flexibility and speed.

3 unstable releases

new 0.2.1 Apr 10, 2025
0.2.0 Apr 10, 2025
0.1.0 Apr 10, 2025

#534 in Asynchronous

Download history 298/week @ 2025-04-05

298 downloads per month

Apache-2.0

21KB
363 lines

Rust Logo

ModCLI
RUST CLI FRAMEWORK

Crates.io   Crates.io Downloads   docs.rs   GitHub last commit   GitHub

ModCLI is a lightweight, modular command-line interface (CLI) framework designed for Rust applications. It provides an extendable core, support for dynamic or static command registration, and clean CLI behavior out of the box — without the bloat or config overhead.


Key Features

  • Modular Architecture – Easily register commands via code, JSON, or plugins.
  • Zero-Bloat Core – Minimal dependencies with clean, readable structure.
  • Internal Command Support – Feature-flag toggled command injection for flexible builds.
  • Multiple Binary Support – Build multiple CLI entry points with different responsibilities.
  • Color & Output Utilities – Includes optional support for formatting, tables, and themes.
  • Built for Extension – Clean integration points for loaders, command sources, output formatting, and more.

  • Status

    Pre-release (v0.2.1)
    Active development — core is stable, features are evolving.
    Production use is possible, but interfaces may still evolve until 1.0.


    Use Cases

  • CLI tools that need dynamic or swappable command sets.
  • Binary apps with internal admin or debugging commands.
  • Scriptable daemons or language tools (e.g. HiveScript shell, Torque engine).
  • Systems that need fast, internal-only dev tools during builds.

  • Example

    cargo run --bin modcli ping
    > Pong!
    
    cargo run --bin modcli --features internal-commands hello James
    > Hello, James!
    

    Feature Flags

    Feature Description
    internal-commands Enables built-in test/dev commands like ping, hello
    color Enables CLI output coloring (coming soon)
    json-loader Enables external command loading from JSON config
    frag-support (planned) Integrates with Fragonite-based memory engine


    📌 License

    Licensed under the Apache License, version 2.0 (the "License"); you may not use this software, including, but not limited to the source code, media files, ideas, techniques, or any other associated property or concept belonging to, associated with, or otherwise packaged with this software except in compliance with the License.

    You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0.

    Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

    See the LICENSE file included with this project for the specific language governing permissions and limitations under the License.



    COPYRIGHT © 2025 JAMES GOBER.

    Dependencies

    ~5–13MB
    ~153K SLoC