coffee-tools / coffee

Reference implementation for a flexible core lightning plugin manager
https://docs.page/coffee-tools/coffee
9 stars 13 forks source link

Add Command to List Plugins in a Remote Repository #200

Closed tareknaser closed 1 year ago

tareknaser commented 1 year ago

Description

This pull request introduces a new command to coffee, allowing users to list plugins in a remote repository.

Example:

To list plugins in a remote repository, simply run:

coffee remote <repository_name> --plugins

Changes

netlify[bot] commented 1 year ago

Deploy Preview for coffee-docs canceled.

Name Link
Latest commit d39fa6f85af8434104158df1e083069c40541dc0
Latest deploy log https://app.netlify.com/sites/coffee-docs/deploys/651b0da4b4ef120008f750a7
vincenzopalazzo commented 1 year ago

What happens if I do not specify --plugins?

tareknaser commented 1 year ago

What happens if I do not specify --plugins?

fails, clap handles that because of requires here

#[arg(short, long, action = clap::ArgAction::SetTrue, requires = "remote-name")]
plugins: bool,
#[arg(
    requires = "plugins",
    name = "remote-name",
    help = "The name of the remote repository"
)]
name: Option<String>,

the output is

% coffee remote lightningd          
error: the following required arguments were not provided:
  --plugins

Usage: coffee remote --plugins <remote-name>

For more information, try '--help'.
vincenzopalazzo commented 1 year ago

fails, clap handles that because of requires here

Without a flag, we can print the information about the repository.

We already do it inside the coffee remote list, maybe we can return the same result but with one single item (that is the repository passed by name?