Marcel van Lohuizen | 36d889f | 2018-12-16 10:43:17 +0100 | [diff] [blame] | 1 | <!-- |
| 2 | Copyright 2018 The CUE Authors |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | --> |
| 16 | |
| 17 | |
Marcel van Lohuizen | 969a783 | 2018-11-22 19:43:51 +0100 | [diff] [blame] | 18 | # The CUE Configuration Language |
| 19 | |
| 20 | _Configure, Unify, Execute_ |
| 21 | |
| 22 | CUE is an open source configuration language which aims |
| 23 | to make complex configurations more manageable and usable. |
| 24 | |
| 25 | CUE is a constrained-based language. |
| 26 | Constraints provide a powerful yet simple alternative |
| 27 | to inheritance, a common source of complexity |
Marcel van Lohuizen | 36d889f | 2018-12-16 10:43:17 +0100 | [diff] [blame] | 28 | with other configuration languages. |
| 29 | |
| 30 | The CUE tooling also provides integrated declarative scripting |
| 31 | aimed at simplifying putting configurations to good use while |
| 32 | giving static analyis tools maximum domain knowledge. |
Marcel van Lohuizen | 969a783 | 2018-11-22 19:43:51 +0100 | [diff] [blame] | 33 | |
Marcel van Lohuizen | dd5e589 | 2018-11-22 23:29:16 +0100 | [diff] [blame] | 34 | Some highlights: |
Marcel van Lohuizen | 969a783 | 2018-11-22 19:43:51 +0100 | [diff] [blame] | 35 | |
| 36 | - JSON superset: get started quickly |
| 37 | - convert existing YAML and JSON |
Marcel van Lohuizen | 36d889f | 2018-12-16 10:43:17 +0100 | [diff] [blame] | 38 | - declarative scripting |
Marcel van Lohuizen | 969a783 | 2018-11-22 19:43:51 +0100 | [diff] [blame] | 39 | - automatically simplify configurations |
Marcel van Lohuizen | 36d889f | 2018-12-16 10:43:17 +0100 | [diff] [blame] | 40 | - formatter |
| 41 | - arbitrary-precision arithmetic |
Marcel van Lohuizen | 969a783 | 2018-11-22 19:43:51 +0100 | [diff] [blame] | 42 | - rich APIs designed for automated tooling |
| 43 | - a formalism conducive to automated reasoning |
| 44 | - generate CUE templates from source code |
Marcel van Lohuizen | 36d889f | 2018-12-16 10:43:17 +0100 | [diff] [blame] | 45 | - generate source code from CUE configurations (TODO) |
Marcel van Lohuizen | 969a783 | 2018-11-22 19:43:51 +0100 | [diff] [blame] | 46 | |
| 47 | |
| 48 | ### Download and Install |
| 49 | |
| 50 | #### Install From Source |
| 51 | |
| 52 | If you already have Go installed, the short version is: |
| 53 | |
| 54 | ``` |
| 55 | go get -u cuelang.org/go/cmd/cue |
| 56 | ``` |
| 57 | |
| 58 | This will install the `cue` command line tool. |
| 59 | |
Marcel van Lohuizen | 36d889f | 2018-12-16 10:43:17 +0100 | [diff] [blame] | 60 | For more details see [Installing CUE](./doc/install.md). |
Marcel van Lohuizen | 969a783 | 2018-11-22 19:43:51 +0100 | [diff] [blame] | 61 | |
| 62 | |
| 63 | ### Learning CUE |
| 64 | |
| 65 | A demonstration of how to convert and restructure and existing |
| 66 | set of Kubernetes configurations is available in |
Marcel van Lohuizen | 36d889f | 2018-12-16 10:43:17 +0100 | [diff] [blame] | 67 | [written form](./doc/examples/kubernetes/Readme.md) or as |
Marcel van Lohuizen | 969a783 | 2018-11-22 19:43:51 +0100 | [diff] [blame] | 68 | [video](). |
| 69 | |
| 70 | ### References |
| 71 | |
Marcel van Lohuizen | 36d889f | 2018-12-16 10:43:17 +0100 | [diff] [blame] | 72 | - [Language Specification](./doc/ref/spec.md): official CUE Language specification. |
Marcel van Lohuizen | 969a783 | 2018-11-22 19:43:51 +0100 | [diff] [blame] | 73 | |
| 74 | - [API](https://godoc.org/cuelang.org/go/cue): the API on godoc.org |
| 75 | |
| 76 | - [Builtin packages](https://godoc.org/cuelang.org/go/pkg): builtins available from CUE programs |
| 77 | |
Marcel van Lohuizen | 36d889f | 2018-12-16 10:43:17 +0100 | [diff] [blame] | 78 | - [`cue` Command line reference](./doc/cmd/cue.md): the `cue` command |
Marcel van Lohuizen | 969a783 | 2018-11-22 19:43:51 +0100 | [diff] [blame] | 79 | |
| 80 | |
| 81 | ### Contributing |
| 82 | |
| 83 | Our canonical Git repository is located at https://cue.googlesource.com. |
| 84 | |
Marcel van Lohuizen | 36d889f | 2018-12-16 10:43:17 +0100 | [diff] [blame] | 85 | To contribute, please read the [Contribution Guidelines](./CONTRIBUTING.md). |
Marcel van Lohuizen | 969a783 | 2018-11-22 19:43:51 +0100 | [diff] [blame] | 86 | |
| 87 | ##### Note that we do not accept pull requests and that we use the issue tracker for bug reports and proposals only. |
| 88 | |
| 89 | Unless otherwise noted, the CUE source files are distributed |
| 90 | under the Apache 2.0 license found in the LICENSE file. |
| 91 | |
| 92 | |