@ivaniscoding/celq-linux-arm64 0.2.0-alpha.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -5
- package/bin/celq +0 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# celq
|
|
2
|
-
[](https://crates.io/crates/celq) [](https://docs.rs/celq) [](https://crates.io/crates/celq) [](https://docs.rs/celq) [](https://celq-playground.github.io/) [](https://rust-lang.github.io/rfcs/2495-min-rust-version.html)
|
|
3
3
|
|
|
4
4
|
**celq** is a command-line tool for evaluating [Common Expression Language (CEL)](https://cel.dev/) expressions. It processes JSON input, performs computations, and outputs results. Think of it as if [jq](https://jqlang.org/) supported CEL.
|
|
5
5
|
|
|
@@ -23,19 +23,24 @@ Popular configuration formats such as JSON5, YAML, and TOML are supported. The c
|
|
|
23
23
|
|
|
24
24
|
For detailed usage examples and recipes, see the [manual](https://docs.rs/celq/latest/celq/).
|
|
25
25
|
|
|
26
|
+
### Interactive Playground
|
|
27
|
+
Want to try `celq` without installing anything? Visit the [celq-playground](https://celq-playground.github.io/) to try it in your browser!
|
|
28
|
+
|
|
26
29
|
## Why?
|
|
27
30
|
|
|
28
31
|
There are implementations of CEL for [Go](https://github.com/google/cel-go), [Java](https://github.com/google/cel-java), [C++](https://github.com/google/cel-cpp), [JavaScript](https://github.com/marcbachmann/cel-js), [Python](https://github.com/cloud-custodian/cel-python), [C#](https://github.com/telus-oss/cel-net), [Rust](https://github.com/cel-rust/cel-rust), [Ruby](https://gitlab.com/os85/cel-ruby), and possibly more languages.
|
|
29
32
|
|
|
30
|
-
`celq` brings the same CEL syntax to the command-line. `celq` is not necessarily better than jq, but perhaps it makes it easier to reuse snippets of code
|
|
33
|
+
`celq` brings the same CEL syntax to the command-line. `celq` is not necessarily better than jq, but perhaps it makes it easier to reuse snippets of code across multiple places.
|
|
31
34
|
|
|
32
35
|
Moreover, the CEL specification is simpler than the jqlang specification. If you need something less powerful than `jq` or Python, then `celq` might be what you are looking for.
|
|
33
36
|
|
|
37
|
+
Check our [comparison with other tools](https://docs.rs/celq/latest/celq/comparison_with_other_tools) for more details.
|
|
38
|
+
|
|
34
39
|
## Installation
|
|
35
40
|
|
|
36
41
|
### Pre-built Binaries
|
|
37
42
|
|
|
38
|
-
We publish pre-built binaries for Linux, macOS, and Windows in celq's [GitHub Releases page](https://github.com/IvanIsCoding/celq/releases). To install the current version for Linux or macOS, run:
|
|
43
|
+
We publish pre-built binaries for Linux, macOS, FreeBSD, and Windows in celq's [GitHub Releases page](https://github.com/IvanIsCoding/celq/releases). To install the current version for Linux or macOS, run:
|
|
39
44
|
|
|
40
45
|
```bash
|
|
41
46
|
curl --proto '=https' --tlsv1.2 -sSf https://get-celq.github.io/install.sh | bash
|
|
@@ -48,7 +53,7 @@ curl --proto '=https' --tlsv1.2 -sSf https://get-celq.github.io/install.sh | \
|
|
|
48
53
|
bash -s -- --to DESTINATION
|
|
49
54
|
```
|
|
50
55
|
|
|
51
|
-
See the
|
|
56
|
+
See the [installation guide](https://docs.rs/celq/latest/celq/installation_guide) for more details on the installer such as `--force` to replace existing binaries, `--target` to specify which binary to download, versioned URLs, GitHub tokens, attestations, and more.
|
|
52
57
|
|
|
53
58
|
### Homebrew (macOS)
|
|
54
59
|
|
|
@@ -108,7 +113,7 @@ uvx celq -n '"Hello World"'
|
|
|
108
113
|
|
|
109
114
|
### NPM (Node.js/JavaScript)
|
|
110
115
|
|
|
111
|
-
Node.js users can install celq in their project with:
|
|
116
|
+
`celq` is packaged for [NPM](https://www.npmjs.com/package/celq). Node.js users can install celq in their project with:
|
|
112
117
|
|
|
113
118
|
```bash
|
|
114
119
|
npm install celq
|
|
@@ -145,6 +150,32 @@ If you are going to use `celq` in scripts or for multiple calls, we recommend us
|
|
|
145
150
|
tool: celq
|
|
146
151
|
```
|
|
147
152
|
|
|
153
|
+
### Nix
|
|
154
|
+
|
|
155
|
+
`celq` is available for [Nix](https://github.com/NixOS/nix). To run it as a Flake:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
nix run github:IvanIsCoding/celq -- -n '"Hello World"'
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
See the [installation guide](https://docs.rs/celq/latest/celq/installation_guide) for other Nix setups.
|
|
162
|
+
|
|
163
|
+
### FreeBSD
|
|
164
|
+
|
|
165
|
+
FreeBSD builds are tested in [Cirrus CI](https://cirrus-ci.org/) and cross-compiled with [Zig](https://github.com/rust-cross/cargo-zigbuild). Although `celq` is not yet in the ports tree, it does publish pre-built binaries:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
VERSION=v0.2.0
|
|
169
|
+
RELEASE_URL=https://github.com/IvanIsCoding/celq/releases/download/${VERSION}
|
|
170
|
+
|
|
171
|
+
fetch ${RELEASE_URL}/celq-freebsd-x86_64.tar.gz
|
|
172
|
+
|
|
173
|
+
tar xzf celq-freebsd-x86_64.tar.gz
|
|
174
|
+
su root -c 'install -m 755 celq /usr/local/bin/'
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
`celq` can also be installed from source following the [Cargo](#cargo) section. We strive to always compile with the Rust version provided in the ports tree.
|
|
178
|
+
|
|
148
179
|
## Limitations
|
|
149
180
|
|
|
150
181
|
### Eager JSON Parsing
|
|
@@ -163,6 +194,10 @@ There may be edge cases or advanced features where behavior differs from the off
|
|
|
163
194
|
|
|
164
195
|
Currently, the `--arg` syntax only supports `int`, `bool`, `float`, and `string`. Support for other CEL types will be added in the future.
|
|
165
196
|
|
|
197
|
+
### Malformed expressions
|
|
198
|
+
|
|
199
|
+
Currently, the error messages for CEL expressions that are invalid are cryptic. We will enhance them in future releases.
|
|
200
|
+
|
|
166
201
|
## Non-Goals
|
|
167
202
|
|
|
168
203
|
### REPL
|
|
@@ -179,6 +214,7 @@ Special thanks to the maintainers of:
|
|
|
179
214
|
- **[cel-rust](https://github.com/cel-rust/cel-rust)** for providing the CEL evaluation engine that powers `celq`
|
|
180
215
|
- **[cel-python](https://github.com/cloud-custodian/cel-python)** for publishing their CLI. `celq` has heavily drawn from their interface
|
|
181
216
|
- **[jaq](https://github.com/01mf02/jaq)** for giving an excellent blueprint on how to test a Rust CLI
|
|
217
|
+
- **[gron](https://github.com/tomnomnom/gron)** for greppable JSON
|
|
182
218
|
|
|
183
219
|
## Large Language Models Disclosure
|
|
184
220
|
|
|
@@ -195,3 +231,5 @@ The `install.sh` published with each GitHub release and its template at the root
|
|
|
195
231
|
## Contributing
|
|
196
232
|
|
|
197
233
|
Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for more details.
|
|
234
|
+
|
|
235
|
+
Unless explicitly stated otherwise, any contribution intentionally submitted for inclusion in `celq` by you shall be dual-licensed under the [MIT License](LICENSE-MIT) and the [Apache 2.0 license](LICENSE-APACHE). Contributions to `template_install.sh` shall be dedicated to the public domain. Any additional terms or conditions shall not apply.
|
package/bin/celq
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
],
|
|
16
16
|
"publishConfig": {
|
|
17
17
|
"access": "public",
|
|
18
|
-
"tag": "
|
|
18
|
+
"tag": "latest"
|
|
19
19
|
},
|
|
20
20
|
"repository": {
|
|
21
21
|
"type": "git",
|
|
22
22
|
"url": "git+https://github.com/IvanIsCoding/celq.git"
|
|
23
23
|
},
|
|
24
|
-
"version": "0.2.0
|
|
24
|
+
"version": "0.2.0"
|
|
25
25
|
}
|