Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nyxb/nyxi
โ
Always right ๐ฆ Packagemanager
https://github.com/nyxb/nyxi
beutiful-ui cli colors npm package-manager packages pnpm yarn
Last synced: 12 days ago
JSON representation
โ Always right ๐ฆ Packagemanager
- Host: GitHub
- URL: https://github.com/nyxb/nyxi
- Owner: nyxb
- License: mit
- Created: 2023-04-10T12:11:58.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-03T18:51:06.000Z (about 1 year ago)
- Last Synced: 2024-05-04T01:22:06.506Z (9 months ago)
- Topics: beutiful-ui, cli, colors, npm, package-manager, packages, pnpm, yarn
- Language: TypeScript
- Homepage: https://nyxb.yxz
- Size: 394 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# nyxi
~~_`npm i` in a pnpm project, again? Sh\*t!_~~
**nyxi** - use the right package manager
npm i -g @nyxb/nyxi
### `nyxinit` - init
Creates a prompt to choose between package.json and tsconfig.json and generates the file when selected.
### `nyxi` - install
```bash
nyxi# npm install
# yarn install
# pnpm install
# bun install
``````bash
nyxi preact# npm i preact
# yarn add preact
# pnpm add preact
# bun add preact
``````bash
nyxi @types/node -D# npm i @types/node -D
# yarn add @types/node -D
# pnpm add -D @types/node
# bun add -d @types/node
``````bash
nyxi --frozen# npm ci
# yarn install --frozen-lockfile (Yarn 1)
# yarn install --immutable (Yarn Berry)
# pnpm install --frozen-lockfile
# bun install --no-save
``````bash
nyxi -g eslint# npm i -g eslint
# yarn global add eslint (Yarn 1)
# pnpm add -g eslint
# bun add -g eslint# this uses default agent, regardless your current working directory
```
### `nyxr` - run
```bash
nyxr dev --port=3000# npm run dev -- --port=3000
# yarn run dev --port=3000
# pnpm run dev --port=3000
# bun run dev --port=3000
``````bash
nyxrr# interactively select the script to run
# supports https://www.npmjs.com/package/npm-scripts-info convention
``````bash
nyxr -# rerun the last command
```
### `nyxlx` - download & execute
```bash
nyxlx preact# npx preact
# yarn dlx preact
# pnpm dlx preact
# bunx preact
``````bash
```
### `nyxu` - upgrade
```bash
nyxu# (not available for bun)
# npm upgrade
# yarn upgrade (Yarn 1)
# yarn up (Yarn Berry)
# pnpm update
``````bash
nyxu -i# (not available for npm & bun)
# yarn upgrade-interactive (Yarn 1)
# yarn up -i (Yarn Berry)
# pnpm update -i
```
### `nyxun` - uninstall
```bash
nyxun unbuild# npm uninstall unbuild
# yarn remove unbuild
# pnpm remove unbuild
# bun remove unbuild
``````bash
nyxun -g silent# npm uninstall -g silent
# yarn global remove silent
# pnpm remove -g silent
# bun remove -g silent
```
### `nyxci` - clean install
```bash
nyxci# npm ci
# yarn install --frozen-lockfile
# pnpm install --frozen-lockfile
# bun install --no-save
```if the corresponding node manager is not present, this command will install it globally along the way.
### `nyxa` - agent alias
```bash
nyxa# npm
# yarn
# pnpm
# bun
``````bash
nyxa run foo# npm run foo
# yarn run foo
# pnpm run foo
# bun run foo
```
### Change Directory
```bash
nyxi -C packages/foo preact
nyxr -C playground dev
```
### Config
```ini
; ~/.nyxirc; fallback when no lock found
defaultAgent=npm # default "prompt"; for global installs
globalAgent=npm
``````bash
# ~/.bashrc# custom configuration file path
export NYXI_CONFIG_FILE="$HOME/.config/nyxi/nyxirc"
```
### How?
**nyxi** assumes that you work with lockfiles (and you should)
Before it runs, it will detect your `yarn.lock` / `pnpm-lock.yaml` / `package-lock.json` / `bun.lockb` to know current package manager (or `packageManager` field in your packages.json if specified), and runs the [corresponding commands](https://github.com/nyxb/nyxi/blob/main/src/agents.ts).