gitux 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. gitux-0.1.0/.github/workflows/publish.yml +60 -0
  2. gitux-0.1.0/.gitignore +18 -0
  3. gitux-0.1.0/.python-version +1 -0
  4. gitux-0.1.0/LICENSE +21 -0
  5. gitux-0.1.0/PKG-INFO +174 -0
  6. gitux-0.1.0/README.md +143 -0
  7. gitux-0.1.0/main.py +5 -0
  8. gitux-0.1.0/pyproject.toml +57 -0
  9. gitux-0.1.0/scripts/benchmark.py +395 -0
  10. gitux-0.1.0/src/gitux/__init__.py +3 -0
  11. gitux-0.1.0/src/gitux/__main__.py +6 -0
  12. gitux-0.1.0/src/gitux/cli.py +35 -0
  13. gitux-0.1.0/src/gitux/domain/__init__.py +27 -0
  14. gitux-0.1.0/src/gitux/domain/models.py +180 -0
  15. gitux-0.1.0/src/gitux/git/__init__.py +57 -0
  16. gitux-0.1.0/src/gitux/git/commands.py +392 -0
  17. gitux-0.1.0/src/gitux/git/exceptions.py +9 -0
  18. gitux-0.1.0/src/gitux/git/parser.py +83 -0
  19. gitux-0.1.0/src/gitux/presenter/__init__.py +6 -0
  20. gitux-0.1.0/src/gitux/presenter/commit_presenter.py +107 -0
  21. gitux-0.1.0/src/gitux/presenter/repo_presenter.py +119 -0
  22. gitux-0.1.0/src/gitux/ui/__init__.py +1 -0
  23. gitux-0.1.0/src/gitux/ui/app.py +452 -0
  24. gitux-0.1.0/src/gitux/ui/gitux.tcss +323 -0
  25. gitux-0.1.0/src/gitux/ui/widgets/__init__.py +24 -0
  26. gitux-0.1.0/src/gitux/ui/widgets/block_container.py +61 -0
  27. gitux-0.1.0/src/gitux/ui/widgets/branch_screen.py +54 -0
  28. gitux-0.1.0/src/gitux/ui/widgets/changed_files.py +187 -0
  29. gitux-0.1.0/src/gitux/ui/widgets/commit_log.py +197 -0
  30. gitux-0.1.0/src/gitux/ui/widgets/commit_screen.py +110 -0
  31. gitux-0.1.0/src/gitux/ui/widgets/diff_viewer.py +149 -0
  32. gitux-0.1.0/src/gitux/ui/widgets/gitux_footer.py +44 -0
  33. gitux-0.1.0/src/gitux/ui/widgets/header.py +81 -0
  34. gitux-0.1.0/src/gitux/ui/widgets/help_screen.py +74 -0
  35. gitux-0.1.0/src/gitux/ui/widgets/repo_stats_bar.py +212 -0
  36. gitux-0.1.0/src/gitux/utils/__init__.py +1 -0
  37. gitux-0.1.0/tests/__init__.py +0 -0
  38. gitux-0.1.0/tests/unit/__init__.py +0 -0
  39. gitux-0.1.0/tests/unit/test_app_smoke.py +446 -0
  40. gitux-0.1.0/tests/unit/test_block_container.py +22 -0
  41. gitux-0.1.0/tests/unit/test_branch_screen.py +79 -0
  42. gitux-0.1.0/tests/unit/test_changed_files.py +143 -0
  43. gitux-0.1.0/tests/unit/test_commands.py +517 -0
  44. gitux-0.1.0/tests/unit/test_commit_log.py +115 -0
  45. gitux-0.1.0/tests/unit/test_commit_screen.py +256 -0
  46. gitux-0.1.0/tests/unit/test_diff_viewer.py +82 -0
  47. gitux-0.1.0/tests/unit/test_domain.py +205 -0
  48. gitux-0.1.0/tests/unit/test_header.py +140 -0
  49. gitux-0.1.0/tests/unit/test_parser.py +84 -0
  50. gitux-0.1.0/tests/unit/test_presenter.py +162 -0
  51. gitux-0.1.0/tests/unit/test_repo_presenter.py +285 -0
  52. gitux-0.1.0/tests/unit/test_repo_stats_bar.py +293 -0
  53. gitux-0.1.0/uv.lock +270 -0
