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

Combine mask + a given maskfile into a standalone binary #1

Closed
jacobdeichert opened this issue Jul 12, 2019 · 4 comments
Closed

Combine mask + a given maskfile into a standalone binary #1

jacobdeichert opened this issue Jul 12, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@jacobdeichert
Copy link
Owner

It should be able to take a maskfile and turn it into a standalone rust binary... not sure how possible this even is. The maskfile would need to be embedded into the mask binary or something.

This would create an easy way to make general cli programs that can be distributed to a team.

@jacobdeichert jacobdeichert added the enhancement New feature or request label Jul 12, 2019
@brandonkal
Copy link

Hmmm. You could always support a shebang in the markdown file.
That would mean an extra heading at the top when rendered.

Instead of building a standalone binary, I would suggest implementing something like the deno install command.

For instance you could do something like:

mask --install https://example.com/your-mask-cli.md

Mask would handle:

  1. Downloading the markdown file to ~/.mask/https/example.com/your-mask-cli.md
  2. Creating a simple wrapping shell script
  3. Place that shell script in the path

@jacobdeichert
Copy link
Owner Author

Very interesting idea! I'll have to think about this...

My goal with this issue was to allow a scenario like this:

  • team member wants to build a cli for their team to use
  • they write the cli with mask and a maskfile because it's easy
  • they want to deploy a single binary (no maskfile) to their entire dev team (this was me a few years ago but i wrote a node cli)

But requiring team members to install mask would slightly defeat the purpose of this.

However, i'm kind of thinking about just closing this issue. Anyone could just distribute a global maskfile to their team easily enough and tell them to install mask via github releases or eventually homebrew... so this idea I had isn't as valuable as I once thought.

@feep
Copy link

feep commented Jun 19, 2020

Hmmm. You could always support a shebang in the markdown file.

I like this.

Not sure how I would work with the extra <h1>. But it is inert, just a render issue.

I’d use it.

  • Would require a mask binary.
  • Would not require an alias or a wrapper script.

@jacobdeichert
Copy link
Owner Author

jacobdeichert commented Dec 28, 2020

Closing as not planned

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

No branches or pull requests

3 participants