Getting Started

The xGraph package comes with two main features: the xGraph core and the xGraph Command Line Interface (CLI). The xGraph core architecture handles compiling, instantiating and communication between xGraph systems. The xGraph CLI makes it easy to interact with xGraph systems. You can easily install xGraph using the npm package installer.

npm install

To install xGraph directly form npm, you will need the npm package manager. Once you have installed npm, you can install xGraph using the package manager.

In your command line tool, use the following command to install xGraph core globally using the npm package installer.

npm install -g xgraph

If you are on a unix operating system, such as macOS or Ubuntu, you may have to use the sudo prefix.

sudo npm install -g xgraph

xgraph Command Line Interface (CLI)

The xGraph command line interface accelerates the building and running of xGraph Systems. Using the xGraph CLI, you can generate new modules and systems, compile systems from a system structure object, and run systems from a system cache. You can use the xGraph executable CLI to run existing systems from a cache. To do this, use the command

xgraph deploy

xgraph deploy 

Deploy will look in the current working directory to run an xGraph system from a cache.

See Generating Systems for more information on building xGraph systems.

See Generating Modules for more information on building xGraph modules.

xgraph help

xGraph uses the following API commands, available in the xGraph CLI using xgraph help

Compile and Run xGraph systems with a few simple commands.

Unless otherwise specified, commands will look in the current working
directory for a config.json file or cache directory, depending on the
command.

If the system includes local module sources, these must be listed after
the command and options, [--source directory ...].

xGraph

Usage: xgraph [command] [options] [--source directory ...]

Command:
    help        h                       : Displays this help screen.

    compile     c                       : Generates a cache from a system
                                            structure file.
    deploy      d                       : Run a system from it's cache.
    reset       r                       : Run a system from system structure
                                            file, resetting the system's cache.
    execute     x|run                   : Run a system from it's cache, or
                                            it's system structure file if
                                            the cache does not exist.
    generate <module|system>    g <m|s> : Generate a new module or system
                                            from a template with the given
                                            name.

Options:
    --cwd                               : Sets the current working directory
                                            for the command.
    --config                            : Specifies a system's structure file.
    --cache                             : Specifies a system's cache directory.
    --allow-add-module                  : Enable a module to add new modules
                                            in memory to the Module cache.

Examples:
    Compile the system in the current directory.
        xgraph compile

    Deploy a module from a system structure file.
        xgraph deploy --config ./ExampleSystems/HelloWorld/config.json

    Reset a system in a different working directory with an external source.
        xgraph reset --cwd ./MultipleSystemsTemplate/Systems/Plexus/ --xGraph ../xGraph --xGraphTemplates ../../xGraphTemplates

    Generate a new module called MyFirstModule.
        xgraph generate module MyFirstModule

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning.

License

This software is licensesd under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3.
Please contact us at sales@introspectivesystems.com if you are interested in pursuing one of our Enterprise licenses.