Quick Start
Basic compression
Compress a YAML file with secret redaction and comment stripping:
decoct compress docker-compose.yamldecoct auto-detects 8 platforms (Docker Compose, Kubernetes, Ansible, cloud-init, Terraform state, GitHub Actions, Traefik, Prometheus) and applies the matching bundled schema automatically.
Pipe from stdin:
cat docker-compose.yaml | decoct compressSee token savings:
decoct compress docker-compose.yaml --statsOutput:
services: web: image: nginx:1.25.3 ports: - "8080:80"Tokens: 142 → 58 (saved 84, 59.2%)With platform defaults
Add a schema to strip values matching platform defaults. 25 bundled schemas are available by short name:
decoct compress config.yaml --schema docker-composedecoct compress deployment.yaml --schema kubernetesdecoct compress playbook.yaml --schema ansible-playbookdecoct compress cloud-init.yaml --schema cloud-initdecoct compress terraform.tfstate --schema terraform-statedecoct compress prometheus.yml --schema prometheusWith design standards
Add assertions to strip conformant values and annotate deviations:
decoct compress config.yaml \ --schema docker-compose \ --assertions assertions/docker-services.yamlUsing a profile
Bundle everything into one file:
decoct compress config.yaml --profile docker-composeINI and key-value files
decoct handles INI-style files (.ini, .conf, .cfg, .cnf, .properties) with automatic section detection:
decoct compress my.cnf --schema mariadb-mysql --statsLearn schemas and assertions
Instead of writing schemas by hand, use LLM-assisted generation:
decoct schema learn -e prod-config.yaml -p my-platform -o schema.yamldecoct assertion learn -s team-standards.md -p docker-compose -o assertions.yamlRequires pip install decoct[llm] and ANTHROPIC_API_KEY.