1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! # GitHub Code Searcher
//!
//! A powerful, concurrent CLI tool for searching code across GitHub repositories
//! with advanced rate-limit handling and progress visualization.
//!
//! ## Features
//!
//! - **Efficient Code Searching**: Search GitHub's codebase for specific keywords or phrases
//! - **Concurrent Execution**: Run multiple searches in parallel with configurable concurrency
//! - **Smart Rate-Limit Handling**: Automatically detects and waits for GitHub API rate limits with visual feedback
//! - **Detailed Progress Tracking**: Real-time progress indicators for each search term
//! - **Pagination Support**: Configure maximum pages per search term
//! - **JSON Output**: Structured output format for post-processing
//!
//! ## Example Usage
//!
//! ```bash
//! # Basic usage
//! github-code-searching --words "rust concurrency" "tokio async" --token YOUR_GITHUB_TOKEN
//!
//! # Search with environment variable for token
//! export GITHUB_TOKEN=your_github_token
//! github-code-searching -w "axum router" "rocket framework"
//!
//! # Control concurrency and output location
//! github-code-searching -w "security vulnerability" "authentication bypass" -c 3 -o security_findings.json
//!
//! # Limit pages per search term
//! github-code-searching -w "kubernetes operator" -p 5
//! ```
use GitHubSearcher;
use Args;
use dotenv;
use Error;
use info;
use Parser;
/// Main entry point for the GitHub Code Searcher application.
/// Parses command-line arguments, initializes the searcher,
/// and runs the search operations.
async