@ivaniscoding/celq-linux-arm64 0.1.2-alpha.1 → 0.2.0-beta.1

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.
Files changed (3) hide show
  1. package/README.md +96 -11
  2. package/bin/celq +0 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # celq
2
- [![Crates.io](https://img.shields.io/crates/v/celq.svg)](https://crates.io/crates/celq) [![Documentation](https://docs.rs/celq/badge.svg)](https://docs.rs/celq) [![Minimum rustc 1.90](https://img.shields.io/badge/rustc-1.90+-blue.svg)](https://rust-lang.github.io/rfcs/2495-min-rust-version.html)
2
+ [![Crates.io](https://img.shields.io/crates/v/celq.svg)](https://crates.io/crates/celq) [![Documentation](https://docs.rs/celq/badge.svg)](https://docs.rs/celq) [![Playground](https://img.shields.io/badge/playground-live-brightgreen)](https://celq-playground.github.io/) [![Minimum rustc 1.90](https://img.shields.io/badge/rustc-1.90+-blue.svg)](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
 
@@ -19,15 +19,18 @@ celq -n --arg='fruit:string=apple' 'fruit.contains("a")'
19
19
  # Outputs: true
20
20
  ```
21
21
 
22
- Closely related formats such as NDJSON and JSON5 are also supported.
22
+ Popular configuration formats such as JSON5, YAML, and TOML are supported. The closely related format NDJSON is also supported.
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
- There are implementations of CEL for [Go](https://github.com/google/cel-go), [C++](https://github.com/google/cel-cpp), [Python](https://github.com/cloud-custodian/cel-python), [JavaScript](https://github.com/marcbachmann/cel-js), [Rust](https://github.com/cel-rust/cel-rust), and possibly more languages.
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 accross multiple places.
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
 
@@ -35,7 +38,7 @@ Moreover, the CEL specification is simpler than the jqlang specification. If you
35
38
 
36
39
  ### Pre-built Binaries
37
40
 
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:
41
+ 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
42
 
40
43
  ```bash
41
44
  curl --proto '=https' --tlsv1.2 -sSf https://get-celq.github.io/install.sh | bash
@@ -48,7 +51,7 @@ curl --proto '=https' --tlsv1.2 -sSf https://get-celq.github.io/install.sh | \
48
51
  bash -s -- --to DESTINATION
49
52
  ```
50
53
 
51
- See the the [installation guide](https://docs.rs/celq/latest/celq/) for more details on the installer such as `--force` to replace existing binaries, `--target` to specify which binary to download, versioned URLs, GitHub tokens, and more.
54
+ 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
55
 
53
56
  ### Homebrew (macOS)
54
57
 
@@ -57,12 +60,32 @@ If you are a [macOS Homebrew](https://brew.sh/) user, then you can install celq
57
60
  ```bash
58
61
  brew install get-celq/tap/celq
59
62
  ```
63
+
64
+ ### Chocolatey (Windows)
65
+
66
+ If you are a [Chocolatey](https://community.chocolatey.org/) user on Windows, you can install `celq` with:
67
+
68
+ ```bash
69
+ choco install celq
70
+ ```
71
+
72
+ ### Scoop (Windows)
73
+
74
+ If you are a [Scoop](https://scoop.sh/) user on Windows, you can install `celq` with:
75
+
76
+ ```bash
77
+ scoop bucket add get-celq https://github.com/get-celq/scoop-bucket
78
+ scoop install get-celq/celq
79
+ ```
80
+
81
+ ### Cargo
82
+
60
83
  #### Installing From Source
61
84
 
62
85
  If you want to install from source, celq publishes to [crates.io](https://crates.io/crates/celq).
63
86
 
64
87
  ```bash
65
- cargo install celq
88
+ cargo install celq --locked
66
89
  ```
67
90
 
68
91
  #### Installing With cargo-binstall
@@ -88,7 +111,7 @@ uvx celq -n '"Hello World"'
88
111
 
89
112
  ### NPM (Node.js/JavaScript)
90
113
 
91
- Node.js users can install celq in their project with:
114
+ `celq` is packaged for [NPM](https://www.npmjs.com/package/celq). Node.js users can install celq in their project with:
92
115
 
93
116
  ```bash
94
117
  npm install celq
@@ -100,9 +123,65 @@ This adds celq to `package.json` and makes it available for scripts. It's also p
100
123
  npx celq -n '"Hello World"'
101
124
  ```
102
125
 
126
+ ### GitHub Actions
127
+
128
+ `celq` can be used in GitHub actions. For one-off commands, the [get-celq/celq-action](https://github.com/get-celq/celq-action) is the quickest way:
129
+
130
+ ```yaml
131
+ - name: Example Celq Action
132
+ id: exampleID
133
+ uses: get-celq/celq-action@main
134
+ with:
135
+ cmd: celq 'this.exampleID' < example.json
136
+
137
+ - name: Reuse a variable obtained in another step
138
+ run: echo ${{ steps.exampleID.outputs.result }}
139
+ ```
140
+
141
+ See the [installation guide](https://docs.rs/celq/latest/celq/installation_guide) for more details on GitHub actions such as pinning the `celq` version and the Action itself.
142
+
143
+ If you are going to use `celq` in scripts or for multiple calls, we recommend using [taiki-e/install-action](https://github.com/taiki-e/install-action):
144
+
145
+ ```yaml
146
+ - uses: taiki-e/install-action@v2
147
+ with:
148
+ tool: celq
149
+ ```
150
+
151
+ ### Nix
152
+
153
+ `celq` is available for [Nix](https://github.com/NixOS/nix). To run it as a Flake:
154
+
155
+ ```bash
156
+ nix run github:IvanIsCoding/celq -- -n '"Hello World"'
157
+ ```
158
+
159
+ See the [installation guide](https://docs.rs/celq/latest/celq/installation_guide) for other Nix setups.
160
+
161
+ ### FreeBSD
162
+
163
+ 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:
164
+
165
+ ```bash
166
+ # Set version
167
+ VERSION=v0.2.0
168
+ RELEASE_URL=https://github.com/IvanIsCoding/celq/releases/download/${VERSION}
169
+
170
+ # Download and verify checksum
171
+ fetch ${RELEASE_URL}/SHA256SUMS
172
+ fetch ${RELEASE_URL}/celq-x86_64-unknown-freebsd.tar.gz
173
+ sha256 -c SHA256SUMS --ignore-missing
174
+
175
+ # Extract and install
176
+ tar xzf celq-x86_64-unknown-freebsd.tar.gz
177
+ sudo install -m 755 celq /usr/local/bin/
178
+ ```
179
+
180
+ `celq` can be installed from source following the [Cargo](#cargo) section. We strive to always compile with the Rust version provided in the ports tree.
181
+
103
182
  ## Limitations
104
183
 
105
- ### JSON Parsing
184
+ ### Eager JSON Parsing
106
185
 
107
186
  `celq` eagerly parses all JSON input into memory before evaluation. This design was made to simplify the code implementation, at the cost of memory and performance.
108
187
 
@@ -112,12 +191,16 @@ Currently, there are no benchmarks for `celq`. I believe the tool is "good enoug
112
191
 
113
192
  `celq` uses [cel-rust](https://github.com/cel-rust/cel-rust), a community-maintained Rust implementation of CEL, rather than the official Go implementation.
114
193
 
115
- While `cel-rust` provides excellent compatibility with the CEL specification, there may be edge cases or advanced features where behavior differs from the official implementation. If you find one, feel free to report it at their repository.
194
+ There may be edge cases or advanced features where behavior differs from the official implementation. If you find one, open an issue at the celq repository and we'll triage the issue before sending it to cel-rust.
116
195
 
117
196
  ### List and Map Arguments
118
197
 
119
198
  Currently, the `--arg` syntax only supports `int`, `bool`, `float`, and `string`. Support for other CEL types will be added in the future.
120
199
 
200
+ ### Malformed expressions
201
+
202
+ Currently, the error messages for CEL expressions that are invalid are cryptic. We will enhance them in future releases.
203
+
121
204
  ## Non-Goals
122
205
 
123
206
  ### REPL
@@ -126,7 +209,7 @@ While conceptually interesting, `celq` does not aim to be a CEL REPL. In the ori
126
209
 
127
210
  ### Full YAML Support
128
211
 
129
- `celq` works with JSON. YAML will be supported in the future as a best-effort. Full YAML support is out-of-scope, as the specification has too many edge cases.
212
+ `celq` works with JSON. YAML is supported as a best-effort. If the ingested YAML can be translated to JSON, `celq` most likely works fine. Full YAML support is out-of-scope, as the specification has too many edge cases.
130
213
 
131
214
  ## Acknowledgments
132
215
 
@@ -150,3 +233,5 @@ The `install.sh` published with each GitHub release and its template at the root
150
233
  ## Contributing
151
234
 
152
235
  Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for more details.
236
+
237
+ 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
@@ -21,5 +21,5 @@
21
21
  "type": "git",
22
22
  "url": "git+https://github.com/IvanIsCoding/celq.git"
23
23
  },
24
- "version": "0.1.2-alpha.1"
24
+ "version": "0.2.0-beta.1"
25
25
  }