In order to get started, you'll want to install Mantri's command line interface (CLI) globally. You may need to use sudo (for OSX, *nix, BSD etc) or run your command shell as Administrator (for Windows) to do this.

npm install -g mantri-cli

This will put the mantri command in your system path, allowing it to be run from any directory.

Note that installing mantri-cli does not install the mantri library! The job of the Mantri CLI is simple: run the version of Mantri which has been installed in your project. This allows multiple versions of Mantri to be installed on the same machine simultaneously.

During development, your web application needs two files to operate, the web runtime and Mantri configuration. The Mantri runtime is the only javascript file you need to include in your html document. To get those two files run the init cli command.

mantri init

This will create the files mantri.web.js and mantriConf.json in your current directory. Use the -h flag to get help for the Mantri CLI in general or a spefic command mantri init -h.

You can declare all your third-party dependencies in the mantriConf.json configuration file. Once defined, Mantri will load them before your application and they will be available in the global context, e.g. access jQuery like you would using the global $ or jQuery variables.

As you've noticed, you are providing and requiring namespaces, not filenames. This enables some interesting feats like being able to move files around without the need to update any of your files. Mantri will do the dirty job for you by scanning and mapping the namespaces to actual filenames, this is called the deps command.

mantri deps --src=js/ --dest=js/deps.js

If you create or edit a dependency declaration you will need to run the deps command.