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

New command: info #86

Open
ysbaddaden opened this issue Jan 21, 2016 · 7 comments
Open

New command: info #86

ysbaddaden opened this issue Jan 21, 2016 · 7 comments
Assignees
Milestone

Comments

@ysbaddaden
Copy link
Contributor

The info command asks the registry for informations about a package (repository url, last version, etc).

$ shards info minitest
    name: minitest
     url: https://github.com/ysbaddaden/minitest.cr.git
 version: 0.3.0
released: 2016-01-11T15:08:19.000Z
@straight-shoota
Copy link
Member

straight-shoota commented Feb 19, 2020

Additional to the original intent, I think this tool would be useful without querying any remote registry, just presenting information about locally available shards. Both are viable use cases.

Currently, we can query the installed shards using shards list, which presents a list of shard names and their installed versions.
But it would also be interesting to query more information about these (installed) shards. For example properties from shard.yml like description, license or crystal. Or all available versions. Or properties at a specific version.

The CLI interface could look like this: shards info [<name> | <ref>] [<version>] [<property>...]

The first argument can be the name of a shard, a URL or omitted. A name is resolved against the dependencies defined in local shard.yml. It can also be a remote reference like (github:crystal-lang/shards) to show information about a shard that's not assigned a name in the local context. Integration with a remote index like shardbox.org would also be possible. When omitted, the command applies to the shard in the current directory (like the current behaviour of shards version).

The second argument specifies the version and can be omitted. By default it resolves to the installed version for locally installed shards or latest for remote.

Following arguments specify which properties to show. shards info --version prints the version, shards info --name the name, --repo the repository URL, --versions lists available versions, --dependencies the dependencies etc.
When omitted, a human readable summary is shown, like the sample in the original comment.

An optional --format flag could switch output to JSON or other formats.

@MatheusRich
Copy link

@ysbaddaden and @straight-shoota do you guys think it's possible to add charge licenses as well?

@straight-shoota
Copy link
Member

@MatheusRich What do you mean with "charge license"?

@MatheusRich
Copy link

Whoops, that was a mistake, my bad. I meant "shard licenses"

@straight-shoota
Copy link
Member

I'm sorry, but this still doesn't clarify, what you mean. Where and how do you want to add what kind of license?

@MatheusRich
Copy link

I'm asking if the command info could include the shard license, like MIT, GPL, etc. I think that would be nice and useful.

@straight-shoota
Copy link
Member

Yes, of course. The license is already mentioned as an example in #86 (comment)

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

No branches or pull requests

3 participants