Skip to main content

Cleep-cli

This utility helps developers to build Cleep applications providing some useful commands:

  • Core commands:
    • coreget to clone or pull official Cleep repository.
    • coredocs to generate core documentation in HTML format.
    • coresync to synchronize sources from repository to execution folders.
    • coretests to perform core tests suite.
    • coretestscov to display last core tests code coverage report.
    • cpuprof to run CPU profiler on application execution instance.
    • memprof to run memory profiler on application execution instance.
    • reset clear existing installed Cleep files and install it again.
  • Module commands:
    • modcreate to create module (aka application) skeleton.
    • moddelete to delete installed files of a module.
    • moddocs to generate module documentation.
    • modsync to synchronize sources from module folder to execution folders.
    • modtests to execute module tests.
    • modtestscov to display last module tests code coverage report.
    • modbuild to create application package (.zip)
    • modcheckback to check app backend (python files structure and content)
    • modcheckfront to check app frontend (js files and desc.json)
    • modchecktests to check app tests files
    • modcheckscripts to check app scripts files
    • modcheckcode to check backend code quality (run pylint)
  • Watch commands:
    • watch to watch for repository filesystem changes and automatically update files on execution folders. It also restart backend or/and frontend according to changes.
  • Misc commands:
    • version to 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

Launch watch cli command to monitor changes on "/root/cleep-dev" directory after getting official Cleep repository using coreget command.

Then open your favorite editor on your development computer, configure a remote sync plugin to push local changes on your raspberry pi then cleep-cli will synchronize sources on Cleep execution environment and restart application automatically.

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.9) 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.44.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cleepcli 1.44.0
File Size Uploaded Provenance
cleepcli-1.44.0.tar.gz 64.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cleepcli 1.44.0
File Interpreter ABI Platform
cleepcli-1.44.0-py3-none-any.whl Python 3 none any Details

Total release size: 137.5 kB

Release files / cleepcli-1.44.0.tar.gz

Download URL cleepcli-1.44.0.tar.gz
Size 64.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4cc9a560372256a5106c9cf6d1529e4aa941e6c1c635a447050ea3e9aaa9d663
BLAKE2b-256 checksum
How to use checksums
74db0176f9c457492918c7be3ecf8d7ac155d029ae093c1003811ee36d6996c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / cleepcli-1.44.0-py3-none-any.whl

Download URL cleepcli-1.44.0-py3-none-any.whl
Size 72.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7cf8e1307b02acba205f522ab514eabc9b15f51a0da2165b8b4e85fe01197546
BLAKE2b-256 checksum
How to use checksums
6e7208a316803e6dc8e3d7839a8ce3bab7a620ca5cffd8f4e6aa9caa158e1683
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for cleepcli 1.44.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.

Release history Release notifications | RSS feed

This release

1.44.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page