Monocli
One CLI to rule them all
Quick Start
$ npm install --global @monocli/cli
$ monocli help
Principles
monocli
is a very simple "Meta" CLI, easing advanced usage of commonly used command line tools.
Its first goal is to help you manage your monorepos without requiring any other tool. But it's more than that!
It aim to be as generic, light, efficient and simple as possible.
-
No need to reinvent the wheel:
monocli
simply run other commands with some tricks and hacks, that it! -
Keep your freedom: you can always use other CLIs alongside
monocli
-
Learn from the bests:
monocli
helps you learn and follow good practices and conventions
monocli
is still in an early phase of development. New PR, bug reports and feature requests are more than welcome.
Commands
$ monocli <command> <params> [options]
Run monocli help
and monocli help <command>
for more information.
Generics
-
help
: display usage info
GIT
Use subtrees and follow conventionnal commits with ease.
add
Add, convert or import a "subproject" in a monorepo.
example
Convert the packages/awesome
submodule to a subtree and add the awesome
scope to all commit messages:
monocli add ./packages/awesome --scope awesome --rewrite
check
Check if a directory has changed since a given release.
This command is particularly useful for CI and incremental builds.
example
Build a project only if it changed since the last release:
monocli check packages/awesome && ./build-awesome
spush
Push new subtree commits to a remote repository.
example
monocli spush packages/awesome git@github.com:me/awesome.git
spull
Pull new subtree commits from a remote repository, and merge them to the current branch
example
monocli spull packages/awesome git@github.com:me/awesome.git
update
Update (push) the subtree associated to <directory>
alias of spush with
--force
and--branch=master
options
example
monocli update packages/awesome git@github.com:me/awesome.git
mv
Change a subtree prefix
example
monocli mv packages/awesome projects/awesome
rm
Delete a subproject
monocli rm <path>
Status
Show the monorepo status
monocli status