savi-lang / savi

A fast language for programmers who are passionate about their craft.
BSD 3-Clause "New" or "Revised" License
154 stars 12 forks source link

Add `savi info` subcommand for clean CLI info fetching. #399

Closed jemc closed 1 year ago

jemc commented 1 year ago

The savi info subcommand is intended for cleanly getting one piece of information about the Savi compiler/environment per call, without requiring the caller to use grep or similar for filtering.

Currently, the following three information items are supported:

The main motivation for adding this feature at the moment is a desire to automate installation of built Savi programs into the same bin-path as the location where the savi binary is installed, because this location is likely to either be in the user's PATH or shimmed by asdf, and is the most appropriate place for installed application binaries to go.

Think use cases like Savi-built CLI tools in the Savi ecosystem, such as the capnpc-savi plugin in the CapnProto library, which the capnp tool will invoke for compiling .capnp files to .savi.