#motd #terminal #cli #system-info

lazy-motd

The perfect MOTD for the elegantly lazy developer. Maximum style, minimal effort.

2 stable releases

Uses new Rust 2024

1.0.9 Sep 5, 2025
1.0.8 Sep 3, 2025

#1213 in Command line utilities

Download history 200/week @ 2025-08-30 125/week @ 2025-09-06 42/week @ 2025-09-13 41/week @ 2025-09-20 51/week @ 2025-09-27 36/week @ 2025-10-04 51/week @ 2025-10-11 66/week @ 2025-10-18 37/week @ 2025-10-25 26/week @ 2025-11-01 32/week @ 2025-11-08 32/week @ 2025-11-15 31/week @ 2025-11-22 26/week @ 2025-11-29 21/week @ 2025-12-06

115 downloads per month
Used in 6 crates

MIT license

12KB
178 lines

lazy-motd

The perfect MOTD for the elegantly lazy developer. Maximum style, minimal effort.

Overview

lazy-motd is a Rust crate that provides a simple, customizable Message of the Day (MOTD) for your command-line applications. With minimal configuration, it displays stylish system information, including package details, build info, environment stats, and copyright notices, all formatted with colorful terminal output.

Features

  • Easy to Use: A single macro lazy_motd!() to generate a professional MOTD.
  • Customizable: Configure package name, build info, mode, timestamp, environment, and copyright details.
  • System Info: Displays OS, CPU, disk, memory, and machine ID with minimal effort.
  • Colorful Output: Uses termcolor for vibrant, terminal-friendly formatting.
  • Lightweight: Minimal dependencies for a lean crate.

Installation

Add lazy-motd to your Cargo.toml:

[dependencies]
lazy-motd = "1"

Usage

Basic usage with default settings:

use lazy_motd::lazy_motd;

fn main() {
    lazy_motd!();
}

Customized MOTD with additional options:

use lazy_motd::lazy_motd;

fn main() {
    lazy_motd!(
        bin = "MyApp",
        build = "Release",
        mode = "Production",
        timestamp = "",
        environment = "",
        copyright = &["Copyright (c) 2025 My Company", "All rights reserved."]
    );
}

Example Output

Running the above code might produce:

  ▲ MyApp 1.0.7 (Release)
  - Timestamp: 2025-09-03 09:49:23
  - Copyright:
    ✓ Copyright (c) 2025 My Company
    ✓ All rights reserved.
  - Environment:
    ✓ Production
    ✓ macOS 14.6.1 darwin 23.5.0
    ✓ Apple M1(8) arm64 apfs 16GB 45%
    ✓ 123e4567-e89b-12d3-a456-426614174000

Building and Running Examples

To try the included demo:

cargo run --example demo

Dependencies

  • chrono: For timestamp formatting.
  • machine-uid: For unique machine ID retrieval.
  • sysinfo: For system information (OS, CPU, memory, disk).
  • termcolor: For colored terminal output.

License

Licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request on the GitHub repository.

Dependencies

~1.8–4MB
~71K SLoC