View on GitHub

cat-gh-repo-creator

cat-gh-repo-creator

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

System Requirements


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:

In the TUI, targets are displayed in white, and non-targets in gray. The cursor moves only between target directories.


File Copy

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

What This App Aims For

Out of Scope