Cleep-cli
This utility helps developers to build Cleep applications providing some useful commands:
- Core commands:
coregetto clone or pull official Cleep repository.coredocsto generate core documentation in HTML format.coresyncto synchronize sources from repository to execution folders.coreteststo perform core unit tests suite (--functionalfor real OS binary tests on device / OS migration).coretestscovto display last core tests code coverage report.cpuprofto run CPU profiler on application execution instance.memprofto run memory profiler on application execution instance.resetclear existing installed Cleep files and install it again.
- Module commands:
modcreateto create module (aka application) skeleton.moddeleteto delete installed files of a module.moddocsto generate module documentation.modsyncto synchronize sources from module folder to execution folders.modteststo execute module unit tests (--functionalfor real OS/device tests).modtestscovto display last module tests code coverage report.modbuildto create application package (.zip)modcheckbackto check app backend (python files structure and content)modcheckfrontto check app frontend (js files and desc.json)modcheckteststo check app tests filesmodcheckscriptsto check app scripts filesmodcheckcodeto check backend code quality (run pylint)
- Watch commands:
watchto watch for repository filesystem changes and automatically update files on execution folders. It also restart backend or/and frontend according to changes (catch-up sync on start).watchsvcto install/enable/disable/restart the durablecleep-watchsystemd unit (runswatchoutsidecleep.service).syncallto force a one-shot sync of core + all modules (same catch-up as watch start).
- Misc commands:
versionto get cleep-cli version
Installation
Cleep-cli is automatically installed and managed by Cleep developer application.
If you want to install it manually, execute following command:
pip install cleepcli
Compatibility
This cli is written in Python and is supposed to be used only on Raspbian platform for Cleep application development because it has harcoded paths.
Help
Execute this command to get help on this cli:
cleep-cli --help
Watch usage
Preferred: let the CLI own the durable systemd unit:
cleep-cli watchsvc install
cleep-cli watchsvc enable
The unit runs cleep-cli watch, survives systemctl restart cleep, and on each start performs a catch-up syncall so files written while the watcher was down are applied.
Manual one-shot resync (when the UI looks stale):
cleep-cli syncall
cleep-cli watchsvc restart # catch-up again + resume watch
You can still run cleep-cli watch in a terminal for debugging. Push sources to /root/cleep-dev (CleepDesktop developer sync or SFTP); the watcher copies them into the execution folders and restarts backend/frontend as needed.
Paths
The cli clone repository on /root/cleep-dev folder. Modules are in /root/cleep-dev/modules folder.
So if you develop on Cleep core, your editor must sync to /root/cleep-dev remote directory while if you're developping only on a module your editor must sync to /root/cleep-dev/modules/<your module name> remote directory.
Visual studio code
Install Visual studio code sftp plugin and configure it to access your raspberry pi:
- Open VSCode command palette pressing CTRL-SHIFT-P
- Type "sftp: config"
- Fill opened file with:
{
"name": "cleep",
"host": "<raspberry pi ip address>",
"protocol": "sftp",
"port": 22,
"username": "root",
"remotePath": "/root/cleep-dev/modules/<your module>/" or "/root/cleep-dev/",
"uploadOnSave": false,
"syncOption": {
"delete": true,
"skipCreate": false,
"ignoreExisting": false,
"update": false
},
"watcher": {
"files": "**/*.{sh,py,js,css,html,json}",
"autoUpload": true,
"autoDelete": true
},
"ignore": [".vscode", ".git"]
}
Local developments
If you want to develop directly on the raspberry using vim or nano, simply develop on /root/cleep-dev/ directory. Cleep-cli watcher will synchronize all your modifications.
How it works
This cli executes git commands to clone or update repository.
It uses rsync commands to synchronize files.
It uses pylint to check code quality (it returns a score)
The watchdog python library is used to detect changes on filesystem. According to changed files, it detects if change occurs on frontend or backend files and send commands to restart Cleep application.
CI (GitHub Actions)
A tag vX.Y.Z (or a manual workflow_dispatch) builds a py3 wheel + sdist on ubuntu-latest (Python 3.12) via python -m build and uploads them to PyPI.
GitHub environment actions (Settings → Environments), secret:
| Secret | Description |
|---|---|
PYPI_API_TOKEN |
PyPI API token (pypi-...). Username Twine is __token__. |
No Raspberry Pi / Woodpecker needed: the package is pure Python (py3-none-any).
Metadata
Release files for cleepcli 1.48.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cleepcli-1.48.0.tar.gz | 80.1 kB | Without provenance | Details for cleepcli-1.48.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cleepcli-1.48.0-py3-none-any.whl | Python 3 | none | any | Details for cleepcli-1.48.0-py3-none-any.whl |
Total release size: 160.3 kB
Release files / cleepcli-1.48.0.tar.gz
| Download URL | cleepcli-1.48.0.tar.gz |
|---|---|
| Size | 80.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e5f9e7ff0f6e730875e957376c66d25d80f5febf0a0d347d42c8cd5377cc7954
|
|
BLAKE2b-256 checksum How to use checksums |
dab18788c676bd67d9c79029a967cab82e48f98b4253ea40bd363a35e952cd5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / cleepcli-1.48.0-py3-none-any.whl
| Download URL | cleepcli-1.48.0-py3-none-any.whl |
|---|---|
| Size | 80.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
05a4737b2265a16396ad37332c8fffdd505e0d773c5c29cfa6e1db35509c9d5b
|
|
BLAKE2b-256 checksum How to use checksums |
a3eb85d7abf2a7c7244e93b91b2f4c9d48d438b32327372ec58f3bf44f77ef0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Security for cleepcli 1.48.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.