3.9 KiB
3.9 KiB
Usage Guide
Quick Start
-
Navigate to any code repository:
cd /path/to/your/project -
Start typing practice (uses current directory by default):
gittype -
Or specify a specific repository:
gittype /path/to/another/repo -
Or clone and use a GitHub repository:
gittype --repo unhappychoice/gittype -
Play with cached repositories interactively:
gittype repo play -
Discover trending repositories:
gittype trending gittype trending rust
Command Line Options
gittype [OPTIONS] [REPO_PATH] [COMMAND]
Note: REPO_PATH is optional and defaults to the current directory (.) if not specified.
Basic Options
| Option | Description | Default |
|---|---|---|
--repo |
GitHub repository URL or path to clone and use | None |
--langs |
Filter by programming languages (comma-separated) | All supported |
--config |
Path to a custom configuration file | None |
Examples
# Practice with Rust and TypeScript files only
gittype --langs rust,typescript
Custom Excludes with .gittypeignore
If your repository vendors third-party code, create a .gittypeignore file at the repository root.
Each non-empty line is parsed with .gitignore-style syntax (comments, rooted paths like /vendor/, etc.).
# Example .gittypeignore
/vendor/
**/third_party/**
Commands
View Session History
gittype history
Show session history.
Show Analytics
gittype stats
Show analytics.
Export Session Data
gittype export [OPTIONS]
Export session data.
| Option | Description | Default |
|---|---|---|
--format |
Export format | json |
--output |
Output file path | stdout |
Example:
# Export history to a JSON file
gittype export --output history.json
Manage Challenge Cache
gittype cache <COMMAND>
Cache Commands:
gittype cache stats- Show cache statisticsgittype cache clear- Clear all cached challengesgittype cache list- List cached repository keys
Manage Repositories
gittype repo <COMMAND>
Repository Commands:
gittype repo list- List all cached repositoriesgittype repo clear [--force]- Clear all cached repositoriesgittype repo play- Play a cached repository interactively
Practice with Trending Repositories
gittype trending [LANGUAGE] [OPTIONS]
Discover and practice typing with trending GitHub repositories. Repositories are cached and updated automatically.
Options:
| Option | Description | Default |
|---|---|---|
LANGUAGE |
Programming language to filter repositories | All languages |
--period |
Time period for trending (daily, weekly, monthly) | daily |
Supported Languages:
- C, C#, C++, Dart, Elixir, Erlang, Go, Haskell, Java, JavaScript, Kotlin, PHP, Python, Ruby, Rust, Scala, Swift, TypeScript, Zig
Examples:
# Browse trending repositories interactively (all languages)
gittype trending
# Show trending Rust repositories for interactive selection
gittype trending rust
# Show weekly trending Python repositories
gittype trending python --period weekly
# Show monthly trending repositories for all languages
gittype trending --period monthly
How it works:
- Interactive Selection: When no specific repository is provided, GitType shows an interactive list of trending repositories
- Language Filtering: Specify a language to see only repositories in that programming language
- Direct Repository Selection: Provide a repository name to search for and play with that specific repository
- Automatic Caching: Trending data is cached to reduce API calls and improve performance
- Seamless Integration: Selected repositories are automatically cloned and ready for typing practice