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.
For the Textual TUI editor, install the optional tui extra.
Installation
Recommended install (PyPI):
# one-time install of pipx
python -m pip install --user pipx
python -m pipx ensurepath
# install neewer-cli
pipx install neewer-cli
Alternative user install:
python -m pip install --user neewer-cli
Install with TUI support:
python -m pip install --user "neewer-cli[tui]"
Upgrade:
pipx upgrade neewer-cli
# or
python -m pip install --user --upgrade neewer-cli
TestPyPI install (maintainers/testers):
python -m pip install \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple \
neewer-cli==X.Y.Z
After install:
neewer-cli --help
neewer-cli --version
neewer-config --help
neewer-config-tui --help
PyPI publishing is handled by GitHub Actions using Trusted Publishing (OIDC), with no long-lived PyPI API keys stored in GitHub.
Quick Start
# 1) open Text UI config editor (recommended onboarding)
neewer-config-tui
# 2) discover lights (optional direct scan check)
neewer-cli --list
# 3) copy example config to default config path (optional manual setup path)
# Windows (PowerShell/CMD)
copy neewer.example.json %USERPROFILE%\.neewer
# macOS/Linux
cp neewer.example.json ~/.neewer
# 4) run interactive text wizard (non-TUI fallback)
neewer-config
# 5) run presets
neewer-cli --preset all_on
neewer-cli --preset all_off
neewer-cli --preset key_cct_5600_30
If textual is not installed, install it with:
python -m pip install "neewer-cli[tui]"
# or
python -m pip install textual
Interactive Config Editors
Two dedicated configuration tools are included:
neewer-config: wizard-style onboarding and config editingneewer-config-tui: tree-based Textual TUI for live editing
neewer-config Wizard
Use this for guided onboarding or terminal-only workflows:
neewer-config
Main flows include:
- Detailed BLE scan for discoverable Neewer lights
- Create/update groups
- Configure per-light metadata (
name,cct_only,infinity_mode) - Create/maintain presets (
POWER ON,POWER OFF, CCT) - Add/remove/move lights across existing presets
- Edit per-light CCT parameters in existing presets
neewer-config-tui Tree Editor
Use this for a visual workflow:
neewer-config-tui
Layout:
- Scan findings panel at top
- Config tree on left (
Presets,Groups,Lights) - Context editor on right for preset defaults, per-light overrides, and light metadata
Presence validation:
✓bright white: light confirmed in latest scan?grey: configured light not seen in latest scan
Assignment workflow:
- Scan lights.
- Select a scanned light in the top selector.
- Select target
GrouporPresetnode in the tree. - Use
Assign -> GrouporAssign -> Preset.
Key bindings:
Ctrl+F: scanCtrl+S: saveCtrl+R: reloadq: quit (double-press if unsaved changes)
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
# power on and apply CCT in one invocation / one BLE session
neewer-cli --light group:studio --mode CCT --temp 5600 --bri 30 --power-on-first --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
Preset entries can include the same option names as CLI flags. This includes:
power_on_first: trueto send a power-on before a non-power preset commandpower_on_delay_ms: 500to tune the delay before the follow-up command
Supported shorthand aliases inside presets and command overrides:
power_on: trueorpoweron: true->power_on_firstpower_on_delay: 500->power_on_delay_ms
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
- uses OIDC Trusted Publishing (no PyPI tokens in GitHub secrets)
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
- Configuration guide (repo mirror): docs/wiki/Configuration.md
- Interactive editor guide (repo mirror): docs/wiki/Interactive-Config-Editors.md
- 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.
Metadata
Release files for neewer-cli 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| neewer_cli-0.1.4.tar.gz | 51.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| neewer_cli-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 92.3 kB
Release files / neewer_cli-0.1.4.tar.gz
| Download URL | neewer_cli-0.1.4.tar.gz |
|---|---|
| Size | 51.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7772dbd0ef285ee4bc01b57d67f869f8aeedf948a95b31dcac6d0accbb638cc9
|
|
BLAKE2b-256 checksum How to use checksums |
306054a0697f960c0d6131ce967814d68b81408ea752393b03539175a7403ca1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 1, 2026.
Transparency logRelease files / neewer_cli-0.1.4-py3-none-any.whl
| Download URL | neewer_cli-0.1.4-py3-none-any.whl |
|---|---|
| Size | 40.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
08f54ad3f09f9ecaa76db8e52a1adf844705a129c133c619259414ae7cab7956
|
|
BLAKE2b-256 checksum How to use checksums |
d4449f45842c0108d5612769926a055a2502c4242edf77bfaefc9a04aabfb952
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 1, 2026.
Transparency log