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
Our product DrLeaf which not only makes the work easier but also reduces the effort and expenditure of the farmer to identify the disease and its treatment methods.

Our product DrLeaf which not only makes the work easier but also reduces the effort and expenditure of the farmer to identify the disease and its treatment methods. We have to upload the image of an

Aniruddha Jana 2 Feb 02, 2022
Un Assistente Vocale scritto in Python e altamente personalizzabile

Un Assistente Vocale scritto in Python e altamente personalizzabile

Marco 2 May 06, 2022
Python library for converting Python calculations into rendered latex.

Covert art by Joshua Hoiberg handcalcs: Python calculations in Jupyter, as though you wrote them by hand. handcalcs is a library to render Python calc

Connor Ferster 5.1k Jan 07, 2023
Python script to automate the change of desktop background

wallomator Python script to automate the change of desktop background A python script that automates the process of changing the desktop background. I

Mohammed Haaris Javed 10 Jun 16, 2022
combs is a package used to generate all possible combinations of a given length k on a given set.

The package combs is a package used to generate all possible combinations of a given length k on a given set. The set is given as a list, and k must b

1 Dec 24, 2021
A simple Programming Language

R.S.O.C. A custom built programming language About The Project R.S.O.C. is a custom built programming language very similar to a low-level 8085 progra

Ravi Maurya 17 Sep 13, 2022
Python Common things by Problem Fighter Library, (Exception, Debug Log, etc.)

In the name of God, the Most Gracious, the Most Merciful. PF-PY-Common Documentation Install and update using pip: pip install -U xxxx Please find the

Problem Fighter 3 Jan 15, 2022
A step-by-step tutorial for how to work with some of the most basic features of Nav2 using a Jupyter Notebook in a warehouse environment to create a basic application.

This project has a step-by-step tutorial for how to work with some of the most basic features of Nav2 using a Jupyter Notebook in a warehouse environment to create a basic application.

Steve Macenski 49 Dec 22, 2022
A (hopefully) considerably copious collection of classical cipher crackers

ClassicalCipherCracker A (hopefully) considerably copious collection of classical cipher crackers Written in Python3 (and run with PyPy) TODOs Write a

Stanley Zhong 2 Feb 22, 2022
Rotazioni: a linear programming workout split optimizer

Rotazioni: a linear programming workout split optimizer Dependencies Dependencies for the frontend and backend are respectively listed in client/packa

Marco 3 Oct 13, 2022
🤖️ Plugin for Sentry which allows sending notification via DingTalk robot.

Sentry DingTalk Sentry 集成钉钉机器人通知 Requirments sentry = 21.5.1 特性 发送异常通知到钉钉 支持钉钉机器人webhook设置关键字 配置环境变量 DINGTALK_WEBHOOK: Optional(string) DINGTALK_CUST

1 Nov 04, 2021
A tool converting rpk (记乎) to apkg (Anki Package)

RpkConverter This tool is used to convert rpk file to Anki apkg. 如果遇到任何问题,请发起issue,并描述情况。如果转换rpk出现问题,请将文件发到邮箱 ssqyang [AT] outlook.com,我会debug并修复问题。 下

9 Nov 01, 2021
An awesome list of AI for art and design - resources, and popular datasets and how we may apply computer vision tasks to art and design.

Awesome AI for Art & Design An awesome list of AI for art and design - resources, and popular datasets and how we may apply computer vision tasks to a

Margaret Maynard-Reid 20 Dec 21, 2022
This module is for finding the execution time of a whole python program

exetime 3.8 This module is for finding the execution time of a whole program How to install $ pip install exetime Contents: General Information Instru

Saikat Das 4 Oct 18, 2021
External Network Pentest Automation using Shodan API and other tools.

Chopin External Network Pentest Automation using Shodan API and other tools. Workflow Input a file containing CIDR ranges. Converts CIDR ranges to ind

Aditya Dixit 9 Aug 04, 2022
Script that creates graphical representations of Julia an Mandelbrot sets.

Julia and Mandelbrot Picture Maker This simple functions create simple plots of the Julia and Mandelbrot sets. The Julia set require the important par

Juan Riera Gomez 1 Jan 10, 2022
Github dorking tool

gh-dork Supply a list of dorks and, optionally, one of the following: a user (-u) a file with a list of users (-uf) an organization (-org) a file with

Molly White 119 Dec 21, 2022
Create rangebased on lists or values of the range itself. Range any type. Can you imagine?

funcao-allrange-for-python3 Create rangebased on lists or values of the range itself. Range any type. Can you imagine? WARNING!!! THIS MODULE DID NOT

farioso-fernando 1 Feb 09, 2022
Import modules and files straight from URLs.

Import Python code from modules straight from the internet.

Nate 2 Jan 15, 2022
A redesign of our previous Python World Cup, aiming to simulate the 2022 World Cup all the way from the qualifiers

A redesign of our previous Python World Cup, aiming to simulate the 2022 World Cup all the way from the qualifiers. This new version is designed to be more compact and more efficient and will reflect

Sam Counsell 1 Jan 07, 2022