When neopo is run with no arguments, or with
help, brief documentation for all user-accessible commands is displayed.
neopo neopo help
Install Particle dependencies and setup the neopo environment. It takes an optional parameter of
-f, which is used to force dependencies to be reinstalled, rather than skipped if already installed.
neopo install neopo install -f
Upgrade the neopo utility to the latest version available on GitHub. To update dependencies use
Remove the neopo utility from the system. The
~/.neopo directories are left untouched.
List all of the known versions and platforms available to neopo. To select a platform and deviceOS version for a project, use
Create a new Particle project at the specified project path. The created project is compatible with neopo, Particle Workbench, and Particle CLI. If
git is installed on your system, the project is additionally initialized as a repository and support for TravisCI is added.
neopo create myProject neopo create ~/Documents/myProject
Access the Particle CLI executable used internally by neopo. By simply prefixing any Particle CLI command with
neopo particle, the powerful features of Particle CLI can be accessed easily. The documentation for Particle CLI can be found here: https://docs.particle.io/reference/developer-tools/cli/
neopo run compile-all myProject neopo particle login neopo particle list
Compile the application firmware of a given Particle project, or the current directory if it’s a project. Settings applied using
configure will be passed to the compiler. The verbosity of the output can be increased with the
-v flag, or the output can be quieted with the
neopo compile myProject neopo compile myProject -v neopo compile myProject -q neopo compile neopo compile -v neopo compile -q
compile. Added for convenience.
Compile application firmware and then flash the firmware to a connected device using DFU. Structure identical to
Compile application and system firmware and then flash all parts to a connected device using DFU. Structure identical to
Clean application firmware. Usually unnecessary but can eliminate some build errors. Structure identical to
Run a specified makefile target for a project. Includes common targets used by
Build Options, and other targets. The
-q flags are supported.
neopo run neopo run help myProject neopo run compile-all myProject neopo run compile-all myProject -v neopo run clean-debug -q
Configure the device platform and deviceOS version a project should use. The platform and version are checked for compatibility and the specified version of deviceOS will be downloaded if it’s not already installed. To find deviceOS versions and their supported platforms use
versions. The tab completion function is especially handy here since it can fill in platforms and versions.
neopo configure argon 1.5.2 neopo configure electron 1.5.4-rc.1 myProject
EXTRA_CFLAGS variable for a project to be used during compilation.
neopo flags "-D FLAG_ONE=abc -D FLAG_TWO=123" neopo flags "-D DEBUG_ENABLED" myProject
View configured settings for a project. The device platform, deviceOS version, and
EXTRA_CFLAGS will be printed out.
neopo settings neopo settings myProject
Verify or install the specified Particle libraries in
project.properties for a project. This command is useful when working with a project that uses the cloud compiler because this allows you to quickly download the same libraries locally in a project.
neopo libs neopo libs myProject
An advanced command used to run a supported command iteratively for all connected devices. For each connected device, the deviceID is printed, the device is put into DFU mode, and the specified iteration command executed. This command was designed for quickly flashing to multiple connected devices, but there are many other ways this command can be used.
-q flags can be passed if the iterated command supports them.
neopo iterate flash neopo iterate flash-all myProject -q neopo iterate run compile-user myProject -v neopo iterate run script myScript
One of the most powerful features of neopo is the scripting interface. Neopo scripts are a list of commands to run sequentially. Each command should be placed on its own line. Empty lines and lines starting
# are skipped. Any neopo command can be used in a neopo script, even Particle commands.
Neopo scripts are plain-text and do not require an extension.
Here is an example script:
# Configure the current project configure argon 1.5.2 # Prompt the user to plug in a device print "Please plug in your device." wait # Flash firmware to the device flash # Prompt the user to wait for the device to connect print "Please wait for your device to connect to the cloud." wait # Subscribe to incoming messages particle subscribe
If this script was named
testDevice and in the current directory, to run it you would first need to copy it into the central neopo scripts directory with:
neopo load testDevice
Next, to run the
testDevice script you would use the following:
neopo script testDevice
There are nearly infinite scripts that can be made, and I highly recommend using the scripting interface to automate numerous Particle development tasks.
Redownload the Workbench manifest and download Particle dependencies if there are newer versions available.
Download a specified deviceOS version for later use. Handy for situations when you need to download firmware in advance.
neopo get 0.7.0 neopo get 1.5.2
When using neopo in bash and similar shells, tab completion is supported through the tab completion function.
While typing most neopo commands and arguments you can press the tab key to get suggestions and fill in arguments, making development very convenient.
When installing neopo on Linux the tab completion function is installed automatically. On other operating systems the user must download and source the script manually.
If you have a
~/.bashrc file already, setting up tab completion is simple.
mkdir -p ~/.completion curl -sLo ~/.completion/neopo https://git.io/JJkF5 echo 'source $HOME/.completion/neopo' >> ~/.bashrc