Generic YAML/JSON preprocessor with includes, merging, and transformations
Core engine for cfn-include — extract the power of modular YAML processing for any use case.
- File Inclusion — HTTP, local files, glob patterns
- Template Variables — Environment variable substitution
- Powerful Transforms — 30+ built-in functions for arrays, objects, strings
- JSON & YAML — Seamless conversion between formats
- Recursive Processing — Nested includes with scope management
- Zero AWS Dependencies — Use with Kubernetes, Docker Compose, Ansible, etc.
npm install @brickhouse-tech/yaml-includeimport { include } from '@brickhouse-tech/yaml-include';
const result = await include({
url: './template.yaml',
doEnv: true
});
console.log(result);Example template.yaml:
config:
Fn::Include: ./base-config.yaml
database:
host: ${DB_HOST}
Fn::Merge:
- Fn::Include: ./db-defaults.yaml
- port: 5432- Kubernetes Manifests — Modular, reusable configs
- Docker Compose — Share service definitions
- GitHub Actions — Reusable workflow templates
- Ansible Playbooks — Organize complex deployments
- CloudFormation — See cfn-include
Fn::Flatten,Fn::FlattenDeep,Fn::Uniq,Fn::CompactFn::Concat,Fn::Sort,Fn::SortedUniq,Fn::Without
Fn::Merge,Fn::DeepMerge,Fn::Omit,Fn::OmitEmptyFn::ObjectKeys,Fn::ObjectValues,Fn::SortObject
Fn::Stringify,Fn::StringSplitFn::UpperCamelCase,Fn::LowerCamelCaseFn::JoinNow,Fn::SubNow
Fn::GetEnv,Fn::Eval,Fn::FilenamesFn::Length,Fn::Map,Fn::Sequence,Fn::IfEval
Looking for AWS-specific features (S3, Fn::Outputs, RefNow)?
👉 Check out cfn-include
MIT © Nick McCready
- cfn-include — CloudFormation preprocessor
- angular-lts — Security patches for AngularJS 1.x
- json-schema-lts — Security patches for json-schema
Brickhouse-Tech — Open source security & infrastructure tools
GitHub Sponsors • More Projects