Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

Latest commit

 

History

History
57 lines (36 loc) · 1.81 KB

README.md

File metadata and controls

57 lines (36 loc) · 1.81 KB

@atlas.js/cli

A CLI utility to work with Atlas applications.

Installation

The CLI is best used as a local dependency, but it may be installed globally, too.

npm i @atlas.js/cli

Once installed, you will have atlas command available in your node_modules/.bin/ directory (for local installations) or in your $PATH (for global installations).

Prerequisites

  • The atlas CLI should be invoked from the working directory where you have your Atlas application code. Optionally, you can specify another path by providing the --root /path/to/project flag.

  • It must be possible to call require() or import on the root/current working directory and get a configured and unstarted instance of the Atlas class. To achieve this, your project's entry point should look something like this:

    import { Atlas } from '@atlas.js/atlas'
    const app = new Atlas({
      /* configuration */
    })
    export default app
    // or
    module.exports = app

    If you created your app using the Yeoman generator this is already taken care of for you.

Usage

We will focus on local installations from now on.

From your project root, do one of

node_modules/.bin/atlas
npx atlas  # For npm 5.3 and newer

atlas CLI example

You will see a pretty help message with usage instructions.

Shell autocompletion

The CLI supports basic autocomplete features. You can enable it by running:

source <(node_modules/.bin/atlas completion bash|zsh|fish)

You can optionally save this to your shell's rc file.

License

See the LICENSE file for information.