Standalone Neewer BLE CLI utility
Project description
neewer-cli
Standalone Neewer BLE command-line utility focused on fast and reliable control without a GUI.
Why This Tool
- CLI-only workflow for scripting and automation.
- Reliability controls for unstable BLE environments (retries, passes, bounded parallelism).
- Fast fixed-rig operation with config-driven
--skip-discovery. - Presets, groups, and per-light command overrides keyed by MAC.
Attribution
This project is based on and derives protocol/model support from:
- NeewerLite-Python by Zach Glenwright
- https://github.com/taburineagle/NeewerLite-Python
Requirements
- Python
3.9+ - Bluetooth adapter with BLE support
The runtime BLE dependency (bleak) is installed automatically by package install commands below.
Installation
Current recommended install (GitHub source):
# one-time install of pipx
python -m pip install --user pipx
python -m pipx ensurepath
# install neewer-cli from GitHub
pipx install git+https://github.com/SergeDubovsky/neewer-cli.git
Alternative user install:
python -m pip install --user git+https://github.com/SergeDubovsky/neewer-cli.git
After install:
neewer-cli --help
neewer-cli --version
PyPI publishing is handled by GitHub Actions using Trusted Publishing (OIDC).
Quick Start
# 1) discover lights
neewer-cli --list
# 2) copy example config to default config path
# Windows (PowerShell/CMD)
copy neewer.example.json %USERPROFILE%\.neewer
# macOS/Linux
cp neewer.example.json ~/.neewer
# 3) run presets
neewer-cli --preset all_on
neewer-cli --preset all_off
neewer-cli --preset key_cct_5600_30
Common Commands
# turn configured lights on/off quickly
neewer-cli --preset all_on
neewer-cli --preset all_off
# send direct command to specific MACs
neewer-cli --light D2:E2:75:8B:36:45,F8:46:85:EF:47:70 --mode CCT --temp 5600 --bri 30
# fast fixed-rig mode (no scan)
neewer-cli --light group:studio --preset all_on --skip-discovery
# persistent low-latency mode (keep connections open)
neewer-cli --serve --light group:studio --skip-discovery --debug
Configuration
Default config path:
~/.neewer(Windows:%USERPROFILE%\.neewer)
Top-level config keys:
defaults: default CLI flagslights: per-MAC metadata (name,cct_only,infinity_mode,hw_mac, optional feature flags)groups: named MAC setspresets: reusable command setspresets.<name>.per_light: per-light command overrides in one run
Optional per-light feature flags in lights:
supports_status_query: override model detection for--statusquery commandssupports_extended_scene: override model detection for extended scene payloads
Reference material:
- Example config: neewer.example.json
- Wiki configuration guide: https://github.com/SergeDubovsky/neewer-cli/wiki/Configuration
Reliability Tuning
For flaky BLE environments, tune:
--scan-attempts--resolve-timeout(short BLE handle resolve scan for--skip-discovery)--connect-retries--write-retries--passes(adaptive retries for failed lights only)--parallel
For stable fixed setups, keep lights fully defined in config and use --skip-discovery to reduce latency.
Advanced Protocol (Experimental)
Advanced commands are opt-in behind feature flags and still gated by per-model support.
Status query (power/channel):
neewer-cli --light group:studio --status --enable-status-query --skip-discovery
Extended scene arguments (supported models only):
neewer-cli --light group:studio --mode SCENE --scene 12 --bri 40 \
--scene-hue-min 20 --scene-hue-max 240 --scene-speed 7 \
--enable-extended-scene
If auto-detection is wrong for a specific light, set supports_status_query or
supports_extended_scene for that MAC in config.
Serve Mode
--serve keeps BLE connections open and accepts commands from stdin:
neewer-cli --serve --light group:studio --skip-discovery --debug
Interactive commands:
onoffcct <temp> <bri> [gm]hsi <hue> <sat> <bri>scene <effect> <bri>preset <name>helpexit
Security
- Private vulnerability reporting is enabled.
- Code scanning (CodeQL) is enabled for
pythonandactions. - Secret scanning and push protection are enabled.
Please report security issues privately per SECURITY.md.
Releases
GitHub releases include wheel and source distribution artifacts:
Maintainer release flow:
- Update
versioninpyproject.toml. - Run local checks (
ruff,pytest,build,twine check). - Commit and push to
main. - Tag and push (
git tag vX.Y.Z && git push origin vX.Y.Z). - Release workflow:
- builds + tests
- publishes to TestPyPI (
testpypienvironment) - publishes to PyPI (
pypienvironment) - creates a GitHub Release with built artifacts
Trusted Publishing setup requirement:
- In both TestPyPI and PyPI project settings, add this repository/workflow as a Trusted Publisher for:
- owner/repo:
SergeDubovsky/neewer-cli - workflow:
.github/workflows/release.yml - environments:
testpypiandpypi
- owner/repo:
Project Docs
- Wiki home: https://github.com/SergeDubovsky/neewer-cli/wiki
- Developer guide: https://github.com/SergeDubovsky/neewer-cli/wiki/Developer-Guide
- Contributing: CONTRIBUTING.md
- Release process: RELEASING.md
- Security policy: SECURITY.md
- Support policy: SUPPORT.md
- Code of conduct: CODE_OF_CONDUCT.md
License
MIT. See LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file neewer_cli-0.1.1.tar.gz.
File metadata
- Download URL: neewer_cli-0.1.1.tar.gz
- Upload date:
- Size: 26.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70be630bea72f452ee10cb2ee6503432c8f186ee8edd8171df291d515fd84254
|
|
| MD5 |
c9dc421ea9cbd70e1ff92e2f83dff887
|
|
| BLAKE2b-256 |
9eddd6d768231d134daf0018989f28ccefb7ba72a5509406928162e76222488b
|
Provenance
The following attestation bundles were made for neewer_cli-0.1.1.tar.gz:
Publisher:
release.yml on SergeDubovsky/neewer-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
neewer_cli-0.1.1.tar.gz -
Subject digest:
70be630bea72f452ee10cb2ee6503432c8f186ee8edd8171df291d515fd84254 - Sigstore transparency entry: 1004163841
- Sigstore integration time:
-
Permalink:
SergeDubovsky/neewer-cli@bbe5f213c2d3ca82666df690693947cab9e98507 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/SergeDubovsky
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bbe5f213c2d3ca82666df690693947cab9e98507 -
Trigger Event:
push
-
Statement type:
File details
Details for the file neewer_cli-0.1.1-py3-none-any.whl.
File metadata
- Download URL: neewer_cli-0.1.1-py3-none-any.whl
- Upload date:
- Size: 21.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15edd47ba26bae02478b109881aa1d46aaa20e5eae1f977b2c9546f49aed13a4
|
|
| MD5 |
ebb7355123441d1939ba35619984977d
|
|
| BLAKE2b-256 |
16567252037ecb8854035c60184a671f729d25c6434deff4678c2efa3c4287df
|
Provenance
The following attestation bundles were made for neewer_cli-0.1.1-py3-none-any.whl:
Publisher:
release.yml on SergeDubovsky/neewer-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
neewer_cli-0.1.1-py3-none-any.whl -
Subject digest:
15edd47ba26bae02478b109881aa1d46aaa20e5eae1f977b2c9546f49aed13a4 - Sigstore transparency entry: 1004163848
- Sigstore integration time:
-
Permalink:
SergeDubovsky/neewer-cli@bbe5f213c2d3ca82666df690693947cab9e98507 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/SergeDubovsky
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bbe5f213c2d3ca82666df690693947cab9e98507 -
Trigger Event:
push
-
Statement type: