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

Cli version #6

Open
borestad opened this issue Mar 16, 2020 · 6 comments
Open

Cli version #6

borestad opened this issue Mar 16, 2020 · 6 comments

Comments

@borestad
Copy link

Hi. It's "apanzzon" from Reddit ;-)

A fdir-cli version would be interesting.

Due to corona chaos, I currently have very little spare time.

Would avoid using a framework, to avoid dependencies, or split it up to a secondary repo

@thecodrr
Copy link
Owner

Hey, that's an amazing idea. Would be an awesome experiment. What features do you think it should have?

@borestad
Copy link
Author

I think it should be as simple as possible and only pass the exact same options as the library. Most importantly, being able to pipe from either stdin or stdout.

As for implementation - there's probably 2 options:

  1. Keep the bin within this repository. Create a very simple wrapper, with some custom parsing.

  2. Use some cli-helper like https://github.com/sindresorhus/meow - although the large amount of dependencies may be a turn off.

Then....you might have to decide if you want to support Windows and create a .bat-wrapper

Just some thoughts :)

@thecodrr
Copy link
Owner

I think it should be as simple as possible and only pass the exact same options as the library.

I was thinking the same thing. There are about 5 options in the library. We can have a flag for each.

Most importantly, being able to pipe from either stdin or stdout.

The app would print a plain output to stdout and be able to take in input from stdin (of course).

Keep the bin within this repository. Create a very simple wrapper, with some custom parsing.

I think we shouldn't pollute the actual library. I will make a separate repo for the cli. I want to keep it zero dependency though so might have to do some basic parsing by hand. Shouldn't be too hard.

Once it's done, it can be published on npm and be used by anyone.

Then....you might have to decide if you want to support Windows and create a .bat-wrapper

That can be done, I think. First let's focus on getting the feature-set done.

@JohnFitz
Copy link

JohnFitz commented Jun 1, 2020

Looks like somebody beat you to it with your own library 😄 glob-searcher. "Great minds think alike" I guess.

@thecodrr
Copy link
Owner

thecodrr commented Jun 1, 2020

@JohnFitz 🤣🤣 yes that is true. But it's a little bit different.

I will be publishing the CLI version very soon. It's barebones but does everything you'd want it to; dumping the file paths to stdin.

@JohnFitz
Copy link

JohnFitz commented Jun 1, 2020 via email

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

No branches or pull requests

3 participants