You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(cli): remove unused config.rs and update CLI structure
- Remove unused cli/config.rs file
- Update CLI commands and arguments structure
- Clean up chunk model definitions and other minor refactoring
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: src/cli/args.rs
+35-20Lines changed: 35 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -4,34 +4,49 @@ use std::path::PathBuf;
4
4
#[derive(Parser)]
5
5
#[command(name = "gittype")]
6
6
#[command(
7
-
about = "A typing practice tool using your own code repositories - extracts all code chunks (functions, classes, methods, etc.)"
7
+
about = "A typing practice tool using your own code repositories - extracts all code chunks (functions, classes, methods, etc.)",
8
+
long_about = "GitType turns your own source code into typing challenges. \
9
+
Practice typing by using functions, classes, and methods from your actual projects. \
10
+
\n\nExamples:\n\
11
+
gittype # Use current directory\n\
12
+
gittype /path/to/repo # Use specific repository\n\
13
+
gittype --repo owner/repo # Clone and use GitHub repository\n\
14
+
gittype --langs rust,python # Filter by languages"
8
15
)]
9
-
#[command(version = "0.1.0")]
16
+
#[command(version = env!("CARGO_PKG_VERSION"))]
10
17
pubstructCli{
11
-
/// Repository path to extract code from
12
-
#[arg(value_name = "REPO_PATH")]
18
+
/// Repository path to extract code from (defaults to current directory if not specified)
19
+
#[arg(
20
+
value_name = "REPO_PATH",
21
+
help = "Repository path to extract code from"
22
+
)]
13
23
pubrepo_path:Option<PathBuf>,
14
24
15
-
/// GitHub repository URL or path to clone and play with (e.g., owner/repo, https://github.com/owner/repo, git@github.com:owner/repo.git)
16
-
#[arg(long)]
25
+
/// GitHub repository URL or path to clone and play with
26
+
#[arg(
27
+
long,
28
+
help = "GitHub repository URL or path to clone and play with",
29
+
long_help = "GitHub repository URL or path to clone and play with. \
30
+
Supports formats:\n\
31
+
- owner/repo\n\
32
+
- https://github.com/owner/repo\n\
33
+
- git@github.com:owner/repo.git"
34
+
)]
17
35
pubrepo:Option<String>,
18
36
19
-
/// Filter by programming languages
20
-
#[arg(long, value_delimiter = ',')]
37
+
/// Filter by programming languages (comma-separated)
38
+
#[arg(
39
+
long,
40
+
value_delimiter = ',',
41
+
help = "Filter by programming languages (comma-separated)",
42
+
long_help = "Filter by programming languages (comma-separated). \
0 commit comments