1.2.20 • Published 2 years ago

agnitio-cli v1.2.20

Weekly downloads
81
License
BSD-3-Clause
Repository
-
Last release
2 years ago

Generic badge

Agnitio Command Line Tool

The Agnitio Command Line Tool is a utility for developers to make it easier to work with Agnitio Accelerator presentations.

Installing this tool will allow a user to type agnitio [command] from command line.

It is built using NodeJS and will be published to the official NPM registry.

Prerequisites

Mac OSX

In order for the tool to build properly you should have Xcode installed. Once Xcode is installed, make sure the Xcode Command Line Tool is enabled.

Windows

Python 2.7 and Visual Studio are required for successful installation. The Python environment variable need to be set to where it was installed, e.g.

set PYTHON=C:\Python27\python.exe (environment variable can also be set permanently)

Visual Studio Community is available for free if needed. If using Visual Studio 2015 (including VS Community) then you need to first create a C++ project in that tool before installing. In the process you should Install Visual C++ 2015 Tools For Windows Desktop.

Lite Version

If above prerequisites are difficult to install then try the lite version instead.

Installing

npm install agnitio-cli -g

Depending on your NodeJS install you might have to use sudo in front of above command:

sudo npm install agnitio-cli -g

Development

during development run node bin/agnitio [command]

API

Use --help after any command to see description and options for the command.

builder

Will build and run the current presentation in builder mode. A UI will allow presentation to be updated from browser. Default port opened is 8080 but it can be changed using the --port [port number] option.

Example: agnitio builder

NOTE: The Builder version supplied in this tool is the deveopment version and might be sligthly different from the official Builder release accessed through Agnitio Mobilizer application.

run

Will build and run the current presentation in develop mode. Presentation will be reloaded when source code is updated. Default port opened is 3000 but it can be changed using the --port [port number] option.

Example: agnitio run

build

Will build the current presentation (slide and module files)

Example: agnitio build

upgrade

Will update Accelerator to the latest release.

Example: agnitio upgrade

slide slide_name

Will create a new slide. A prompt will be opened guiding you through available options. Slide names with spaces have to be encased in quotation marks (").

Example: agnitio slide "New slide"

module module_id

Will create a new module. A prompt will be opened guiding you through available options. Module ids should not have spaces in them. It's recommended to namespace the module.

Example: agnitio module ag-demo-module

Troubleshooting

If you get a Error: listen EADDRINUSE message when running a webserver you can try the following (on MAC/Linux):

lsof -i :3000 | grep LISTEN (replace port 3000 if you used something else)

You should get something looking like this:

node 7440 yourUser 11u IPv6 0x81c7fdf947b4b000 0t0 TCP *:hbci (LISTEN)

Then kill the process:

kill -9 7440 (replace the PID 7440 with the result you got from information above)

If the above doesn't work, or is too daunting then a computer restart should also take care of it. Running the server on a different port with --port 3001 should also work until you restart.