
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
[](https://coveralls.io/github/int0h/typed-cli?branch=master)
A library to help you create type-safe CLI's fast and simple.
This project is still alive and maintained. But it is not in active development.
import {cli, option} from 'typed-cli';
import app from './app';
const {options} = cli({
options: {
env: option.oneOf(['dev', 'prod'] as const)
.alias('e')
.required()
.description('app environment'),
port: option.int
.alias('p')
.default(80)
.description('port'),
}
});
// port: number
// env: 'dev' | 'prod'
const {port, env} = options;
const DB_HOSTS = {
dev: 'localhost:1234',
prod: '1.2.3.4:9999',
} as const;
// Type safe!
// no "No index signature with a parameter of type 'string'" kind of errors
// because typeof env is 'dev' | 'prod'
app.run({
db: DB_HOSTS[env],
port
});
This code will behave like this:
You can test it without installing anything on your machine. Just go to the
(⚠️it's about 20Mb of traffic). It has interactive terminal and code editor, you can change the samples and see how it reacts.
The docs can be found here: https://int0h.github.io/typed-cli-docs/
FAQs
[](https://coveralls.io/github/int0h/typed-cli?branch=master)
The npm package typed-cli receives a total of 109 weekly downloads. As such, typed-cli popularity was classified as not popular.
We found that typed-cli 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 researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.