A lightweight solution for local Particle development.

Overview

GitHub Actions Status Build Status Docker Cloud Build Status AUR package Particle Community

neopo

A lightweight solution for local Particle development.

Neopo Screenshot

Features

  • Builds Particle projects locally without any overhead.
  • Compatible with Particle Workbench and Particle CLI.
  • Installs and manages necessary Particle dependencies.
  • Built with Python using only the standard library.
  • Supports Linux, macOS, Windows, and Raspberry Pi.
  • Supports tab completion to assist development.

Installation

Universal Installer (Linux/macOS):

$ bash <(curl -sL neopo.xyz/install)

Install from AUR:

$ yay -S neopo-git
$ neopo install

Install from source (pip):

$ git clone https://github.com/nrobinson2000/neopo
$ cd neopo
$ sudo python3 -m pip install .
$ neopo install

Docker container:

$ docker pull nrobinson2000/neopo
$ docker run -it nrobinson2000/neopo

For more installation information, please refer to the Installation tutorial.

Usage

To get started with neopo, please refer to the Quick Reference.

For descriptions of all available commands, please refer to the Complete Reference.

Comments
  • [BUG] Neopo Broken in Debian 10.8 WSL

    [BUG] Neopo Broken in Debian 10.8 WSL

    Describe the bug Neopo commands not working.

    Error Output

    $ neopo build Traceback (most recent call last): File "/usr/local/sbin/neopo", line 1026, in main commandsargs[1] File "/usr/local/sbin/neopo", line 741, in compile_command buildCommand("compile-user", 2, args) File "/usr/local/sbin/neopo", line 656, in buildCommand build(project, command, False, verbosity) File "/usr/local/sbin/neopo", line 589, in build devicePlatform, firmwareVersion = getSettings(projectPath) File "/usr/local/sbin/neopo", line 503, in getSettings data = json.loads(settings.read()) File "/usr/lib/python3.7/json/init.py", line 348, in loads return _default_decoder.decode(s) File "/usr/lib/python3.7/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.7/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 10 column 1 (char 271) An unexpected error occurred! To report this error on GitHub, please open an issue: https://github.com/nrobinson2000/neopo/issues

    $ neopo install Installing neopo... Finding Workbench extension URL... Downloading Workbench extension... Traceback (most recent call last): File "/usr/local/sbin/neopo", line 1026, in main commandsargs[1] File "/usr/local/sbin/neopo", line 753, in install_command installOrUpdate(True, force) File "/usr/local/sbin/neopo", line 313, in installOrUpdate data = getDeps() File "/usr/local/sbin/neopo", line 185, in getDeps manifest = getFile(extension, extensionFiles["manifest"]) File "/usr/local/sbin/neopo", line 131, in getFile return file.read(path) File "/usr/lib/python3.7/zipfile.py", line 1428, in read with self.open(name, "r", pwd) as fp: File "/usr/lib/python3.7/zipfile.py", line 1467, in open zinfo = self.getinfo(name) File "/usr/lib/python3.7/zipfile.py", line 1395, in getinfo 'There is no item named %r in the archive' % name) KeyError: "There is no item named 'extension/src/compiler/manifest.json' in the archive" An unexpected error occurred! To report this error on GitHub, please open an issue: https://github.com/nrobinson2000/neopo/issues

    Desktop:

    • OS: Debian 10.8 running under WSL

    Additional context Neopo was working for me fine around a week ago, but I started experiencing this issue when I tried using it yesterday.

    bug 
    opened by TrikkStar 13
  • Add

    Add "legacy" commands for serial & DFU mode management w/ baud-switcher

    Adds appropriate wrapper fns for serial open/close and dfu open/close as subcommands for the "legacy" command. Also adds docs / help strings.

    tested and working on linux

    only thing that may need to still be added is an update to "completion.py" to account for the new fns but it was unclear if the overall format would need to be changed to support doing so, so this was left off this commit

    opened by justicefreed 8
  • [BUG] No such file or directory: '~/.neopo/cache/manifest.json'

    [BUG] No such file or directory: '~/.neopo/cache/manifest.json'

    Describe the bug Script throws python error

    To Reproduce Steps to reproduce the behavior:

    1. python3 <(curl -SL https://raw.githubusercontent.com/nrobinson2000/neopo/master/bin/install.py)
    2. neopo create blink-led
    Initializing project in directory /mnt/data/particle/blink-led...
    > A new project has been initialized in directory /mnt/data/particle/blink-led
    Initialized empty Git repository in /mnt/data/particle/blink-led/.git/
    Traceback (most recent call last):
      File "/home/tom/bin/neopo", line 947, in main
        commands[args[1]](args)
      File "/home/tom/bin/neopo", line 666, in create_command
        create(os.path.dirname(projectPath), os.path.basename(projectPath))
      File "/home/tom/bin/neopo", line 423, in create
        version = loadManifest(False)["deviceOS"]
      File "/home/tom/bin/neopo", line 220, in loadManifest
        with open(jsonFiles["manifest"], "r") as file:
    FileNotFoundError: [Errno 2] No such file or directory: '/home/tom/.neopo/cache/manifest.json'
    An unexpected error occurred!
    To report this error on GitHub, please open an issue:
    https://github.com/nrobinson2000/neopo/issues
    

    Expected behavior It works

    Desktop (please complete the following information):

    • OS: Void Linux
    bug 
    opened by toluschr 7
  • [BUG] Error building on Linux

    [BUG] Error building on Linux

    Describe the bug I am unable to build an existing Particle project. It looks like this is because of missing gcc-arm

    $ neopo build
    Traceback (most recent call last):
      File "/usr/local/sbin/neopo", line 943, in main
        commands[args[1]](args)
      File "/usr/local/sbin/neopo", line 677, in compile_command
        buildCommand("compile-user", 2, args)
      File "/usr/local/sbin/neopo", line 606, in buildCommand
        build(project, command, False, verbosity)
      File "/usr/local/sbin/neopo", line 523, in build
        compilerVersion, scriptVersion, toolsVersion, firmwareVersion = loadManifest(True)
      File "/usr/local/sbin/neopo", line 227, in loadManifest
        data["gcc-arm"],
    KeyError: 'gcc-arm'
    An unexpected error occurred!
    

    Desktop (please complete the following information):

    • OS: Ubuntu 18.04 LTS
    bug 
    opened by pierrep 7
  • Error on link, missing libfl.so

    Error on link, missing libfl.so

    Describe the bug While compiling my project I get the error described below.

    To Reproduce In my project I do "neopo compile" and the following error occurs. A compile using the cloud particle-cli does not produce any problems. If you require all my code to observe this yourself, I will provided.

    Screenshots

    image

    Desktop (please complete the following information):

    • OS: raspberrypi 4
    bug 
    opened by rvnash 5
  • Errors while installing on MacOS

    Errors while installing on MacOS

    Thx for that project. I've been working a long while with po-util and really loved it; seems that there is an Issue with Apple SIP (...?)

    Describe the bug installation on MacOS is terminated with error

    copying man/neopo.1 -> /usr/share/man/man1 error: could not create '/usr/share/man/man1/neopo.1': Operation not permitted

    To Reproduce bash <(curl -sL neopo.xyz/install)

    same problem with installation via pip...

    Expected behavior clear installation

    Screenshots

    Desktop (please complete the following information): MacOS 11.4 Big Sur

    Additional context M1 Chip Python 3.9 installed, latest Version (via brew) local Particle CLI for maintaining local Particle Server

    bug 
    opened by mf42 4
  • Debuggable Builds [FEATURE]

    Debuggable Builds [FEATURE]

    ~~Problem~~ ~~I cannot use neopo to build debuggable builds for use with the vscode particle debugger~~ ~~Neopo is much faster than the built-in vscode compile / flash commands from the Particle Workbench~~ ~~Neopo is readily usable in CI/CD environments (thank you so much)~~ ~~I use a gitlab job to automate and archive builds with neopo, but I have no way of automating builds for debuggable versions. Currently debug builds are not available from the neopo build /path/to/project command~~

    Problem

    When I read the neopo docs, I thought it was not possible to build debug builds. The "flags" examples show how to do this, but they do not explain that the result of neopo flags "-D DEBUG_BUILD" will be that the build will work with the VSCode Particle Workbench Debugger. My initial reaction to this, as someone only becoming familiar with the particle ecosystem, was that it was a custom flag with only relevance to some specific project.

    Suggested Solution

    neopo build -d /path/to/project Use a neopo cli flag like -d to request a debug build

    Alternatives

    • edit the docs https://neopo.xyz/docs/full-docs to indicate that neopo flags "-D DEBUG_BUILD" will enable compatibility with the VSCode Particle Workbench Debugger. Add this line of text beneath that example: Note: the 'DEBUG_ENABLED' flag will enable compatibility with the VSCode Particle Workbench Debugger
    enhancement 
    opened by briveramelo 4
  • Invalid Firmware Version - neopo Docker

    Invalid Firmware Version - neopo Docker

    Specifically within docker neopo, Im getting the following error on all of my builds lately

    Invalid deviceOS version 5.1.0! Firmware related error! Invalid firmware version!

    I've literally reran successful bitbucket pipeline builds with exact configuration as before but now it fails.

    bug 
    opened by ajowsey 3
  • [BUG] deviceOS 3.1.0 not supported

    [BUG] deviceOS 3.1.0 not supported

    Describe the bug deviceOS 3.1.0 not supported

    To Reproduce Steps to reproduce the behavior:

    1. enter neopo get 3.1.0 into the cli and receive an error "Invalid firmware version!"

    Expected behavior Neopo will retrieve and operate commands with the deviceOS 3.1.0 firmware

    Desktop (please complete the following information):

    • OS: Ubuntu, macOS

    Additional context I am able to get this working locally by adding the missing config objects to some ~/.neopo/cache json files.

    compilers.json

    windowsx64
    {
                    "name": "gcc-arm",
                    "version": "10.2.1",
                    "main": "./bin",
                    "url": "https://binaries.particle.io/gcc-arm/windows/x64/gcc-arm-v10.2.1.tar.gz",
                    "sha256": "81d51a85dae99dd64012f620306ff14b55b38b66e4af1697b9f71cc08b63e6f8"
                },
    ...
    darwinx64
    {
                    "name": "gcc-arm",
                    "version": "10.2.1",
                    "main": "./bin",
                    "url": "https://binaries.particle.io/gcc-arm/darwin/x64/gcc-arm-v10.2.1.tar.gz",
                    "sha256": "c340f722c06f5768320bb02a1e9cb654b6f824649c17554cbff82b337b0b43af"
                },
    ...
    linuxx64
    {
                    "name": "gcc-arm",
                    "version": "10.2.1",
                    "main": "./bin",
                    "url": "https://binaries.particle.io/gcc-arm/linux/x64/gcc-arm-v10.2.1.tar.gz",
                    "sha256": "b6ce735c36c79caa02a95aaefc6d829e7d265c68eda73ac6e5afcd6cd6ba68a1"
                },
    

    firmware.json

    {
            "name": "deviceOS",
            "version": "3.1.0",
            "main": ".",
            "url": "https://binaries.particle.io/device-os/v3.1.0.tar.gz",
            "sha256": "704a908ab4a72942c0e89952ace93ac4a51a27790421b7515019ede40284d66e"
        },
    

    scripts.json

    windowsx64
    {
                    "name": "buildscripts",
                    "version": "1.10.0",
                    "main": ".",
                    "url": "https://binaries.particle.io/buildscripts/windows/x64/buildscripts-v1.10.0.tar.gz",
                    "sha256": "66a78bcd13e7cf08e9a8cab09a7ad3a1b179183b9391adbf0b39424c939f433b"
                },
    ...
    darwinx64
    {
                    "name": "buildscripts",
                    "version": "1.10.0",
                    "main": ".",
                    "url": "https://binaries.particle.io/buildscripts/darwin/x64/buildscripts-v1.10.0.tar.gz",
                    "sha256": "66a78bcd13e7cf08e9a8cab09a7ad3a1b179183b9391adbf0b39424c939f433b"
                },
    ...
    linuxx64
    {
                    "name": "buildscripts",
                    "version": "1.10.0",
                    "main": ".",
                    "url": "https://binaries.particle.io/buildscripts/linux/x64/buildscripts-v1.10.0.tar.gz",
                    "sha256": "66a78bcd13e7cf08e9a8cab09a7ad3a1b179183b9391adbf0b39424c939f433b"
                },
    

    toolchains.json

    {
            "platforms": [
                6,
                8,
                10,
                12,
                13,
                23,
                25,
                26
            ],
            "firmware": "[email protected]",
            "compilers": "[email protected]",
            "tools": "[email protected]",
            "scripts": "[email protected]",
            "debuggers": "[email protected]"
        },
    

    I also received this error after making these additions: ~/.particle/toolchains/deviceOS/3.1.0/build/arm-tools.mk:73: *** "ARM gcc version 10.2.1 or later required, but found 9.3.1". Stop. This was strange because I had uninstalled all other toolchains and their gcc versions with the vscode particle workbench. Still, I was able to resolve this by editing the .particle/toolchains/deviceOS/3.1.0/build/common-tools.mk file by adding this line: GCC_ARM_PATH = ~/.particle/toolchains/gcc-arm/10.2.1/bin/

    bug 
    opened by briveramelo 1
  • Windows testing/support: Help wanted

    Windows testing/support: Help wanted

    One of the many shortcomings of my previous Particle utilities was that they lacked Windows support. This is mainly because I don't use Windows and I don't have a Windows machine to test with. Since one of my goals when creating neopo was to make local Particle development as accommodating as possible, I think Windows support would be of great utility.

    Installing neopo inside WSL should be straightforward and installing neopo inside Cygwin should also be feasible since I believe this is how Particle Workbench manages its dependencies on Windows.

    If anyone in the community is interested in developing Windows support for neopo I'm sure many other developers would appreciate it.

    enhancement help wanted good first issue 
    opened by nrobinson2000 1
  • CVE-2007-4559 Patch

    CVE-2007-4559 Patch

    Patching CVE-2007-4559

    Hi, we are security researchers from the Advanced Research Center at Trellix. We have began a campaign to patch a widespread bug named CVE-2007-4559. CVE-2007-4559 is a 15 year old bug in the Python tarfile package. By using extract() or extractall() on a tarfile object without sanitizing input, a maliciously crafted .tar file could perform a directory path traversal attack. We found at least one unsantized extractall() in your codebase and are providing a patch for you via pull request. The patch essentially checks to see if all tarfile members will be extracted safely and throws an exception otherwise. We encourage you to use this patch or your own solution to secure against CVE-2007-4559. Further technical information about the vulnerability can be found in this blog.

    If you have further questions you may contact us through this projects lead researcher Kasimir Schulz.

    opened by TrellixVulnTeam 0
Releases(0.0.3)
Owner
Nathan Robinson
Undergraduate Computer Science student studying at Wentworth Institute of Technology
Nathan Robinson
Pardus-flatpak-gui - A Flatpak GUI for Pardus

Pardus Flatpak GUI A GUI for Flatpak. You can run, install (from FlatHub and fro

Erdem Ersoy 2 Feb 17, 2022
Control System Packer is a lightweight, low-level program to transform energy equations into the compact libraries for control systems.

Control System Packer is a lightweight, low-level program to transform energy equations into the compact libraries for control systems. Packer supports Python 🐍 , C 💻 and C++ 💻 libraries.

mirnanoukari 31 Sep 15, 2022
Something like Asteroids but not really, done in CircuitPython

CircuitPython Staroids Something like Asteroids, done in CircuitPython. Works with FunHouse, MacroPad, Pybadge, EdgeBadge, CLUE, and Pygamer. circuitp

Tod E. Kurt 14 May 31, 2022
Basic infrastructure for writing scripts in Python

Base Script Python is an excellent language that makes writing scripts very straightforward. Over the course of writing many scripts, we realized that

Deep Compute, LLC 9 Jan 07, 2023
Identifies the faulty wafer before it can be used for the fabrication of integrated circuits and, in photovoltaics, to manufacture solar cells.

Identifies the faulty wafer before it can be used for the fabrication of integrated circuits and, in photovoltaics, to manufacture solar cells. The project retrains itself after every prediction, mak

Arun Singh Babal 2 Jul 01, 2022
NASH 2021 project... this may or may not end up working 🤷‍♂️

wavespace synthesiser this is my NASH 2021 project, which may or may not end up working 🤷‍♂️ what is going on? imagine you have a big folder of audio

Ben Hayes 12 May 17, 2022
Data and analysis relating to the 5.8M Melbourne quake of 2021

quake2021 Data and analysis relating to the 5.8M Melbourne quake of 2021 Monash University Woodside Living Lab Building The building is located here T

Colin Caprani 6 May 16, 2022
because rico hates uuid's

terrible-uuid-lambda because rico hates uuid's sub 200ms response times! Try it out here: https://api.mathisvaneetvelde.com/uuid https://api.mathisvan

Mathis Van Eetvelde 2 Feb 15, 2022
A discord group chat creator just made it because i saw people selling this stuff for like up to 40 bucks

gccreator some discord group chat tools just made it because i saw people selling this stuff for like up to 40 bucks (im currently working on a faster

baum1810 6 Oct 03, 2022
An a simple sistem code in python

AMS OS An a simple code in python ⁕¿What is AMS OS? AMS OS is an a simple sistem code writed in python. This code helps you with the cotidian task, yo

1 Nov 10, 2021
Cool little Python scripts & projects I've made.

Little Python Projects A repository for neat little Python scripts I've made! How to run a script: *NOTE: You'll need to install Python v3 or higher.

dood 1 Jan 19, 2022
A tool to help plan vacations with friends and family

Vacationer In Development A tool to help plan vacations with friends and family Deployment Requirements: NPM Docker Docker-Compose Deployment Instruct

JK 2 Oct 05, 2021
A tool for study using pomodoro methodology, while study mode spotify or any other .exe app is opened and while resting is closed.

Pomodoro-Timer-With-Spotify-Connection A tool for study using pomodoro methodology, while study mode spotify or any other .exe app is opened and while

2 Oct 23, 2022
A web-based chat application that enables multiple users to interact with one another

A web-based chat application that enables multiple users to interact with one another, in the same chat room or different ones according to their choosing.

3 Apr 22, 2022
Junos PyEZ is a Python library to remotely manage/automate Junos devices.

The repo is under active development. If you take a clone, you are getting the latest, and perhaps not entirely stable code. DOCUMENTATION Official Do

Juniper Networks 623 Dec 10, 2022
Implementation of the MDMC method to search for magnetic ground state using VASP

Implementation of MDMC method ( by Olga Vekilova ) to search for magnetic ground state using VASP

Utkarsh Singh 1 Nov 27, 2021
NeurIPS'19: Meta-Weight-Net: Learning an Explicit Mapping For Sample Weighting (Pytorch implementation for noisy labels).

Meta-Weight-Net NeurIPS'19: Meta-Weight-Net: Learning an Explicit Mapping For Sample Weighting (Official Pytorch implementation for noisy labels). The

243 Jan 03, 2023
Mengzhan (John) code for Closed Loop Control system of Sharp Wave Ripples in Hippocampus CA3 region

ClosedLoopControl_Yu Mengzhan (John) code for Closed Loop Control system of Sharp Wave Ripples in Hippocampus CA3 region Creating Python Virtual Envir

Mengzhan (John) Liufu 1 Jan 22, 2022
Multifunctional Analysis of Regions through Input-Output

MARIO Multifunctional Analysis of Regions through Input-Output. (Documents) What is it MARIO is a python package for handling input-output tables and

14 Dec 25, 2022
Saturne best tools pour baiser tout le système de discord

Installation | Important | Discord 🌟 Comme Saturne est gratuit, les dons sont vraiment appréciables et maintiennent le développement! Caractéristique

GalackQSM 8 Oct 02, 2022