clified 0.4.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.
- clified-0.4.0/.gitignore +34 -0
- clified-0.4.0/LICENSE +21 -0
- clified-0.4.0/PKG-INFO +181 -0
- clified-0.4.0/README.md +148 -0
- clified-0.4.0/config/clified.yml.example +17 -0
- clified-0.4.0/config/gamedev-constraints.txt.example +5 -0
- clified-0.4.0/config/install-all-constraints.txt +2 -0
- clified-0.4.0/examples/tools.denv.yaml.example +17 -0
- clified-0.4.0/examples/tools.gamedev.yaml.example +63 -0
- clified-0.4.0/examples/tools.pc.yaml.example +17 -0
- clified-0.4.0/install.bat +34 -0
- clified-0.4.0/install.ps1 +70 -0
- clified-0.4.0/install.sh +103 -0
- clified-0.4.0/pyproject.toml +157 -0
- clified-0.4.0/src/clified/__init__.py +3 -0
- clified-0.4.0/src/clified/__main__.py +7 -0
- clified-0.4.0/src/clified/bundled/__init__.py +0 -0
- clified-0.4.0/src/clified/bundled/config/clified.yml.example +17 -0
- clified-0.4.0/src/clified/bundled/config/gamedev-constraints.txt.example +5 -0
- clified-0.4.0/src/clified/bundled/config/install-all-constraints.txt +2 -0
- clified-0.4.0/src/clified/bundled/examples/tools.denv.yaml.example +17 -0
- clified-0.4.0/src/clified/bundled/examples/tools.gamedev.yaml.example +63 -0
- clified-0.4.0/src/clified/bundled/examples/tools.pc.yaml.example +17 -0
- clified-0.4.0/src/clified/bundled/tools.yaml.example +8 -0
- clified-0.4.0/src/clified/cli/__init__.py +19 -0
- clified-0.4.0/src/clified/cli/app.py +56 -0
- clified-0.4.0/src/clified/cli/decorators.py +61 -0
- clified-0.4.0/src/clified/cli/output.py +103 -0
- clified-0.4.0/src/clified/cli/progress.py +106 -0
- clified-0.4.0/src/clified/core/__init__.py +56 -0
- clified-0.4.0/src/clified/core/circuit_breaker.py +195 -0
- clified-0.4.0/src/clified/core/config.py +113 -0
- clified-0.4.0/src/clified/core/exceptions.py +56 -0
- clified-0.4.0/src/clified/core/paths.py +72 -0
- clified-0.4.0/src/clified/core/retry.py +179 -0
- clified-0.4.0/src/clified/core/state_store.py +117 -0
- clified-0.4.0/src/clified/hooks/__init__.py +18 -0
- clified-0.4.0/src/clified/hooks/mcp.py +36 -0
- clified-0.4.0/src/clified/hooks/pytorch.py +72 -0
- clified-0.4.0/src/clified/hooks/skills.py +68 -0
- clified-0.4.0/src/clified/installer/__init__.py +45 -0
- clified-0.4.0/src/clified/installer/__main__.py +7 -0
- clified-0.4.0/src/clified/installer/base.py +442 -0
- clified-0.4.0/src/clified/installer/bootstrap.py +57 -0
- clified-0.4.0/src/clified/installer/bun_installer.py +232 -0
- clified-0.4.0/src/clified/installer/python_installer.py +380 -0
- clified-0.4.0/src/clified/installer/registry.py +290 -0
- clified-0.4.0/src/clified/installer/rust_installer.py +177 -0
- clified-0.4.0/src/clified/installer/unified.py +574 -0
- clified-0.4.0/src/clified/integrations/__init__.py +9 -0
- clified-0.4.0/src/clified/integrations/mcp.py +91 -0
- clified-0.4.0/src/clified/logging.py +114 -0
- clified-0.4.0/src/clified/paths.py +103 -0
- clified-0.4.0/src/clified/patterns/__init__.py +20 -0
- clified-0.4.0/src/clified/patterns/base.json +287 -0
- clified-0.4.0/src/clified/patterns/loader.py +251 -0
- clified-0.4.0/src/clified/patterns/reporter.py +50 -0
- clified-0.4.0/src/clified/patterns/services/build.json +56 -0
- clified-0.4.0/src/clified/patterns/services/python.json +31 -0
- clified-0.4.0/tools.yaml.example +58 -0
clified-0.4.0/.gitignore
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.eggs/
|
|
6
|
+
dist/
|
|
7
|
+
build/
|
|
8
|
+
*.egg
|
|
9
|
+
.mypy_cache/
|
|
10
|
+
.pytest_cache/
|
|
11
|
+
.ruff_cache/
|
|
12
|
+
.coverage
|
|
13
|
+
htmlcov/
|
|
14
|
+
|
|
15
|
+
# Ambientes locais
|
|
16
|
+
.installer-venv/
|
|
17
|
+
.venv/
|
|
18
|
+
venv/
|
|
19
|
+
.env
|
|
20
|
+
|
|
21
|
+
# Config local do workspace (copie de tools.yaml.example)
|
|
22
|
+
tools.yaml
|
|
23
|
+
|
|
24
|
+
# Estado local
|
|
25
|
+
.clified/
|
|
26
|
+
|
|
27
|
+
# IDE
|
|
28
|
+
.idea/
|
|
29
|
+
.vscode/
|
|
30
|
+
*.swp
|
|
31
|
+
|
|
32
|
+
# OS
|
|
33
|
+
.DS_Store
|
|
34
|
+
Thumbs.db
|
clified-0.4.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Maikeu Locatelli
|
|
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.
|
clified-0.4.0/PKG-INFO
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: clified
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: Instalador universal e biblioteca CLI para ferramentas Python, Rust e Bun
|
|
5
|
+
Project-URL: Homepage, https://github.com/maikramer/clified
|
|
6
|
+
Project-URL: Repository, https://github.com/maikramer/clified
|
|
7
|
+
Project-URL: Issues, https://github.com/maikramer/clified/issues
|
|
8
|
+
Author: Maikeu Locatelli
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: cli,devtools,installer,python,rust
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Requires-Dist: pydantic>=2
|
|
24
|
+
Requires-Dist: pyyaml>=6
|
|
25
|
+
Requires-Dist: rich>=13
|
|
26
|
+
Provides-Extra: cli
|
|
27
|
+
Requires-Dist: click>=8; extra == 'cli'
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: pytest-cov>=5; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
31
|
+
Requires-Dist: ruff>=0.9; extra == 'dev'
|
|
32
|
+
Description-Content-Type: text/markdown
|
|
33
|
+
|
|
34
|
+
# Clified
|
|
35
|
+
|
|
36
|
+
Instalador universal e **biblioteca CLI** para ferramentas Python, Rust e Bun.
|
|
37
|
+
|
|
38
|
+
Infraestrutura reutilizável consolidada a partir de **denv** (LocatelliDockerManager), **pc** (ProjetoCursor) e **GameDev** — sem hardcodar ferramentas no código.
|
|
39
|
+
|
|
40
|
+
## Estrutura
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
clified/
|
|
44
|
+
├── install.sh / install.ps1 / install.bat
|
|
45
|
+
├── tools.yaml # registry local (gitignored)
|
|
46
|
+
├── tools.yaml.example
|
|
47
|
+
├── examples/ # migração GameDev / denv / pc
|
|
48
|
+
├── config/
|
|
49
|
+
│ ├── clified.yml.example
|
|
50
|
+
│ ├── install-all-constraints.txt
|
|
51
|
+
│ └── gamedev-constraints.txt.example
|
|
52
|
+
└── src/clified/
|
|
53
|
+
├── logging.py
|
|
54
|
+
├── cli/ # output JSON, Click scaffold, StepRunner
|
|
55
|
+
├── core/ # config, retry, paths, state
|
|
56
|
+
├── patterns/ # diagnóstico regex + reporter
|
|
57
|
+
├── hooks/ # MCP, skills, pip check, nvdiffrast
|
|
58
|
+
├── integrations/mcp.py
|
|
59
|
+
└── installer/
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Instalação
|
|
63
|
+
|
|
64
|
+
### PyPI (recomendado)
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
pip install --user clified
|
|
68
|
+
# ou: pipx install clified
|
|
69
|
+
|
|
70
|
+
clified-install --list
|
|
71
|
+
clified-install minha-ferramenta
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Cada repositório de ferramenta traz o seu `tools.yaml` e define `CLIFIED_TOOLS` no `install.sh` — **não é necessário clonar o Clified**.
|
|
75
|
+
|
|
76
|
+
### Desenvolvimento do Clified
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
git clone https://github.com/maikramer/clified.git
|
|
80
|
+
cd clified
|
|
81
|
+
pip install -e ".[dev]"
|
|
82
|
+
cp tools.yaml.example tools.yaml # registry local opcional
|
|
83
|
+
./install.sh --list
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Para CLIs Click: `pip install -e ".[cli]"` (grupo `--json` / `--quiet` / `--verbose`).
|
|
87
|
+
|
|
88
|
+
### Publicar no PyPI
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
pip install hatch
|
|
92
|
+
hatch build
|
|
93
|
+
hatch publish # requer credenciais PyPI / token
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Ou crie um **GitHub Release** — o workflow `.github/workflows/publish.yml` publica automaticamente (Trusted Publishing).
|
|
97
|
+
|
|
98
|
+
## Migração de workspaces existentes
|
|
99
|
+
|
|
100
|
+
| Origem | Exemplo YAML | O que fica no repo original |
|
|
101
|
+
|--------|--------------|----------------------------|
|
|
102
|
+
| **GameDev** | `examples/tools.gamedev.yaml.example` | `*_extras.py`, constraints ML, lógica PyTorch |
|
|
103
|
+
| **denv** | `examples/tools.denv.yaml.example` | Docker/Swarm, FastMCP server |
|
|
104
|
+
| **pc** | `examples/tools.pc.yaml.example` | comandos Flutter/deploy, skill do projecto |
|
|
105
|
+
|
|
106
|
+
Campos novos em `tools.yaml`:
|
|
107
|
+
|
|
108
|
+
| Campo | Uso |
|
|
109
|
+
|-------|-----|
|
|
110
|
+
| `custom_install` | Hook `modulo:func(installer)` substituindo `pip install -e` |
|
|
111
|
+
| `install_before_mode: venv_only` | Equivalente ao `--text2d-venv-only` do GameDev |
|
|
112
|
+
| `install_order` | Ordem em `clified-install all` |
|
|
113
|
+
| `post_install` | MCP, skills Cursor, `pip check`, etc. |
|
|
114
|
+
|
|
115
|
+
Hooks prontos (`clified.hooks`):
|
|
116
|
+
|
|
117
|
+
- `register_mcp` / `register_mcp_serve` — Cursor MCP
|
|
118
|
+
- `register_cursor_skill` — skill do pc/GameDev
|
|
119
|
+
- `pip_check` — validação pós-install
|
|
120
|
+
- `install_nvdiffrast` — extra PyTorch (GameDev)
|
|
121
|
+
|
|
122
|
+
## Desenvolvimento
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
pip install -e ".[dev]"
|
|
126
|
+
pytest -q
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Biblioteca para os seus CLIs
|
|
130
|
+
|
|
131
|
+
```python
|
|
132
|
+
from clified.cli import OutputFormatter, handle_cli_errors
|
|
133
|
+
from clified.cli.app import create_cli_group # pip install clified[cli]
|
|
134
|
+
from clified.cli.progress import StepRunner, Step
|
|
135
|
+
from clified.core import find_project_root, RetryEngine, get_state_store
|
|
136
|
+
from clified.patterns import diagnose_text
|
|
137
|
+
|
|
138
|
+
out = OutputFormatter(json_mode=True)
|
|
139
|
+
out.success({"tool": "mytool"})
|
|
140
|
+
|
|
141
|
+
report = diagnose_text(log_text)
|
|
142
|
+
print(report.to_markdown())
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Hooks e MCP
|
|
146
|
+
|
|
147
|
+
```yaml
|
|
148
|
+
tools:
|
|
149
|
+
denv:
|
|
150
|
+
kind: python
|
|
151
|
+
folder: ../LocatelliDockerManager
|
|
152
|
+
cli_name: denv
|
|
153
|
+
post_install: clified.hooks:register_mcp_serve
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Variáveis de ambiente
|
|
157
|
+
|
|
158
|
+
| Variável | Descrição |
|
|
159
|
+
|----------|-----------|
|
|
160
|
+
| `CLIFIED_TOOLS` | Caminho para `tools.yaml` do projecto (**principal**) |
|
|
161
|
+
| `CLIFIED_HOME` | Config do utilizador (default `~/.config/clified`) |
|
|
162
|
+
| `CLIFIED_ROOT` | Checkout local do Clified (só dev) |
|
|
163
|
+
| `CLIFIED_MIN_VERSION` | Versão mínima no `pip install` automático (default `0.4.0`) |
|
|
164
|
+
| `CLIFIED_RETRY=1` | Retry automático na instalação |
|
|
165
|
+
| `CLIFIED_MCP_NAME` | Nome do servidor MCP (hook) |
|
|
166
|
+
| `CLIFIED_PROJECT_ROOT` | Override para `find_project_root()` |
|
|
167
|
+
| `INSTALL_PREFIX` | Prefixo (~/.local) |
|
|
168
|
+
|
|
169
|
+
## Origem do código
|
|
170
|
+
|
|
171
|
+
| Clified | Origem |
|
|
172
|
+
|---------|--------|
|
|
173
|
+
| `cli/output.py`, `cli/decorators.py` | denv |
|
|
174
|
+
| `cli/app.py`, `cli/progress.py` | denv + pc (`DeployUI` / StepRunner) |
|
|
175
|
+
| `core/paths.py` | pc |
|
|
176
|
+
| `hooks/skills.py` | GameDev `skill_install.py` |
|
|
177
|
+
| `hooks/mcp.py`, `hooks/pytorch.py` | denv + GameDev |
|
|
178
|
+
| `patterns/reporter.py` | denv `DiagnosisReporter` |
|
|
179
|
+
| `installer/registry.py` (campos extras) | GameDev unified installer |
|
|
180
|
+
|
|
181
|
+
A lógica Docker/Swarm permanece no denv; pipelines ML específicos permanecem no GameDev — registados via YAML, não hardcoded.
|
clified-0.4.0/README.md
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Clified
|
|
2
|
+
|
|
3
|
+
Instalador universal e **biblioteca CLI** para ferramentas Python, Rust e Bun.
|
|
4
|
+
|
|
5
|
+
Infraestrutura reutilizável consolidada a partir de **denv** (LocatelliDockerManager), **pc** (ProjetoCursor) e **GameDev** — sem hardcodar ferramentas no código.
|
|
6
|
+
|
|
7
|
+
## Estrutura
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
clified/
|
|
11
|
+
├── install.sh / install.ps1 / install.bat
|
|
12
|
+
├── tools.yaml # registry local (gitignored)
|
|
13
|
+
├── tools.yaml.example
|
|
14
|
+
├── examples/ # migração GameDev / denv / pc
|
|
15
|
+
├── config/
|
|
16
|
+
│ ├── clified.yml.example
|
|
17
|
+
│ ├── install-all-constraints.txt
|
|
18
|
+
│ └── gamedev-constraints.txt.example
|
|
19
|
+
└── src/clified/
|
|
20
|
+
├── logging.py
|
|
21
|
+
├── cli/ # output JSON, Click scaffold, StepRunner
|
|
22
|
+
├── core/ # config, retry, paths, state
|
|
23
|
+
├── patterns/ # diagnóstico regex + reporter
|
|
24
|
+
├── hooks/ # MCP, skills, pip check, nvdiffrast
|
|
25
|
+
├── integrations/mcp.py
|
|
26
|
+
└── installer/
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Instalação
|
|
30
|
+
|
|
31
|
+
### PyPI (recomendado)
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pip install --user clified
|
|
35
|
+
# ou: pipx install clified
|
|
36
|
+
|
|
37
|
+
clified-install --list
|
|
38
|
+
clified-install minha-ferramenta
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Cada repositório de ferramenta traz o seu `tools.yaml` e define `CLIFIED_TOOLS` no `install.sh` — **não é necessário clonar o Clified**.
|
|
42
|
+
|
|
43
|
+
### Desenvolvimento do Clified
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
git clone https://github.com/maikramer/clified.git
|
|
47
|
+
cd clified
|
|
48
|
+
pip install -e ".[dev]"
|
|
49
|
+
cp tools.yaml.example tools.yaml # registry local opcional
|
|
50
|
+
./install.sh --list
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Para CLIs Click: `pip install -e ".[cli]"` (grupo `--json` / `--quiet` / `--verbose`).
|
|
54
|
+
|
|
55
|
+
### Publicar no PyPI
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pip install hatch
|
|
59
|
+
hatch build
|
|
60
|
+
hatch publish # requer credenciais PyPI / token
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Ou crie um **GitHub Release** — o workflow `.github/workflows/publish.yml` publica automaticamente (Trusted Publishing).
|
|
64
|
+
|
|
65
|
+
## Migração de workspaces existentes
|
|
66
|
+
|
|
67
|
+
| Origem | Exemplo YAML | O que fica no repo original |
|
|
68
|
+
|--------|--------------|----------------------------|
|
|
69
|
+
| **GameDev** | `examples/tools.gamedev.yaml.example` | `*_extras.py`, constraints ML, lógica PyTorch |
|
|
70
|
+
| **denv** | `examples/tools.denv.yaml.example` | Docker/Swarm, FastMCP server |
|
|
71
|
+
| **pc** | `examples/tools.pc.yaml.example` | comandos Flutter/deploy, skill do projecto |
|
|
72
|
+
|
|
73
|
+
Campos novos em `tools.yaml`:
|
|
74
|
+
|
|
75
|
+
| Campo | Uso |
|
|
76
|
+
|-------|-----|
|
|
77
|
+
| `custom_install` | Hook `modulo:func(installer)` substituindo `pip install -e` |
|
|
78
|
+
| `install_before_mode: venv_only` | Equivalente ao `--text2d-venv-only` do GameDev |
|
|
79
|
+
| `install_order` | Ordem em `clified-install all` |
|
|
80
|
+
| `post_install` | MCP, skills Cursor, `pip check`, etc. |
|
|
81
|
+
|
|
82
|
+
Hooks prontos (`clified.hooks`):
|
|
83
|
+
|
|
84
|
+
- `register_mcp` / `register_mcp_serve` — Cursor MCP
|
|
85
|
+
- `register_cursor_skill` — skill do pc/GameDev
|
|
86
|
+
- `pip_check` — validação pós-install
|
|
87
|
+
- `install_nvdiffrast` — extra PyTorch (GameDev)
|
|
88
|
+
|
|
89
|
+
## Desenvolvimento
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
pip install -e ".[dev]"
|
|
93
|
+
pytest -q
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Biblioteca para os seus CLIs
|
|
97
|
+
|
|
98
|
+
```python
|
|
99
|
+
from clified.cli import OutputFormatter, handle_cli_errors
|
|
100
|
+
from clified.cli.app import create_cli_group # pip install clified[cli]
|
|
101
|
+
from clified.cli.progress import StepRunner, Step
|
|
102
|
+
from clified.core import find_project_root, RetryEngine, get_state_store
|
|
103
|
+
from clified.patterns import diagnose_text
|
|
104
|
+
|
|
105
|
+
out = OutputFormatter(json_mode=True)
|
|
106
|
+
out.success({"tool": "mytool"})
|
|
107
|
+
|
|
108
|
+
report = diagnose_text(log_text)
|
|
109
|
+
print(report.to_markdown())
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Hooks e MCP
|
|
113
|
+
|
|
114
|
+
```yaml
|
|
115
|
+
tools:
|
|
116
|
+
denv:
|
|
117
|
+
kind: python
|
|
118
|
+
folder: ../LocatelliDockerManager
|
|
119
|
+
cli_name: denv
|
|
120
|
+
post_install: clified.hooks:register_mcp_serve
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Variáveis de ambiente
|
|
124
|
+
|
|
125
|
+
| Variável | Descrição |
|
|
126
|
+
|----------|-----------|
|
|
127
|
+
| `CLIFIED_TOOLS` | Caminho para `tools.yaml` do projecto (**principal**) |
|
|
128
|
+
| `CLIFIED_HOME` | Config do utilizador (default `~/.config/clified`) |
|
|
129
|
+
| `CLIFIED_ROOT` | Checkout local do Clified (só dev) |
|
|
130
|
+
| `CLIFIED_MIN_VERSION` | Versão mínima no `pip install` automático (default `0.4.0`) |
|
|
131
|
+
| `CLIFIED_RETRY=1` | Retry automático na instalação |
|
|
132
|
+
| `CLIFIED_MCP_NAME` | Nome do servidor MCP (hook) |
|
|
133
|
+
| `CLIFIED_PROJECT_ROOT` | Override para `find_project_root()` |
|
|
134
|
+
| `INSTALL_PREFIX` | Prefixo (~/.local) |
|
|
135
|
+
|
|
136
|
+
## Origem do código
|
|
137
|
+
|
|
138
|
+
| Clified | Origem |
|
|
139
|
+
|---------|--------|
|
|
140
|
+
| `cli/output.py`, `cli/decorators.py` | denv |
|
|
141
|
+
| `cli/app.py`, `cli/progress.py` | denv + pc (`DeployUI` / StepRunner) |
|
|
142
|
+
| `core/paths.py` | pc |
|
|
143
|
+
| `hooks/skills.py` | GameDev `skill_install.py` |
|
|
144
|
+
| `hooks/mcp.py`, `hooks/pytorch.py` | denv + GameDev |
|
|
145
|
+
| `patterns/reporter.py` | denv `DiagnosisReporter` |
|
|
146
|
+
| `installer/registry.py` (campos extras) | GameDev unified installer |
|
|
147
|
+
|
|
148
|
+
A lógica Docker/Swarm permanece no denv; pipelines ML específicos permanecem no GameDev — registados via YAML, não hardcoded.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Configuração global opcional do Clified.
|
|
2
|
+
# Copie para config/clified.yml para personalizar.
|
|
3
|
+
|
|
4
|
+
base_dir: ~/.clified
|
|
5
|
+
|
|
6
|
+
logging:
|
|
7
|
+
level: INFO
|
|
8
|
+
|
|
9
|
+
retry:
|
|
10
|
+
max_attempts: 3
|
|
11
|
+
base_delay: 2.0
|
|
12
|
+
max_delay: 60.0
|
|
13
|
+
|
|
14
|
+
install:
|
|
15
|
+
prefix: ~/.local
|
|
16
|
+
use_uv: true
|
|
17
|
+
default_python: python3
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Exemplo: registrar denv (LocatelliDockerManager) via Clified
|
|
2
|
+
|
|
3
|
+
workspace:
|
|
4
|
+
root: "/home/maikeu/GitClones"
|
|
5
|
+
name: "GitClones"
|
|
6
|
+
|
|
7
|
+
tools:
|
|
8
|
+
denv:
|
|
9
|
+
name: "DENV"
|
|
10
|
+
kind: python
|
|
11
|
+
folder: LocatelliDockerManager
|
|
12
|
+
cli_name: denv
|
|
13
|
+
python_module: denv
|
|
14
|
+
description: "Docker Environment Manager — Swarm, stacks, diagnóstico"
|
|
15
|
+
min_python: [3, 12]
|
|
16
|
+
post_install: clified.hooks:register_mcp_serve
|
|
17
|
+
# Instalação: poetry/pip install -e no projecto; Clified gere venv + wrapper
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Exemplo: migrar monorepo GameDev para Clified
|
|
2
|
+
# Copie secções relevantes para o seu tools.yaml
|
|
3
|
+
# Hooks específicos ficam no repo GameDev (gamedev_shared.installer.clified_hooks)
|
|
4
|
+
|
|
5
|
+
workspace:
|
|
6
|
+
root: "/caminho/para/GameDev"
|
|
7
|
+
name: "GameDev"
|
|
8
|
+
shared_python:
|
|
9
|
+
path: Shared
|
|
10
|
+
import_name: gamedev_shared
|
|
11
|
+
src_subpath: src
|
|
12
|
+
|
|
13
|
+
tools:
|
|
14
|
+
text2d:
|
|
15
|
+
kind: python
|
|
16
|
+
folder: Text2D
|
|
17
|
+
cli_name: text2d
|
|
18
|
+
python_module: text2d
|
|
19
|
+
description: "CLI text-to-image"
|
|
20
|
+
min_python: [3, 13]
|
|
21
|
+
needs_pytorch: true
|
|
22
|
+
install_order: -2
|
|
23
|
+
post_install: clified.hooks:pip_check
|
|
24
|
+
|
|
25
|
+
text3d:
|
|
26
|
+
kind: python
|
|
27
|
+
folder: Text3D
|
|
28
|
+
cli_name: text3d
|
|
29
|
+
python_module: text3d
|
|
30
|
+
description: "Pipeline text-to-3D"
|
|
31
|
+
min_python: [3, 13]
|
|
32
|
+
needs_pytorch: true
|
|
33
|
+
install_order: -1
|
|
34
|
+
install_before: [text2d]
|
|
35
|
+
cross_deps: [text2d]
|
|
36
|
+
post_install: gamedev_shared.installer.clified_hooks:text3d_post_install
|
|
37
|
+
|
|
38
|
+
materialize:
|
|
39
|
+
kind: rust
|
|
40
|
+
folder: Materialize
|
|
41
|
+
cli_name: materialize
|
|
42
|
+
cargo_bin_name: materialize-cli
|
|
43
|
+
description: "PBR maps via GPU"
|
|
44
|
+
|
|
45
|
+
text2sound:
|
|
46
|
+
kind: python
|
|
47
|
+
folder: Text2Sound
|
|
48
|
+
cli_name: text2sound
|
|
49
|
+
python_module: text2sound
|
|
50
|
+
description: "CLI text-to-audio"
|
|
51
|
+
min_python: [3, 13]
|
|
52
|
+
needs_pytorch: true
|
|
53
|
+
custom_install: gamedev_shared.installer.clified_hooks:text2sound_custom_install
|
|
54
|
+
|
|
55
|
+
paint3d:
|
|
56
|
+
kind: python
|
|
57
|
+
folder: Paint3D
|
|
58
|
+
cli_name: paint3d
|
|
59
|
+
python_module: paint3d
|
|
60
|
+
description: "Texturização 3D PBR"
|
|
61
|
+
min_python: [3, 13]
|
|
62
|
+
needs_pytorch: true
|
|
63
|
+
post_install: gamedev_shared.installer.clified_hooks:paint3d_post_install
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Exemplo: registrar pc CLI (ProjetoCursor) via Clified
|
|
2
|
+
|
|
3
|
+
workspace:
|
|
4
|
+
root: "/home/maikeu/GitClones/ProjetoCursor"
|
|
5
|
+
name: "ProjetoCursor"
|
|
6
|
+
|
|
7
|
+
tools:
|
|
8
|
+
pc:
|
|
9
|
+
name: "PC CLI"
|
|
10
|
+
kind: python
|
|
11
|
+
folder: tools
|
|
12
|
+
cli_name: pc
|
|
13
|
+
python_module: pc
|
|
14
|
+
description: "Flutter + Supabase + deploy — Projeto Cursor"
|
|
15
|
+
min_python: [3, 10]
|
|
16
|
+
custom_install: clified_install:custom_install
|
|
17
|
+
post_install: clified_install:post_install
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@echo off
|
|
2
|
+
REM Clified — Instalador Universal (Windows CMD)
|
|
3
|
+
REM Uso: install.bat <tool> [opcoes]
|
|
4
|
+
|
|
5
|
+
setlocal EnableDelayedExpansion
|
|
6
|
+
|
|
7
|
+
set "SCRIPT_DIR=%~dp0"
|
|
8
|
+
set "CLIFIED_ROOT=%SCRIPT_DIR%"
|
|
9
|
+
|
|
10
|
+
echo Clified — Instalador Universal
|
|
11
|
+
echo =================================
|
|
12
|
+
|
|
13
|
+
if not exist "%SCRIPT_DIR%tools.yaml" (
|
|
14
|
+
echo tools.yaml nao encontrado. Copie tools.yaml.example para tools.yaml.
|
|
15
|
+
exit /b 1
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
python --version >nul 2>&1
|
|
19
|
+
if errorlevel 1 (
|
|
20
|
+
set PY=python3
|
|
21
|
+
) else (
|
|
22
|
+
set PY=python
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
set "INSTALLER_VENV=%SCRIPT_DIR%.installer-venv"
|
|
26
|
+
set "INSTALLER_PY=%INSTALLER_VENV%\Scripts\python.exe"
|
|
27
|
+
|
|
28
|
+
if not exist "%INSTALLER_PY%" (
|
|
29
|
+
%PY% -m venv "%INSTALLER_VENV%"
|
|
30
|
+
"%INSTALLER_PY%" -m pip install -q --upgrade pip
|
|
31
|
+
"%INSTALLER_PY%" -m pip install -q -e "%SCRIPT_DIR%"
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
"%INSTALLER_PY%" -m clified --python %PY% %*
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# Clified — Instalador Universal (Windows PowerShell)
|
|
3
|
+
# =============================================================================
|
|
4
|
+
|
|
5
|
+
$ErrorActionPreference = "Stop"
|
|
6
|
+
|
|
7
|
+
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
8
|
+
$env:CLIFIED_ROOT = $ScriptDir
|
|
9
|
+
|
|
10
|
+
$Cyan = "`e[36m"
|
|
11
|
+
$Red = "`e[31m"
|
|
12
|
+
$Reset = "`e[0m"
|
|
13
|
+
|
|
14
|
+
function Prepare-InstallerEnvironment {
|
|
15
|
+
Write-Host "${Cyan}Preparando ambiente Clified...${Reset}"
|
|
16
|
+
|
|
17
|
+
$toolsYaml = Join-Path $ScriptDir "tools.yaml"
|
|
18
|
+
if (-not (Test-Path -LiteralPath $toolsYaml)) {
|
|
19
|
+
Write-Host "${Red}tools.yaml nao encontrado em $ScriptDir${Reset}"
|
|
20
|
+
Write-Host " Copie tools.yaml.example para tools.yaml."
|
|
21
|
+
exit 1
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
$pythonCmd = Get-Command python -ErrorAction SilentlyContinue
|
|
25
|
+
if (-not $pythonCmd) {
|
|
26
|
+
$pythonCmd = Get-Command python3 -ErrorAction SilentlyContinue
|
|
27
|
+
}
|
|
28
|
+
if (-not $pythonCmd) {
|
|
29
|
+
Write-Host "${Red}Python 3 nao encontrado.${Reset}"
|
|
30
|
+
exit 1
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
$py = $pythonCmd.Source
|
|
34
|
+
& $py -c "import sys; assert sys.version_info >= (3, 10)" 2>$null
|
|
35
|
+
if ($LASTEXITCODE -ne 0) {
|
|
36
|
+
Write-Host "${Red}Python 3.10+ necessario.${Reset}"
|
|
37
|
+
exit 1
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
$installerVenv = Join-Path $ScriptDir ".installer-venv"
|
|
41
|
+
$launcherPython = Join-Path $installerVenv "Scripts\\python.exe"
|
|
42
|
+
|
|
43
|
+
if ((Test-Path -LiteralPath $launcherPython) -and
|
|
44
|
+
(& $launcherPython -c "import clified, rich, yaml" 2>$null; $LASTEXITCODE -eq 0)) {
|
|
45
|
+
return @{ Launcher = $launcherPython; Projects = $py }
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
Write-Host "${Cyan} -> Ambiente do instalador (venv + clified)...${Reset}"
|
|
49
|
+
if (-not (Test-Path -LiteralPath $launcherPython)) {
|
|
50
|
+
& $py -m venv $installerVenv
|
|
51
|
+
if ($LASTEXITCODE -ne 0) { exit 1 }
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
& $launcherPython -m pip install -q --upgrade pip
|
|
55
|
+
& $launcherPython -m pip install -q -e $ScriptDir
|
|
56
|
+
if ($LASTEXITCODE -ne 0) { exit 1 }
|
|
57
|
+
|
|
58
|
+
return @{ Launcher = $launcherPython; Projects = $py }
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
$p = Prepare-InstallerEnvironment
|
|
62
|
+
|
|
63
|
+
$env:UV_VENV_CLEAR = "1"
|
|
64
|
+
$env:UV_LINK_MODE = "copy"
|
|
65
|
+
|
|
66
|
+
Write-Host "${Cyan}Clified - Instalador Universal${Reset}"
|
|
67
|
+
Write-Host "================================="
|
|
68
|
+
|
|
69
|
+
& $p.Launcher -m clified --python $p.Projects @args
|
|
70
|
+
exit $LASTEXITCODE
|