Adds non-repo bootstrap and publish flows
### Added - Non-repository startup flow offering init-only or init+publish paths. - Provider selection for publishing (GitHub via CLI, Gitea via HTTPS API). - Gitea repository creation and initial push over HTTPS with configurable base URL, owner, and token defaults. - Root README and documentation updates describing bootstrap flow and environment variables.
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
|
||||
This directory contains project documentation for `git-tui`.
|
||||
|
||||
## Entry Points
|
||||
|
||||
- [`README.md`](../README.md) - repository front page and quick start.
|
||||
|
||||
## Modules
|
||||
|
||||
- [`doc/architecture.md`](architecture.md) - architecture and module responsibilities.
|
||||
|
||||
@@ -8,8 +8,12 @@
|
||||
|
||||
- `git-tui`:
|
||||
- Initializes and runs the curses application loop.
|
||||
- Handles startup bootstrap for non-repository directories.
|
||||
- Renders a menu-driven UI with keyboard navigation.
|
||||
- Executes Git subprocess commands and displays command output.
|
||||
- Executes provider-specific publication for new remote repositories:
|
||||
- GitHub via `gh` CLI.
|
||||
- Gitea via HTTPS API and token-authenticated initial push.
|
||||
- Implements file selection for staged and unstaged operations.
|
||||
|
||||
## Public API and Contracts
|
||||
@@ -17,8 +21,11 @@
|
||||
- Command entry point: `git-tui` executable script.
|
||||
- Runtime contract:
|
||||
- Must be executed in a terminal that supports curses.
|
||||
- Must be run from a directory inside a Git working tree.
|
||||
- Must be run from a writable project directory.
|
||||
- Requires `git` to be installed and available in `PATH`.
|
||||
- Requires `gh` in `PATH` only for GitHub publication.
|
||||
- Requires Gitea API token for Gitea publication.
|
||||
- Runs Git subprocesses in non-interactive mode to avoid terminal credential prompt deadlocks.
|
||||
|
||||
## Data Model
|
||||
|
||||
|
||||
22
doc/usage.md
22
doc/usage.md
@@ -5,6 +5,8 @@
|
||||
- Linux or Unix-like terminal environment with curses support.
|
||||
- Python 3 interpreter available as `python3`.
|
||||
- Git installed and available in `PATH`.
|
||||
- GitHub CLI `gh` installed and authenticated for GitHub repository creation. If using Gitea see below.
|
||||
- Gitea API token for Gitea repository creation (read/write permissions for repository and organization) over HTTPS.
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -19,11 +21,29 @@
|
||||
|
||||
## Running
|
||||
|
||||
- Enter any Git repository and run:
|
||||
- Run from any project directory:
|
||||
```bash
|
||||
gtui
|
||||
```
|
||||
|
||||
## Non-Repository Bootstrap Flow
|
||||
|
||||
- If the current directory is not a Git repository, `git-tui` offers setup actions:
|
||||
- Initialize repository only.
|
||||
- Initialize and publish to a new remote repository.
|
||||
- Initialize and publish flow:
|
||||
- Chooses publishing provider: GitHub or Gitea.
|
||||
- Initializes a local Git repository.
|
||||
- Stages all current files.
|
||||
- Creates an initial commit.
|
||||
- GitHub option creates and pushes via `gh repo create --source=. --remote=origin --push`.
|
||||
- Gitea option creates via HTTPS API, configures `origin`, and pushes with HTTPS authentication using the provided token.
|
||||
- Optional Gitea environment variables:
|
||||
- `GITEA_URL` or `GITEA_BASE_URL` for instance URL default.
|
||||
- `GITEA_OWNER` for default owner or organization.
|
||||
- `GITEA_TOKEN` or `GITEA_ACCESS_TOKEN` for API token default.
|
||||
- Git credential prompts are disabled inside `git-tui`; authentication issues are reported in the UI instead of opening an interactive terminal prompt.
|
||||
|
||||
## Key Commands in UI
|
||||
|
||||
- Main menu:
|
||||
|
||||
Reference in New Issue
Block a user