Skip to main content

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.shnã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 MCP
  • register_cursor_skill — skill do pc/GameDev
  • pip_check — validação pós-install
  • install_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clified-0.4.0.tar.gz (42.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clified-0.4.0-py3-none-any.whl (57.4 kB view details)

Uploaded Python 3

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

Hashes for clified-0.4.0.tar.gz
Algorithm Hash digest
SHA256 5e253fb029a103b040a8649850c4c2fdf160a874cf363d03cb9ee19a9779cbad
MD5 044732c154f3cd61d5741fa634c220e0
BLAKE2b-256 d3bf4f3e1a18fba1d856ebac54cc655965f6bfd34b3c4952cc999ea5e8850ed5

See more details on using hashes here.

Provenance

The following attestation bundles were made for clified-0.4.0.tar.gz:

Publisher: publish.yml on maikramer/clified

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for clified-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74891a49d71077ef6542af152b07c34fd513e25f0fb26c00b90c836323e10289
MD5 0a705d4bbf32502ceb16ba8ad1152ff4
BLAKE2b-256 653c1b235027e5ee6ffcd6345f7b9194df5b3ae0fe8e288426560045b0e63fcd

See more details on using hashes here.

Provenance

The following attestation bundles were made for clified-0.4.0-py3-none-any.whl:

Publisher: publish.yml on maikramer/clified

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page