cat-gh-repo-creator
A Windows application written in Rust that detects local, un-git-managed Rust projects and interactively guides the user through the entire process of publishing them to GitHub using a TUI.
Challenges Addressed
- Previous Challenges
- Easily publish Rust projects generated by a coding agent locally to GitHub.
- While it can be done manually, a tool would make it much easier.
- Solution Provided by This Tool
- Effortless operation via TUI!
System Requirements
- Windows & Rust
- git & gh CLI (ensure you’ve run
gh auth loginbeforehand)
Installation
Rust is required.
cargo install --force --git https://github.com/cat2151/cat-gh-repo-creator
First Run
cat-gh-repo-creator
It will automatically generate config.toml and then exit. Please proceed with the following settings:
Configuration
Upon first launch, config.toml will be automatically generated at the following path:
%LOCALAPPDATA%\cat-gh-repo-creator\config.toml
Please edit scan_directory in config.toml to match your environment (otherwise, it will result in an error).
scan_directory = "C:\\Users\\<YOUR NAME>\\repos"
Execution
cat-gh-repo-creator
Help
cat-gh-repo-creator --help
Workflow
[DirList] Scan results list. Move with j/k, select with ENTER.
↓ ENTER
[RepoInspect] Analysis results (OK/NG) and internal repository tree display.
↓ ENTER (only if OK)
[CopyDialog] Confirmation of candidate files found from nearby repos to copy. y / [N]
↓ y
[CopyResult] Tree display after copying.
↓ ENTER
[FetchFiles] Fetch .gitignore / LICENSE via curl.
↓ Complete
[FetchResult] Display fetched results.
↓ Automatic
[CreateDialog] Confirmation of settings for git init to gh repo create. y / [N]
↓ y
[Executing] Executes git init / add / commit / branch -M main / gh repo create sequentially, displaying a spinner and "Please wait, processing..." every 250ms from the start.
↓ Complete
[Done] Automatically opens the repository page in the browser → Press ENTER to exit.
If analysis is NG, or if ‘N’ is selected in a dialog, it transitions to the interruption dialog, and pressing ENTER will terminate the application.
Key Operations
| Key | Active Screen | Action |
|---|---|---|
j / ↓ |
DirList | Cursor down (moves only to target dirs) |
k / ↑ |
DirList | Cursor up (moves only to target dirs) |
q |
All screens | Exit application |
ENTER |
All screens | Confirm / Next step |
y |
CopyDialog / CreateDialog | Yes (Execute) |
n / N / ENTER |
CopyDialog / CreateDialog | No (to interruption dialog) |
Directory Filter
Directories directly under scan_directory are listed in descending order of creation date, and those that meet both of the following conditions are considered targets:
.git/does not exist.Cargo.tomlexists.
In the TUI, targets are displayed in white, and non-targets in gray. The cursor moves only between target directories.
File Copy
- Repositories with
.git/underscan_directoryare scanned as “nearby repositories”. - For each file configured in
copy_filesin the TOML, the most recently modified file is selected from all nearby repositories and copied. The destination is the root of the target directory selected with ENTER. _config.ymlwill automatically rewrite the following lines after copying:
| Rewrite Target | Conversion Content |
|---|---|
repository: owner/<old_repo_name> |
repository: owner/<new_repo_name> |
baseurl: /<old_repo_name> |
baseurl: /<new_repo_name> |
Commands executed by gh repo create
git init
git add .
git commit -m "Initial commit (generated via Claude chat UI)"
git branch -M main
gh repo create <repository_name> --public --source=. --remote=origin --push --disable-wiki
Upon completion, https://github.com/<repository_name> will automatically open in your browser.
Prerequisites
- This application is for personal use and not intended for others. If you desire similar functionality, it’s recommended to clone the repository or create your own.
- Destructive changes may occur frequently.
What This App Aims For
- Proof of Concept. To demonstrate that a useful personal application can be built using Claude’s free chat (demonstrated).
Out of Scope
- Support. Responding to requests or suggestions.