Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@climax/core
Advanced tools
The "Electron" for CLI applications: build and distribute cross-platform CLI clients with NodeJS.
You can think Climax as the "Electron for CLI applications". But in fact it does even a bit more than that:
:warning: Attention
As long as the first beta releases won't be published, the alpha releases may be proven highly unstable and WILL include multiple breaking changes.
:zap: Info
This entire process will be automatically generated via Climax CLI as soon as its first alpha version will be released.
npm i @climax/core
First, let's fill the meta info and declare the binary path:
package.json
{
// ...
"name": "say.js",
"description": "A dummy program repeating what you type.",
"version": "1.0.0",
"bin": {
"say": "./bin/say.js"
},
// ...
}
:zap: Info
The name, description and version specified whithin your package.json are the ones used by default by Climax once you pass its source to
program#info()
. Thebin
key is also used to show help, warning and error messages.
Then let's write our first piece of code:
bin/say.js
#!/usr/bin/env node
const { is, program } = require('@climax/core')
const info = require('../package.json')
program.info(info)
.value('message', 'What do you want to say?', is.aMandatory.string.longerThan(0))
.option('-t, --twice', 'Say it twice.', is.anOptional.boolean)
.action(({ options, values }) => {
for (let i = 0; i <= Number(options.twice); i++) {
console.log(values.message)
}
})
program.command('hello')
.description('Say hi to whoever you want.')
.value('name', 'Whom do you want to say hello to?', is.aMandatory.string.longerThan(0))
.option('-L, --in-language', 'In which language?', is.anOptional.list(['en', 'fr']).else('en'))
.action(({ options, values }) => {
const greeting = options.inLanguage === 'en'
? `Hello ${values.name}!`
: `Bonjour ${values.name}!`
console.log(greeting)
})
program.init()
Finally we can link our local "binary" file (not compiled yet since they are interprated by NodeJS thanks to the Sha-Bang):
npm link
$ say Bazinga!
Bazinga!
$ say hello E.T -L fr
Bonjour E.T!
In progress...
git clone https://github.com/climax/core.git
cd core
npm i
It is recommanded to work in TDD mode, including continuously run tests while writing your code:
npm run test:watch
Climax is MIT licensed.
FAQs
The "Electron" for CLI applications: build and distribute cross-platform CLI clients with NodeJS.
The npm package @climax/core receives a total of 0 weekly downloads. As such, @climax/core popularity was classified as not popular.
We found that @climax/core 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.