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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cleepcli-1.43.9.tar.gz (59.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cleepcli-1.43.9-py3-none-any.whl (69.8 kB view details)

Uploaded Python 3

File details

Details for the file cleepcli-1.43.9.tar.gz.

File metadata

  • Download URL: cleepcli-1.43.9.tar.gz
  • Upload date:
  • Size: 59.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for cleepcli-1.43.9.tar.gz
Algorithm Hash digest
SHA256 1fa5a477286d7c71b007fa019e826db9f678db6794405d32c19c6ba060a9c353
MD5 331a5c951459afb49266674db915f8e3
BLAKE2b-256 1805f141872e3160825388014c3f8bfdf5e8d3dc09a4fa17b641713a1eaea87c

See more details on using hashes here.

File details

Details for the file cleepcli-1.43.9-py3-none-any.whl.

File metadata

  • Download URL: cleepcli-1.43.9-py3-none-any.whl
  • Upload date:
  • Size: 69.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for cleepcli-1.43.9-py3-none-any.whl
Algorithm Hash digest
SHA256 f723a56ee626e4581283ddf175e8d77418df30bc53c34a94336773fe8f5432a5
MD5 c06b5b753dd5ac8a071e75cd052919ac
BLAKE2b-256 8bd4b4cd075d19ddea8fcc6e07ba81f5a61ed7f4a011130f7a090553ef251992

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.43.9 This release

2 files

1.43.8

2 files

1.43.7

2 files

1.43.5

2 files

1.43.4

2 files

1.43.3

2 files

1.43.2

2 files

1.43.1

2 files

1.43.0

2 files

1.42.0

2 files

1.41.0

2 files

1.40.1

2 files

1.40.0

2 files

1.39.2

2 files

1.39.1

2 files

1.39.0

2 files

1.38.2

2 files

1.38.1

2 files

1.38.0

2 files

1.37.4

2 files

1.37.3

2 files

1.37.2

2 files

1.37.1

2 files

1.37.0

2 files

1.36.0

2 files

1.35.2

2 files

1.35.1

2 files

1.35.0

2 files

1.34.2

2 files

1.34.1

2 files

1.34.0

2 files

1.33.4

2 files

1.33.3

2 files

1.33.2

2 files

1.33.1

2 files

1.33.0

2 files

1.32.13

2 files

1.32.12

2 files

1.32.11

2 files

1.32.10

2 files

1.32.7

2 files

1.32.6

2 files

1.32.5

2 files

1.32.4

2 files

1.32.3

2 files

1.32.2

2 files

1.32.1

2 files

1.32.0

2 files

1.31.1

2 files

1.30.0

2 files

1.29.4

2 files

1.29.3

2 files

1.29.2

2 files

1.29.1

2 files

1.29.0

2 files

1.28.4

2 files

1.28.3

2 files

1.28.2

2 files

1.28.1

2 files

1.28.0

2 files

1.27.0

2 files

1.26.13

2 files

1.26.12

2 files

1.26.11

2 files

1.26.10

2 files

1.26.9

2 files

1.26.8

2 files

1.26.7

2 files

1.26.6

2 files

1.26.5

2 files

1.26.4

2 files

1.26.3

2 files

1.26.2

2 files

1.26.1

2 files

1.26.0

2 files

1.25.0

2 files

1.24.1

2 files

1.24.0

2 files

1.23.5

2 files

1.23.4

2 files

1.23.3

2 files

1.23.2

2 files

1.23.1

2 files

1.23.0

2 files

1.22.4

2 files

1.22.3

2 files

1.22.2

2 files

1.22.1

2 files

1.22.0

2 files

1.21.9

2 files

1.21.8

2 files

1.21.7

2 files

1.21.6

2 files

1.21.5

2 files

1.21.4

2 files

1.21.3

2 files

1.21.2

2 files

1.21.1

2 files

1.21.0

2 files

1.20.2

2 files

1.20.1

2 files

1.20.0

2 files

1.19.5

2 files

1.19.4

2 files

1.19.3

2 files

1.19.2

2 files

1.19.1

2 files

1.19.0

2 files

1.18.6

2 files

1.18.5

2 files

1.18.4

2 files

1.18.3

2 files

1.18.2

2 files

1.18.1

2 files

1.18.0

2 files

1.17.3

2 files

1.17.2

2 files

1.17.1

2 files

1.17.0

2 files

1.16.0

2 files

1.15.0

2 files

1.14.4

2 files

1.14.3

2 files

1.14.2

2 files

1.14.1

2 files

1.14.0

2 files

1.13.1

2 files

1.13.0

2 files

1.12.1

2 files

1.12.0

2 files

1.11.0

2 files

1.10.3

2 files

1.10.2

2 files

1.10.1

2 files

1.10.0

2 files

1.9.0

2 files

1.8.1

2 files

1.8.0

2 files

1.7.0

2 files

1.6.0

2 files

1.5.0

2 files

1.4.4

2 files

1.4.3

2 files

1.4.2

2 files

1.4.1

2 files

1.4.0

2 files

1.3.1

2 files

1.3.0

2 files

1.2.4

2 files

1.2.3

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

1.1.1

2 files

1.1.0

2 files

1.0.7

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

3 files

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