Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spike building an executable version of the CLI #746

Open
yt-ms opened this issue Jan 2, 2025 · 6 comments
Open

Spike building an executable version of the CLI #746

yt-ms opened this issue Jan 2, 2025 · 6 comments
Labels

Comments

@yt-ms
Copy link
Contributor

yt-ms commented Jan 2, 2025

Feature Request

Description of Problem:

As discussed in Office Hours 2025-01-02, relying on users of the CALM CLI having an existing npm environment within which they're happy to install all our dependencies, or to be able to run an OCI image under Docker/Podman/etc may be too high a barrier to entry for some.

Potential Solutions:

There are mechanisms to build tree-shaken, minified versions of node-based executables (@willosborne has some examples), so we should try these out to see whether compiling a standalone executable is a feasible solution. Need to think about Windows as well as Linux support.

@yt-ms yt-ms added the calm label Jan 2, 2025
@yt-ms yt-ms mentioned this issue Jan 2, 2025
3 tasks
@grahampacker-ms
Copy link
Member

Also need to consider mac support (intel and apple silicon)

@jpgough-ms jpgough-ms added cli and removed calm labels Jan 2, 2025
@Budlee
Copy link
Member

Budlee commented Jan 2, 2025

A fair bit of work but moving to a language like python or go which have great CLI support could be an idea

@jpgough-ms
Copy link
Member

A fair bit of work but moving to a language like python or go which have great CLI support could be an idea

@Budlee the other challenge is that a lot of the JSON Schema tools and modules that we use are predominantly in JS/TS. Originally we did look at Python, but found the ecosystem to not be as supportive of the types of actions in the CLI. I definitely agree it is a lot of work.

relying on users of the CALM CLI having an existing npm environment within which they're happy to install all our dependencies, or to be able to run an OCI image under Docker/Podman/etc may be too high a barrier to entry for some.

I would add that we have feedback from a few organisations who have been able to use npm install fine. Organisations typically have this backed into an automated scanning tool for CVEs/licensing related issues.

@yt-ms / others, do we have anyone who is reporting that they can't use npm? It would be good to get some information about what they could use.

The other thing we have been discussing is #689, which would be the CLI running as a server-side application. A possible solution could be that we setup a SaaS/Self Hosted deployment of the tooling? This would definitely need more thought, but is why the feedback on what's blocking is important.

@Budlee
Copy link
Member

Budlee commented Jan 6, 2025

Is there any work on this one at the moment?

@willosborne
Copy link
Member

I mentioned a few options for compiling TS projects to executables on the office hours. This was based on some quick research I did but I haven't tried any of these yet.

The options I looked at are:

@Budlee
Copy link
Member

Budlee commented Jan 6, 2025

Thanks @willosborne,
With the node version we have as 22 meaning its compatible with the NodeJS single-executable I think this could be a good option for longer term support over bun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants