pgpt 0.2.0

A CLI to ask ChatGPT anything with pretty markdown rendering (Pretty GPT)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use anyhow::Context;
use pgpt::config;

fn main() -> anyhow::Result<()> {
    match config::Config::parse_args() {
        config::ParsedArgs::Query { args } => {
            let config =
                config::Config::load_config().with_context(|| format!("Failed to load config."))?;
            pgpt::run_query(args, config)
        }
        config::ParsedArgs::Config { config } => config::Config::handle_config(&config),
    }
}