Skip to content

darkroomengineering/omnes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OMNES

npm downloads size


Introduction

Omnes is a universal package manager CLI. One command to rule them all.

Omnes — Latin for "all of them."

Stop context-switching between npm run, yarn, pnpm, and bun. Omnes detects your project's package manager and proxies commands through it. Muscle memory stays intact. Workflows stay consistent.


Table of Contents


Installation

npm install -g omnes-cli
yarn global add omnes-cli
pnpm add -g omnes-cli
bun add -g omnes-cli

Usage

omnes <command> [args...]

Omnes passes your command directly to the detected package manager. No configuration. No setup. It just works.


Quick Examples

# Install dependencies
omnes install

# Run scripts
omnes run dev
omnes run build
omnes run test

# Add packages
omnes add react
omnes add -D typescript

# Execute binaries
omnes exec vitest
omnes dlx create-next-app

Before & After

Without Omnes, you need to remember which package manager each project uses:

# Project A (uses npm)
npm install
npm run dev

# Project B (uses pnpm)
pnpm install
pnpm dev

# Project C (uses bun)
bun install
bun run dev

With Omnes:

# Any project
omnes install
omnes run dev

Detection

Omnes identifies the package manager by lockfile presence. Detection order matters — first match wins.

Priority Lockfile Package Manager
1 bun.lockb bun
2 bun.lock bun
3 pnpm-lock.yaml pnpm
4 yarn.lock yarn
5 package-lock.json npm

No lockfile found? Falls back to npm.


Commands

Built-in Flags

Flag Description
--help, -h Display help message
--version, -v Display version number

npm Script Handling

Omnes handles npm's quirk of requiring run for custom scripts. Built-in npm commands work without it:

# These work as expected
omnes test        # → npm test
omnes start       # → npm start
omnes install     # → npm install

# Custom scripts automatically get 'run' prefix for npm
omnes dev         # → npm run dev (if npm detected)
omnes dev         # → bun dev (if bun detected)

npm Built-in Commands

The following commands are recognized as npm built-ins and don't receive the run prefix:

Category Commands
Lifecycle test, start, stop, restart
Dependencies install, uninstall, update, link, dedupe, prune
Publishing publish, pack, version
Info ls, outdated, audit, view, search
Execution exec, run, ci
Config config, set, get, cache
Auth login, logout, whoami
Other init, doctor, rebuild, help

Monorepo Support

Omnes traverses the directory tree upward to find lockfiles. This means it works seamlessly in monorepo structures where the lockfile lives at the repository root.

my-monorepo/
├── pnpm-lock.yaml      ← Omnes finds this
├── packages/
│   ├── web/
│   │   └── package.json
│   └── api/
│       └── package.json  ← Running omnes here still works
cd my-monorepo/packages/api
omnes install  # → pnpm install (detected from root)

API

Exit Codes

Code Description
0 Success (or child process success)
1 General error
127 Package manager not found in PATH
* Proxied from child process

Output Behavior

Informational messages go to stderr, keeping stdout clean for piping:

# stderr: "Using bun: bun install"
# stdout: [actual command output]
omnes install
# Piping works as expected
omnes run build 2>/dev/null | head -n 10

Safe Execution

Omnes passes arguments directly to spawn() without shell interpolation. No command injection. No glob expansion surprises. What you type is what gets executed.

# Arguments with spaces are preserved
omnes run script "hello world"  # Passed correctly as single argument

# Special characters are safe
omnes add "package@^1.0.0"  # No shell interpretation

Troubleshooting

Package manager not found

Error: 'pnpm' is not installed or not in PATH

Install the detected package manager or remove its lockfile to fall back to another.


Wrong package manager detected

If multiple lockfiles exist (common during migrations), Omnes uses the first match by priority. Remove stale lockfiles or manually specify your package manager in npm scripts.


Command not recognized

If a custom script isn't running with npm:

# Explicit run prefix always works
omnes run my-script

# Or add to npm built-ins recognition won't help—use run prefix

Philosophy

One command. Any project. Zero configuration.

Omnes exists because developer tooling should reduce friction, not add it. Switching between projects shouldn't require mental overhead about which package manager to use.


License

The MIT License.

About

alias npm and ✨profit✨

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

  •