@@ -0,0 +1,60 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - name: Install uv
15
+ uses: astral-sh/setup-uv@v5
16
+ with:
17
+ python-version: "3.12"
18
+
19
+ - name: Install dependencies
20
+ run: uv sync --all-extras
21
+
22
+ - name: Run tests
23
+ run: uv run pytest -q
24
+
25
+ build:
26
+ needs: [test]
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ - uses: actions/checkout@v4
30
+
31
+ - name: Install uv
32
+ uses: astral-sh/setup-uv@v5
33
+ with:
34
+ python-version: "3.12"
35
+
36
+ - name: Build package
37
+ run: uv build
38
+
39
+ - name: Upload distributions
40
+ uses: actions/upload-artifact@v4
41
+ with:
42
+ name: dist
43
+ path: dist/
44
+
45
+ publish:
46
+ needs: [build]
47
+ runs-on: ubuntu-latest
48
+ environment: pypi
49
+ permissions:
50
+ # Required for Trusted Publishing (OIDC) — no API token needed.
51
+ id-token: write
52
+ steps:
53
+ - name: Download distributions
54
+ uses: actions/download-artifact@v4
55
+ with:
56
+ name: dist
57
+ path: dist/
58
+
59
+ - name: Publish to PyPI
60
+ uses: pypa/gh-action-pypi-publish@release/v1
gitux-0.1.0/.gitignore ADDED
@@ -0,0 +1,18 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
11
+
12
+ # Docs
13
+ docs/
14
+ DESIGN.md
15
+
16
+ # Opencode
17
+ .opencode/
18
+ AGENTS.md
@@ -0,0 +1 @@
1
+ 3.12
gitux-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Hector-2710
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
gitux-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,174 @@
1
+ Metadata-Version: 2.5
2
+ Name: gitux
3
+ Version: 0.1.0
4
+ Summary: A beautiful, minimalist TUI for Git.
5
+ Project-URL: Homepage, https://github.com/Hector-2710/gitux
6
+ Project-URL: Repository, https://github.com/Hector-2710/gitux
7
+ Project-URL: Issues, https://github.com/Hector-2710/gitux/issues
8
+ Project-URL: Changelog, https://github.com/Hector-2710/gitux/releases
9
+ Author: Hector-2710
10
+ License-Expression: MIT
11
+ License-File: LICENSE
12
+ Keywords: developer-tools,git,terminal,textual,tui,version-control
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Environment :: Console
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Operating System :: MacOS
17
+ Classifier: Operating System :: POSIX :: Linux
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Software Development :: Version Control :: Git
22
+ Classifier: Topic :: Terminals
23
+ Requires-Python: >=3.12
24
+ Requires-Dist: psutil>=7.2.2
25
+ Requires-Dist: textual>=8.2.8
26
+ Requires-Dist: typer>=0.27.0
27
+ Provides-Extra: dev
28
+ Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
29
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
30
+ Description-Content-Type: text/markdown
31
+
32
+ # GITUX
33
+
34
+ [![PyPI version](https://img.shields.io/pypi/v/gitux.svg)](https://pypi.org/project/gitux/)
35
+ [![Python versions](https://img.shields.io/pypi/pyversions/gitux.svg)](https://pypi.org/project/gitux/)
36
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/Hector-2710/gitux/blob/main/LICENSE)
37
+
38
+ A beautiful, minimalist TUI for Git.
39
+
40
+ GITUX is a terminal user interface for Git that prioritizes design and user experience. It wraps Git commands in a clean, visually appealing interface — so you can work with Git without leaving the terminal, and enjoy doing it.
41
+
42
+ ## Why GITUX?
43
+
44
+ Most Git TUIs are functional but not beautiful. GITUX is built with the belief that developer tools should be both powerful and pleasant to look at.
45
+
46
+ - **Minimalist** — No clutter, no overwhelming menus. Just what you need.
47
+ - **Beautiful** — Clean colors, thoughtful spacing, modern aesthetics.
48
+ - **Fast** — Direct subprocess calls to Git, no heavy abstractions.
49
+
50
+ ## Features
51
+
52
+ - View repository status with color-coded file states
53
+ - Browse commit history with details
54
+ - Stage and commit files with messages
55
+ - View diffs between files
56
+ - Manage branches (create, switch, delete)
57
+ - Merge branches
58
+ - Push to remote
59
+ - Performance metrics (startup time, memory usage)
60
+
61
+ ## Installation
62
+
63
+ **Recommended — with [pipx](https://pipx.pypa.io/) or [uv](https://docs.astral.sh/uv/) (isolated install):**
64
+
65
+ ```bash
66
+ # With pipx
67
+ pipx install gitux
68
+
69
+ # Or with uv
70
+ uv tool install gitux
71
+ ```
72
+
73
+ **Or with pip:**
74
+
75
+ ```bash
76
+ pip install gitux
77
+ ```
78
+
79
+ > **Requirements:** Python 3.12+ and `git` installed on your system.
80
+
81
+ <details>
82
+ <summary>Install from source (for development)</summary>
83
+
84
+ ```bash
85
+ git clone https://github.com/Hector-2710/gitux.git
86
+ cd gitux
87
+ uv sync --all-extras
88
+ uv run gitux
89
+ ```
90
+ </details>
91
+
92
+ ## Usage
93
+
94
+ Inside any Git repository, just run:
95
+
96
+ ```bash
97
+ gitux
98
+
99
+ # Show version
100
+ gitux --version
101
+ ```
102
+
103
+ ### Keybindings
104
+
105
+ | Key | Action |
106
+ |-----|--------|
107
+ | `Tab` | Next section (Files / Commits / Diff) |
108
+ | `↑` / `↓` or `j` / `k` | Scroll active section |
109
+ | `s` / `Enter` | Stage / unstage file |
110
+ | `a` / `A` | Stage all / unstage all files |
111
+ | `c` | Focus commit message |
112
+ | `Ctrl+Enter` | Create commit |
113
+ | `Ctrl+p` | Push to remote |
114
+ | `r` | Refresh status |
115
+ | `b` | Branches panel |
116
+ | `?` | Show help |
117
+ | `q` | Quit GITUX |
118
+
119
+ ## Stack
120
+
121
+ | Component | Technology | Purpose |
122
+ |-----------|------------|---------|
123
+ | Language | Python 3.12+ | Core runtime |
124
+ | TUI | Textual | Terminal interface with CSS styling |
125
+ | CLI | Typer | Command-line entry point |
126
+ | Git | subprocess + git CLI | Git operations |
127
+ | Metrics | psutil | Performance measurement |
128
+
129
+ ## Development
130
+
131
+ ```bash
132
+ # Install dev dependencies
133
+ uv sync --all-extras
134
+
135
+ # Run tests
136
+ uv run pytest
137
+
138
+ # Run linter
139
+ uv run ruff check .
140
+
141
+ # Format code
142
+ uv run ruff format .
143
+ ```
144
+
145
+ ## Project Structure
146
+
147
+ ```
148
+ gitux/
149
+ ├── src/
150
+ │ └── gitux/
151
+ │ ├── __init__.py
152
+ │ ├── __main__.py
153
+ │ ├── cli.py # Typer entry point
154
+ │ ├── domain/ # Data models
155
+ │ ├── git/ # Git infrastructure
156
+ │ ├── presenter/ # Business logic
157
+ │ ├── ui/ # Textual TUI
158
+ │ ├── metrics/ # Performance metrics
159
+ │ └── utils/ # Config, exceptions
160
+ ├── tests/
161
+ │ ├── unit/
162
+ │ ├── integration/
163
+ │ └── e2e/
164
+ ├── docs/
165
+ │ ├── context.md
166
+ │ ├── container.md
167
+ │ └── diagrams/
168
+ ├── pyproject.toml
169
+ └── README.md
170
+ ```
171
+
172
+ ## License
173
+
174
+ MIT
gitux-0.1.0/README.md ADDED
@@ -0,0 +1,143 @@
1
+ # GITUX
2
+
3
+ [![PyPI version](https://img.shields.io/pypi/v/gitux.svg)](https://pypi.org/project/gitux/)
4
+ [![Python versions](https://img.shields.io/pypi/pyversions/gitux.svg)](https://pypi.org/project/gitux/)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/Hector-2710/gitux/blob/main/LICENSE)
6
+
7
+ A beautiful, minimalist TUI for Git.
8
+
9
+ GITUX is a terminal user interface for Git that prioritizes design and user experience. It wraps Git commands in a clean, visually appealing interface — so you can work with Git without leaving the terminal, and enjoy doing it.
10
+
11
+ ## Why GITUX?
12
+
13
+ Most Git TUIs are functional but not beautiful. GITUX is built with the belief that developer tools should be both powerful and pleasant to look at.
14
+
15
+ - **Minimalist** — No clutter, no overwhelming menus. Just what you need.
16
+ - **Beautiful** — Clean colors, thoughtful spacing, modern aesthetics.
17
+ - **Fast** — Direct subprocess calls to Git, no heavy abstractions.
18
+
19
+ ## Features
20
+
21
+ - View repository status with color-coded file states
22
+ - Browse commit history with details
23
+ - Stage and commit files with messages
24
+ - View diffs between files
25
+ - Manage branches (create, switch, delete)
26
+ - Merge branches
27
+ - Push to remote
28
+ - Performance metrics (startup time, memory usage)
29
+
30
+ ## Installation
31
+
32
+ **Recommended — with [pipx](https://pipx.pypa.io/) or [uv](https://docs.astral.sh/uv/) (isolated install):**
33
+
34
+ ```bash
35
+ # With pipx
36
+ pipx install gitux
37
+
38
+ # Or with uv
39
+ uv tool install gitux
40
+ ```
41
+
42
+ **Or with pip:**
43
+
44
+ ```bash
45
+ pip install gitux
46
+ ```
47
+
48
+ > **Requirements:** Python 3.12+ and `git` installed on your system.
49
+
50
+ <details>
51
+ <summary>Install from source (for development)</summary>
52
+
53
+ ```bash
54
+ git clone https://github.com/Hector-2710/gitux.git
55
+ cd gitux
56
+ uv sync --all-extras
57
+ uv run gitux
58
+ ```
59
+ </details>
60
+
61
+ ## Usage
62
+
63
+ Inside any Git repository, just run:
64
+
65
+ ```bash
66
+ gitux
67
+
68
+ # Show version
69
+ gitux --version
70
+ ```
71
+
72
+ ### Keybindings
73
+
74
+ | Key | Action |
75
+ |-----|--------|
76
+ | `Tab` | Next section (Files / Commits / Diff) |
77
+ | `↑` / `↓` or `j` / `k` | Scroll active section |
78
+ | `s` / `Enter` | Stage / unstage file |
79
+ | `a` / `A` | Stage all / unstage all files |
80
+ | `c` | Focus commit message |
81
+ | `Ctrl+Enter` | Create commit |
82
+ | `Ctrl+p` | Push to remote |
83
+ | `r` | Refresh status |
84
+ | `b` | Branches panel |
85
+ | `?` | Show help |
86
+ | `q` | Quit GITUX |
87
+
88
+ ## Stack
89
+
90
+ | Component | Technology | Purpose |
91
+ |-----------|------------|---------|
92
+ | Language | Python 3.12+ | Core runtime |
93
+ | TUI | Textual | Terminal interface with CSS styling |
94
+ | CLI | Typer | Command-line entry point |
95
+ | Git | subprocess + git CLI | Git operations |
96
+ | Metrics | psutil | Performance measurement |
97
+
98
+ ## Development
99
+
100
+ ```bash
101
+ # Install dev dependencies
102
+ uv sync --all-extras
103
+
104
+ # Run tests
105
+ uv run pytest
106
+
107
+ # Run linter
108
+ uv run ruff check .
109
+
110
+ # Format code
111
+ uv run ruff format .
112
+ ```
113
+
114
+ ## Project Structure
115
+
116
+ ```
117
+ gitux/
118
+ ├── src/
119
+ │ └── gitux/
120
+ │ ├── __init__.py
121
+ │ ├── __main__.py
122
+ │ ├── cli.py # Typer entry point
123
+ │ ├── domain/ # Data models
124
+ │ ├── git/ # Git infrastructure
125
+ │ ├── presenter/ # Business logic
126
+ │ ├── ui/ # Textual TUI
127
+ │ ├── metrics/ # Performance metrics
128
+ │ └── utils/ # Config, exceptions
129
+ ├── tests/
130
+ │ ├── unit/
131
+ │ ├── integration/
132
+ │ └── e2e/
133
+ ├── docs/
134
+ │ ├── context.md
135
+ │ ├── container.md
136
+ │ └── diagrams/
137
+ ├── pyproject.toml
138
+ └── README.md
139
+ ```
140
+
141
+ ## License
142
+
143
+ MIT
gitux-0.1.0/main.py ADDED
@@ -0,0 +1,5 @@
1
+ """Legacy entry point - use 'uv run gitux' instead."""
2
+
3
+ from gitux.cli import app
4
+
5
+ app()
@@ -0,0 +1,57 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "gitux"
7
+ dynamic = ["version"]
8
+ description = "A beautiful, minimalist TUI for Git."
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ license-files = ["LICENSE"]
12
+ authors = [
13
+ { name = "Hector-2710" },
14
+ ]
15
+ keywords = ["git", "tui", "terminal", "textual", "developer-tools", "version-control"]
16
+ requires-python = ">=3.12"
17
+ classifiers = [
18
+ "Development Status :: 4 - Beta",
19
+ "Environment :: Console",
20
+ "Intended Audience :: Developers",
21
+ "Operating System :: MacOS",
22
+ "Operating System :: POSIX :: Linux",
23
+ "Programming Language :: Python :: 3",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Programming Language :: Python :: 3.13",
26
+ "Topic :: Software Development :: Version Control :: Git",
27
+ "Topic :: Terminals",
28
+ ]
29
+ dependencies = [
30
+ "psutil>=7.2.2",
31
+ "textual>=8.2.8",
32
+ "typer>=0.27.0",
33
+ ]
34
+
35
+ [project.optional-dependencies]
36
+ dev = [
37
+ "pytest>=8.0.0",
38
+ "pytest-asyncio>=0.24.0",
39
+ ]
40
+
41
+ [project.urls]
42
+ Homepage = "https://github.com/Hector-2710/gitux"
43
+ Repository = "https://github.com/Hector-2710/gitux"
44
+ Issues = "https://github.com/Hector-2710/gitux/issues"
45
+ Changelog = "https://github.com/Hector-2710/gitux/releases"
46
+
47
+ [project.scripts]
48
+ gitux = "gitux.cli:main"
49
+
50
+ [tool.hatch.version]
51
+ path = "src/gitux/__init__.py"
52
+
53
+ [tool.hatch.build.targets.wheel]
54
+ packages = ["src/gitux"]
55
+
56
+ [tool.pytest.ini_options]
57
+ testpaths = ["tests"]