cedar-policy / cedar

Implementation of the Cedar Policy Language
https://www.cedarpolicy.com
Apache License 2.0
905 stars 79 forks source link

Provide pre-built binary distributions of the Cedar CLI #309

Open hakanson opened 1 year ago

hakanson commented 1 year ago

Category

Documentation and code comments, Other

Describe the feature you'd like to request

Simplify user download of pre-built binaries for the cedar cli for most common platforms:

This could be solved similar to the open source Smithy CLI, where releases can be found on the Smithy GitHub releases page.

A future option are platform native installers or distribution channels (e.g. homebrew or yum).

Describe alternatives you've considered

Since building the cedar cli only require Rust to be installed, then cargo install cedar-policy-cli, an alternative is to add a Cedar CLI page to https://docs.cedarpolicy.com/ and/or update the project README.md with those instructions.

Additional context

Using the Cedar CLI allows people to experiment with Cedar policies and schemas without having to develop in Rust. This is similar to how people use the Cedar playground. Requiring a person to install Rust to get the CLI is a minor blocker.

A CI/CD pipeline can use the CLI for validation and testing policies. Currently, this requires a Cedar CLI build step and saving a copy of the binary artifact to use across pipeline runs.

Is this something that you'd be interested in working on?

hakanson commented 1 year ago

Today I noticed that when I brew upgrade powershell on macOS, homebrew download the installer from GitHub releases. This aligns with my suggestion of attaching the binaries to the GitHub release.

==> Downloading https://github.com/PowerShell/PowerShell/releases/download/v7.3.7/powershell-7.3.7-osx-x64.pkg
hakanson commented 1 year ago

Finch (https://github.com/runfinch/finch) also uses GitHub releases

$ brew install --cask finch

==> Downloading https://github.com/runfinch/finch/releases/download/v1.0.0/Finch-v1.0.0-x86_64.pkg
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/562778457/6af73eb2-d647-45b6-9e14-1844
andrewmwells-amazon commented 1 year ago

Just adding a note that if/when we distribute binaries, we need legal to sign-off on how we communicate the dependencies' licenses.

hakanson commented 1 year ago

Should we add a cedar --license command to the CLI as part of this?