Welcome to the graft documentation! graft is a general purpose YAML & JSON merging tool with complex expression operators.
New to graft? Start here to learn the basics of YAML merging and simple operators.
Understand the core concepts behind graft:
- Merging Rules - How graft merges YAML files
- Expression Evaluation - How operators are processed
- Nested Expressions - Composing operators within operators
- Array Merging - Special array merge operators
- Environment Variables - Using environment variables
Detailed reference for all graft operators, organized by category:
- concat - String concatenation
- join - Join arrays with separator
- split - Split strings into arrays
- regexp - Regular expression matching
- base64 - Base64 encoding
- base64-decode - Base64 decoding
- stringify - Convert to string
- parse - Parse strings to data structures
- grab - Reference other values
- concat - Concatenate multiple references
- defer - Defer evaluation
- inject - Inject values into templates
- param - Parameter references
- append - Append to arrays
- prepend - Prepend to arrays
- merge - Deep merge arrays
- inline - Inline array elements
- flatten - Flatten nested arrays
- uniq - Remove duplicates
- cartesian-product - Cartesian product
- sort - Sort arrays
- shuffle - Randomize arrays
- calc - Mathematical calculations
- ips - IP math operations
- Arithmetic Operators - +, -, *, /, %
- Comparison - ==, !=, <, >, <=, >=
- Boolean Logic - &&, ||, !
- Ternary - Conditional operator ?:
- vault - HashiCorp Vault integration
- awsparam - AWS Parameter Store
- awssecret - AWS Secrets Manager
- file - Read from files
- load - Load YAML/JSON files
- keys - Get map keys
- prune - Remove keys
- empty - Check if empty
- null - Check if null
- static_ips - Static IP allocation
- type - Get value type
Practical guides for common tasks:
- Integrating with BOSH
- Using with CredHub
- Vault Integration
- AWS Integration
- Generating graft with graft
- Working with Go Patches
- graft merge - Merge YAML files
- graft diff - Diff YAML files
- graft json - Convert to JSON
- graft fan - Process multi-document YAML
- graft vaultinfo - Extract Vault paths
- Operator Quick Reference - Concise operator syntax reference
- Use Cases Guide - Common patterns and solutions
- Quick Reference - Original quick reference guide
- Basic Examples - Simple usage examples
- Operator Examples - Examples for each operator
- Real-World Scenarios - Complex use cases
graft supports:
- Nested operator expressions
- Environment variable expansion in references
- Complex arithmetic and boolean expressions
- Type coercion and validation
See Expression Evaluation for details.
See our Contributing Guide for information on contributing to graft.
graft is released under the MIT License.