polyte-cli 0.4.0

CLI tool for querying Polymarket Gamma API
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use clap::{CommandFactory, Parser};
use clap_complete::{generate, Shell};

#[derive(Parser)]
pub struct CompletionsCommand {
    /// Shell to generate completions for
    #[arg(value_enum)]
    shell: Shell,
}

impl CompletionsCommand {
    pub fn run<C: CommandFactory>(&self) {
        let mut cmd = C::command();
        generate(self.shell, &mut cmd, "polyte", &mut std::io::stdout());
    }
}