gitcontrol 0.1.0__py3-none-any.whl

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.
gitcontrol/__init__.py ADDED
@@ -0,0 +1,3 @@
1
+ """Launcher do binário Go do gitcontrol empacotado no wheel."""
2
+
3
+ __version__ = "0.1.0"
gitcontrol/__main__.py ADDED
@@ -0,0 +1,46 @@
1
+ """Ponto de entrada: executa o binário Go correspondente à plataforma."""
2
+
3
+ import os
4
+ import platform
5
+ import stat
6
+ import subprocess
7
+ import sys
8
+ from pathlib import Path
9
+
10
+ _BIN_DIR = Path(__file__).resolve().with_name("bin")
11
+
12
+
13
+ def target_binary() -> Path:
14
+ """Mapeia plataforma/arquitetura para o binário embutido no wheel."""
15
+ if sys.platform.startswith("win"):
16
+ os_name, ext = "windows", ".exe"
17
+ elif sys.platform == "darwin":
18
+ os_name, ext = "darwin", ""
19
+ else:
20
+ os_name, ext = "linux", ""
21
+
22
+ machine = platform.machine().lower()
23
+ arch = "arm64" if machine in ("arm64", "aarch64") else "amd64"
24
+ return _BIN_DIR / f"gitcontrol-{os_name}-{arch}{ext}"
25
+
26
+
27
+ def main() -> int:
28
+ binary = target_binary()
29
+ if not binary.exists():
30
+ print(
31
+ f"gitcontrol: binário não encontrado para esta plataforma: {binary.name}",
32
+ file=sys.stderr,
33
+ )
34
+ return 1
35
+
36
+ if os.name != "nt":
37
+ mode = binary.stat().st_mode
38
+ binary.chmod(mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)
39
+ os.execv(str(binary), [str(binary), *sys.argv[1:]])
40
+ return 127
41
+
42
+ return subprocess.call([str(binary), *sys.argv[1:]])
43
+
44
+
45
+ if __name__ == "__main__":
46
+ raise SystemExit(main())
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,169 @@
1
+ Metadata-Version: 2.4
2
+ Name: gitcontrol
3
+ Version: 0.1.0
4
+ Summary: Gerenciador de Git com TUI, CLI JSON e app desktop
5
+ Author: rhyan05
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/rhyan05/gitcontrol
8
+ Project-URL: Source, https://github.com/rhyan05/gitcontrol
9
+ Project-URL: Issues, https://github.com/rhyan05/gitcontrol/issues
10
+ Keywords: git,tui,cli,git-manager
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Operating System :: MacOS
15
+ Classifier: Operating System :: Microsoft :: Windows
16
+ Classifier: Operating System :: POSIX :: Linux
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Topic :: Software Development :: Version Control :: Git
19
+ Requires-Python: >=3.9
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Dynamic: license-file
23
+
24
+ # gitcontrol
25
+
26
+ Gerenciador de Git com três interfaces sobre o mesmo core:
27
+
28
+ - **TUI** em Go/Bubble Tea para operar tudo pelo terminal.
29
+ - **CLI JSON** (`gitcontrol --json`) com contrato estável para automação.
30
+ - **Desktop** em Tauri + React para uma experiência visual.
31
+
32
+ ![Interface do gitcontrol](desktop/docs/gitcontrol.png)
33
+
34
+ ## O que funciona
35
+
36
+ - Branches: listar, checkout (local e remota com tracking), merge.
37
+ - Commits: log, grafo ASCII, diff completo, cherry-pick.
38
+ - Working tree: status, diff de arquivo, stage/unstage por arquivo, commit.
39
+ - Remotos: fetch, pull e push (com upstream automático no primeiro push).
40
+ - Conflitos: marcar resolvido, abortar e continuar merge/cherry-pick; edição no
41
+ editor do sistema/TUI.
42
+ - Multi-repo: vários repositórios abertos com troca de ativo.
43
+ - Refresh automático na TUI (fsnotify + timer) e na GUI (polling curto).
44
+ - Instaladores Windows: `.msi` e `.exe` (NSIS).
45
+
46
+ ## Instalação
47
+
48
+ ### PyPI (CLI + TUI)
49
+
50
+ ```powershell
51
+ pip install gitcontrol
52
+ gitcontrol --version
53
+ gitcontrol
54
+ ```
55
+
56
+ ### Go
57
+
58
+ ```powershell
59
+ go install github.com/rhyan05/gitcontrol/cmd/gitcontrol@latest
60
+ ```
61
+
62
+ ### Desktop
63
+
64
+ Baixe o `.msi` ou o instalador NSIS na página de releases do GitHub.
65
+
66
+ ## Arquitetura
67
+
68
+ ```text
69
+ cmd/gitcontrol/ entrada única: TUI, --json ou --version
70
+ internal/git/ core Go (status, log, grafo, remotes, conflitos, ações)
71
+ internal/cli/ contrato JSON (envelope ok/data ou ok/error)
72
+ packaging/pypi/ wheel universal com os binários Go embutidos
73
+ desktop/ app Tauri + React + Tailwind v4
74
+ src/ UI (componentes, features, hooks, sidecar client)
75
+ src-tauri/ runtime Rust, sidecar e ícones
76
+ ```
77
+
78
+ O desktop não reimplementa Git: ele chama o sidecar `gitcontrol --json`, que é
79
+ o mesmo binário do core testado em Go.
80
+
81
+ ## Requisitos
82
+
83
+ - Go 1.27+
84
+ - Node.js 22+ e npm
85
+ - Rust 1.90+ com toolchain MSVC
86
+ - Visual Studio Build Tools com **Desktop development with C++**
87
+ - WebView2 Runtime (Windows)
88
+
89
+ ## TUI / CLI
90
+
91
+ ```powershell
92
+ go test ./...
93
+ go run ./cmd/gitcontrol # abre a TUI
94
+ go run ./cmd/gitcontrol --version
95
+ go run ./cmd/gitcontrol --json --repo . status
96
+ go run ./cmd/gitcontrol --json log
97
+ go run ./cmd/gitcontrol --json graph
98
+ go run ./cmd/gitcontrol --json branches
99
+ go run ./cmd/gitcontrol --json show <hash>
100
+ go run ./cmd/gitcontrol --json diff <path>
101
+ go run ./cmd/gitcontrol --json remotes
102
+ go run ./cmd/gitcontrol --json fetch [remote]
103
+ go run ./cmd/gitcontrol --json pull [remote] [branch]
104
+ go run ./cmd/gitcontrol --json push [remote] [branch]
105
+ go run ./cmd/gitcontrol --json checkout <branch>
106
+ go run ./cmd/gitcontrol --json merge <branch>
107
+ go run ./cmd/gitcontrol --json cherry-pick <hash>
108
+ go run ./cmd/gitcontrol --json resolve <path...>
109
+ go run ./cmd/gitcontrol --json abort
110
+ go run ./cmd/gitcontrol --json continue
111
+ go run ./cmd/gitcontrol --json stage <path...>
112
+ go run ./cmd/gitcontrol --json unstage <path...>
113
+ go run ./cmd/gitcontrol --json commit "mensagem"
114
+ ```
115
+
116
+ O contrato é sempre um objeto JSON:
117
+
118
+ ```json
119
+ {"ok":true,"data":{...}}
120
+ {"ok":false,"error":{"code":"git_error","message":"..."}}
121
+ ```
122
+
123
+ Exit code `0` em sucesso e `1` em erro.
124
+
125
+ Teclas da TUI: `/` não se aplica; use `tab` para trocar de painel, `j/k` para
126
+ mover, `enter` para checkout/diff, `d` para diff do arquivo, `s/u` para
127
+ stage/unstage, `c` para commit, `M` merge, `C` cherry-pick, `f` fetch, `p` pull,
128
+ `P` push, `a` abortar conflito, `x` continuar conflito, `e` editar arquivo em
129
+ conflito e `[`/`]` para trocar de repositório.
130
+
131
+ ## Desktop
132
+
133
+ ```powershell
134
+ cd desktop
135
+ npm install
136
+ npm run tauri -- dev
137
+ ```
138
+
139
+ O `beforeDevCommand` compila o sidecar automaticamente (`npm run sidecar`) e
140
+ inicia o Vite. Para gerar os instaladores:
141
+
142
+ ```powershell
143
+ cd desktop
144
+ npm run tauri -- build
145
+ ```
146
+
147
+ Artefatos:
148
+
149
+ - `desktop/src-tauri/target/release/bundle/msi/gitcontrol_0.1.0_x64_en-US.msi`
150
+ - `desktop/src-tauri/target/release/bundle/nsis/gitcontrol_0.1.0_x64-setup.exe`
151
+
152
+ Atalhos da GUI: `/` busca, `r` atualiza, `Ctrl/Cmd+K` abre a paleta de comandos,
153
+ `Esc` fecha diálogos. O painel de diff é redimensionável pela alça acima dele.
154
+
155
+ ## Qualidade
156
+
157
+ ```powershell
158
+ go test ./...
159
+ go vet ./...
160
+ cd desktop
161
+ npm run lint
162
+ npm run test
163
+ npm run build
164
+ cargo check --manifest-path src-tauri/Cargo.toml
165
+ ```
166
+
167
+ ## Licença
168
+
169
+ MIT. Veja [LICENSE](LICENSE).
@@ -0,0 +1,13 @@
1
+ gitcontrol/__init__.py,sha256=ftxfvbbqYjfjy0hjNE3TuOG-qhWmI_kyXBNxTfeLrrU,88
2
+ gitcontrol/__main__.py,sha256=QXZ2F8Pgj2KhdnouqkL27rWurY6JteyUkcYQ2JLuiwY,1259
3
+ gitcontrol/bin/gitcontrol-darwin-amd64,sha256=t-XaXunx0wfLJQZa-WPRbYU1sBEC9ZXDjHBNjh5k35U,4494512
4
+ gitcontrol/bin/gitcontrol-darwin-arm64,sha256=n8q6di4mrtFecKUk-1429HY3VEgT5xX-JrKuDUvyP8s,4236610
5
+ gitcontrol/bin/gitcontrol-linux-amd64,sha256=YyT3e8HDf-HkBn-xfOs9XCd2WlW4PvgsMRjv7QMiAsk,4472992
6
+ gitcontrol/bin/gitcontrol-linux-arm64,sha256=d-mPd0sx0h7n1WWg67l5sGLawCUjsyZGO8-qF4eTwcY,4260000
7
+ gitcontrol/bin/gitcontrol-windows-amd64.exe,sha256=UNE0sjzzfcNGe4o4kc1UNFV_xkmUfSR8xrGmHo_OGgw,4682240
8
+ gitcontrol-0.1.0.dist-info/licenses/LICENSE,sha256=F3tardNQx3ThfJ-OhW0raKBMc67ijvCkyEIM_CZioV4,1064
9
+ gitcontrol-0.1.0.dist-info/METADATA,sha256=Dwz81oFttTx8rbxSIUS1HkSbEZ4zpIRUCCfGsieIM-k,5305
10
+ gitcontrol-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
11
+ gitcontrol-0.1.0.dist-info/entry_points.txt,sha256=ixrcM0TW6UPK8N0li1afwoNc0Ip0tlnY3FLiqxZtvis,56
12
+ gitcontrol-0.1.0.dist-info/top_level.txt,sha256=S2hZg1vkfLMdv7ZDYSQzuEdQKEHLFgzeDiaeWSx1P5c,11
13
+ gitcontrol-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ gitcontrol = gitcontrol.__main__:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 rhyan05
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.
@@ -0,0 +1 @@
1
+ gitcontrol