basic_usage/basic_usage.rs
1use gh_cli_rs::GhClient;
2
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4 let client = GhClient::new();
5
6 // Check if gh CLI is installed
7 let version = client.check_installation()?;
8 println!("✓ GitHub CLI: {}", version.trim());
9
10 // List repositories
11 let repos = client.repo().list().limit(5).execute()?;
12 println!("{}", repos);
13
14 Ok(())
15}