Instalador universal e biblioteca CLI para ferramentas Python, Rust e Bun
Project description
Clified
Instalador universal e biblioteca CLI para ferramentas Python, Rust e Bun.
Infraestrutura reutilizável consolidada a partir de denv (LocatelliDockerManager), pc (ProjetoCursor) e GameDev — sem hardcodar ferramentas no código.
Estrutura
clified/
├── install.sh / install.ps1 / install.bat
├── tools.yaml # registry local (gitignored)
├── tools.yaml.example
├── examples/ # migração GameDev / denv / pc
├── config/
│ ├── clified.yml.example
│ ├── install-all-constraints.txt
│ └── gamedev-constraints.txt.example
└── src/clified/
├── logging.py
├── cli/ # output JSON, Click scaffold, StepRunner
├── core/ # config, retry, paths, state
├── patterns/ # diagnóstico regex + reporter
├── hooks/ # MCP, skills, pip check, nvdiffrast
├── integrations/mcp.py
└── installer/
Instalação
PyPI (recomendado)
pip install --user clified
# ou: pipx install clified
clified-install --list
clified-install minha-ferramenta
Cada repositório de ferramenta traz o seu tools.yaml e define CLIFIED_TOOLS no install.sh — não é necessário clonar o Clified.
Desenvolvimento do Clified
git clone https://github.com/maikramer/clified.git
cd clified
pip install -e ".[dev]"
cp tools.yaml.example tools.yaml # registry local opcional
./install.sh --list
Para CLIs Click: pip install -e ".[cli]" (grupo --json / --quiet / --verbose).
Publicar no PyPI
pip install hatch
hatch build
hatch publish # requer credenciais PyPI / token
Ou crie um GitHub Release — o workflow .github/workflows/publish.yml publica automaticamente (Trusted Publishing).
Migração de workspaces existentes
| Origem | Exemplo YAML | O que fica no repo original |
|---|---|---|
| GameDev | examples/tools.gamedev.yaml.example |
*_extras.py, constraints ML, lógica PyTorch |
| denv | examples/tools.denv.yaml.example |
Docker/Swarm, FastMCP server |
| pc | examples/tools.pc.yaml.example |
comandos Flutter/deploy, skill do projecto |
Campos novos em tools.yaml:
| Campo | Uso |
|---|---|
custom_install |
Hook modulo:func(installer) substituindo pip install -e |
install_before_mode: venv_only |
Equivalente ao --text2d-venv-only do GameDev |
install_order |
Ordem em clified-install all |
post_install |
MCP, skills Cursor, pip check, etc. |
Hooks prontos (clified.hooks):
register_mcp/register_mcp_serve— Cursor MCPregister_cursor_skill— skill do pc/GameDevpip_check— validação pós-installinstall_nvdiffrast— extra PyTorch (GameDev)
Desenvolvimento
pip install -e ".[dev]"
pytest -q
Biblioteca para os seus CLIs
from clified.cli import OutputFormatter, handle_cli_errors
from clified.cli.app import create_cli_group # pip install clified[cli]
from clified.cli.progress import StepRunner, Step
from clified.core import find_project_root, RetryEngine, get_state_store
from clified.patterns import diagnose_text
out = OutputFormatter(json_mode=True)
out.success({"tool": "mytool"})
report = diagnose_text(log_text)
print(report.to_markdown())
Hooks e MCP
tools:
denv:
kind: python
folder: ../LocatelliDockerManager
cli_name: denv
post_install: clified.hooks:register_mcp_serve
Variáveis de ambiente
| Variável | Descrição |
|---|---|
CLIFIED_TOOLS |
Caminho para tools.yaml do projecto (principal) |
CLIFIED_HOME |
Config do utilizador (default ~/.config/clified) |
CLIFIED_ROOT |
Checkout local do Clified (só dev) |
CLIFIED_MIN_VERSION |
Versão mínima no pip install automático (default 0.4.0) |
CLIFIED_RETRY=1 |
Retry automático na instalação |
CLIFIED_MCP_NAME |
Nome do servidor MCP (hook) |
CLIFIED_PROJECT_ROOT |
Override para find_project_root() |
INSTALL_PREFIX |
Prefixo (~/.local) |
Origem do código
| Clified | Origem |
|---|---|
cli/output.py, cli/decorators.py |
denv |
cli/app.py, cli/progress.py |
denv + pc (DeployUI / StepRunner) |
core/paths.py |
pc |
hooks/skills.py |
GameDev skill_install.py |
hooks/mcp.py, hooks/pytorch.py |
denv + GameDev |
patterns/reporter.py |
denv DiagnosisReporter |
installer/registry.py (campos extras) |
GameDev unified installer |
A lógica Docker/Swarm permanece no denv; pipelines ML específicos permanecem no GameDev — registados via YAML, não hardcoded.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clified-0.4.0.tar.gz.
File metadata
- Download URL: clified-0.4.0.tar.gz
- Upload date:
- Size: 42.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e253fb029a103b040a8649850c4c2fdf160a874cf363d03cb9ee19a9779cbad
|
|
| MD5 |
044732c154f3cd61d5741fa634c220e0
|
|
| BLAKE2b-256 |
d3bf4f3e1a18fba1d856ebac54cc655965f6bfd34b3c4952cc999ea5e8850ed5
|
Provenance
The following attestation bundles were made for clified-0.4.0.tar.gz:
Publisher:
publish.yml on maikramer/clified
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clified-0.4.0.tar.gz -
Subject digest:
5e253fb029a103b040a8649850c4c2fdf160a874cf363d03cb9ee19a9779cbad - Sigstore transparency entry: 1625399043
- Sigstore integration time:
-
Permalink:
maikramer/clified@dd48a941150493d347582c18ec032d5589632776 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/maikramer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@dd48a941150493d347582c18ec032d5589632776 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file clified-0.4.0-py3-none-any.whl.
File metadata
- Download URL: clified-0.4.0-py3-none-any.whl
- Upload date:
- Size: 57.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74891a49d71077ef6542af152b07c34fd513e25f0fb26c00b90c836323e10289
|
|
| MD5 |
0a705d4bbf32502ceb16ba8ad1152ff4
|
|
| BLAKE2b-256 |
653c1b235027e5ee6ffcd6345f7b9194df5b3ae0fe8e288426560045b0e63fcd
|
Provenance
The following attestation bundles were made for clified-0.4.0-py3-none-any.whl:
Publisher:
publish.yml on maikramer/clified
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clified-0.4.0-py3-none-any.whl -
Subject digest:
74891a49d71077ef6542af152b07c34fd513e25f0fb26c00b90c836323e10289 - Sigstore transparency entry: 1625399064
- Sigstore integration time:
-
Permalink:
maikramer/clified@dd48a941150493d347582c18ec032d5589632776 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/maikramer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@dd48a941150493d347582c18ec032d5589632776 -
Trigger Event:
workflow_dispatch
-
Statement type: