Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
bishbosh
Advanced tools
Readme
:scream: :scream: :scream: :scream: :scream: :scream:
Disclaimer - (This is at Proposal-Stage) - At the moment this is nothing other than an opionated braindump. If you read something here which aligns with you or otherwise, please make a pr or an issue.
:fire: :fire: Warning - opinions ahead :fire: :fire:
What if it was piss-easy to write cli apps which:
In an ideal world, when I write CLIs, I want focus on content. Rather than reinventing the wheel everytime and implementing a cli with language X, I'd like to write down a script with as little syntax as possible, that describes:
Eyo - Welcome to this {{green}}super amazing{{/green}} cli whoop whoop!
? So what do you want to do
c > create a new app
-> ./create-new-app.sh
Yippie!
Your app is now created!
You can run it by typing {{yellow}}npm start{{/yellow}}
a > add a module to your app
?:component Where do you want your component?
? Which one?
# Copies around files
m > a middleware -> cp ./templates/middleware {{component}}
r > a reducer -> cp ./templates/middleware {{component}}
d > deploy the app -> ./deploy.sh
Possible applications:
Welcome to Project X, to cancel just press ctrl[c]
# To keep it simple, we could do if/else statements that rely on whether a process exits with 0 or 1
if -> sudo service elasticsearch status
{green}Elasticsearch running{/green}
else
Looks like elasticsearch isn't running, wanna restart it?
- Yes -> sudo service elasticsearch restart
- No
if -> sudo service dynamo status
- {green}Dynamo DB is running{/green}
else
Looks like dynamo isn't running, wanna restart it?
> Yes
if -> sudo service dynamo restart
{green}Dynamo DB is running{/green}
else
I can't get dynamo db running sry dude, ask your sysadmin for help -> exit 0
> No
Right, that's all, see you later aligator!
# Yo I am a comment
? Some prompt that asks you a question or not
If no options are specified, any key can be pressed to continue
? What do you want to do?
> run the app
> build the app
> deploy the app
Options can be chosen with arrow keys
? What do you want to do?
r > run the app
b > build the app
d > deploy the app
Options can be chosen with arrow keys or key commands
?:input What do you want to say?
The input will be used as env variable for the process, which you can reference in other places.
Execution statements are in essence shell scripts. They spin up processes.
-> cp ./template ./src/something
-> ./run-a-shell-thing.sh
-> ./run-a-js-thing.js
-> ./run-a-ruby-thing.js
You can use conditionals. Conditional expressions use C-style operators, like ==
, !=
, &&
.
You can also use execution statements. If you do, a failed execution statement (one that exits with 1) will be interpreted false
, a successfull execution statement (exit 0) will be evaluated as true
.
?:input Hello there what can I do for you?
if input == "build"
Ok, I'll build the app for you, hold on a sec -> ./build.sh
elseif input == "deploy"
Ok, I'll deploy the app for you, hold on a sec -> ./deploy.sh
else
Sorry, that's not a valid command, by then -> exit
You can color your output like so:
{red}Hello there{/red}
FAQs
BishBosh - A domain specific language for writing command line interfaces
The npm package bishbosh receives a total of 2 weekly downloads. As such, bishbosh popularity was classified as not popular.
We found that bishbosh demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.