
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
typed-cli
Advanced tools
[](https://coveralls.io/github/int0h/typed-cli?branch=master)
Supply Chain Security
Vulnerability
Quality
Maintenance
License
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 187 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.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.