Skip to content

Add brioche show command to view recipes / artifacts #330

@kylewlacy

Description

@kylewlacy

Today, the only tool Brioche provides to view the content of a build is to run brioche build -o <path>, then to inspect the written output on the filesystem. This can be "good enough" in a lot of cases, but it'd be nice if we had some tooling to inspect the results from a build without needing to manually write it to disk first!

We should add a brioche show command. At minimum, it should allow users to inspect recipes and artifacts. Here's a few different use-cases it could cover (we don't have to handle all of these for the initial version though):

  • List the contents of a directory artifact: filenames, file sizes, permissions, total combined size
  • Show the contents and permissions from a file artifact
  • Show the target path for a symlink artifact
  • Show a recipe as a JSON or tree view (probably with controls to limit nesting, since recipes can get really large)
  • From a recipe, show the artifact that it outputs if known
  • From an artifact, show which recipe(s) output it if known

There are other things that a user might want to show too:

  • Inspecting artifacts / recipes via the registry
  • Inspecting things from the cache
  • Inspecting project files

(I'm not sure if brioche show should be overloaded to handle all of the above though! It might make sense to split some of these out into different commands)

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliRelated to the Brioche command line interfaceenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions