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 you through the process of publishing them to GitHub using a TUI.


Challenges and Solutions

System Requirements


Installation

Rust is required.

cargo install --force --git https://github.com/cat2151/cat-gh-repo-creator

First Run

cat-gh-repo-creator

config.toml will be automatically generated, and the application will exit. Please configure the settings below.


Configuration

Upon first launch, config.toml will be automatically generated at the following path:

%LOCALAPPDATA%\cat-gh-repo-creator\config.toml

Edit scan_directory in config.toml to match your environment (an error will occur if not edited).

scan_directory = "C:\\Users\\<YOUR NAME>\\repos"

Execution

cat-gh-repo-creator

Help

cat-gh-repo-creator --help

Checking for Updates

cat-gh-repo-creator check

This compares the commit hash at build time with the latest commit on the main branch of GitHub. It displays the build-time hash as embedded, the latest remote hash as remote, and the result as up-to-date (matches) or update available (differences found).

Update

cat-gh-repo-creator update

This command executes cargo install --force --git https://github.com/cat2151/cat-gh-repo-creator in a separate process and then terminates the main application. After the update is complete, please manually restart cat-gh-repo-creator. Updating requires Rust, Git, and Python in your PATH. If the update command itself does not work, please re-run the installation command.


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]   Confirm copy candidate files found from nearby repositories. y / [N]
    ↓ y
[CopyResult]   Tree display after copying.
    ↓ ENTER
[FetchFiles]   cURL .gitignore / LICENSE.
    ↓ Complete
[FetchResult]  Display fetch results.
    ↓ Automatic
[CreateDialog] Confirm git init to gh repo create settings. y / [N]
    ↓ y
[Executing]    Sequentially executes git init / add / commit / branch -M main / gh repo create, displaying a spinner and "Processing, please wait" every 250ms from the start.
    ↓ Complete
[Done]         Automatically opens the repository page in a browser → ENTER to exit.

If the analysis is NG, or if you choose N in a dialog, you will transition to an interruption dialog, and pressing ENTER will exit the application.


Key Operations

Key Valid 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. Only 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

Target for rewrite Conversion content
repository: owner/old_name repository: owner/<new_repo_name>
baseurl: /old_name baseurl: /<new_repo_name>

Commands executed by gh repo create

git init
git add .
git commit -m "Initial commit (generated via <chosen option>)"  # Choose from Claude chat UI / AI / Free input in the Message field
git branch -M main
gh repo create <repository_name> --public --source=. --remote=origin --push --disable-wiki

After completion, https://github.com/<repository_name> will automatically open in your browser.

Assumptions

What this app aims for

What it does not aim for (Out of scope)