embers-cli 0.2.0

Interactive terminal UI and automation CLI for the Embers terminal multiplexer.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use clap::Parser;
use embers_cli::{Cli, Command, run};
use embers_core::init_tracing;

#[tokio::main]
async fn main() {
    let cli = Cli::parse();
    // The detached server sets up its own rotating file logger in `run_server`;
    // every other invocation logs to stderr here.
    if !matches!(cli.command, Some(Command::Serve)) {
        init_tracing(&cli.log_filter());
    }

    if let Err(error) = run(cli).await {
        eprintln!("{error}");
        std::process::exit(1);
    }
}