skillctl 0.1.1

CLI tool to manage your personal Claude skills library across projects
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::io::IsTerminal;

#[derive(Clone, Copy, Debug)]
pub struct Context {
    pub interactive: bool,
    pub json: bool,
}

impl Context {
    pub fn from_flags(force_non_interactive: bool, json: bool) -> Self {
        let tty = std::io::stdin().is_terminal() && std::io::stdout().is_terminal();
        Self {
            interactive: !force_non_interactive && !json && tty,
            json,
        }
    }
}