https://github.com/cfengine/cfengine-cli
https://github.com/cfengine/cfengine-cli
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/cfengine/cfengine-cli
- Owner: cfengine
- License: gpl-3.0
- Created: 2025-02-21T11:40:34.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2026-01-02T20:39:20.000Z (28 days ago)
- Last Synced: 2026-01-09T10:26:21.965Z (21 days ago)
- Language: Python
- Size: 335 KB
- Stars: 0
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CFEngine command line interface (CLI)
A CLI for humans to interact with CFEngine, enabling downloading and installing packages, building policy sets, deploying, and enforcing policy.
It is practically a wrapper around our other tools, like `cf-agent`, `cf-hub`, `cf-remote` and `cfbs`.
**Warning:** This is an early version.
Things might be missing or changed.
Proceed with caution and excitement.
## Installation
Install using pip:
```bash
pip install cfengine
```
## Usage
### Run the CFEngine agent - evaluate and enforce policy
```bash
cfengine run
```
### CFEngine CLI help
```bash
cfengine help
```
### Print CFEngine CLI version
```bash
cfengine version
```
### Automatically format source code
```bash
cfengine format
```
### Check for errors in source code
```bash
cfengine lint
```
Note that since we use a different parser than `cf-agent` / `cf-promises`, they are not 100% in sync.
`cf-agent` could point out something as a syntax error, while `cfengine lint` does not and vice versa.
We aim to make the tree-sitter parser (used in this tool) more strict in general, so that when `cfengine lint` is happy with your policy, `cf-agent` will also accept it.
(But the opposite is not a goal, that `cfengine lint` must accept any policy `cf-agent` would find acceptable).
### Build a policy set
```bash
cfengine build
```
(This is equivalent to running `cfbs build`).
## Supported platforms and versions
This tool will only support a limited number of platforms, it is not intended to run everywhere CFEngine runs.
Currently we are targeting:
- Officially supported versions of macOS, Ubuntu, and Fedora.
- Officially supported versions of Python.
It is not intended to be installed on all hosts in your infrastructure.
CFEngine itself supports a wide range of platforms, but this tool is intended to run on your laptop, your workstation, or the hub in your infrastructure, not all the other hosts.
## Backwards compatibility
This CLI is entirely intended for humans.
If you put it into scripts and automation, expect it to break in the future.
In order to make the user experience better, we might add, change, or remove commands.
We will also be experimenting with different types of interactive prompts and input.
## Development, maintenance, contributions, and releases
Looking for more information related to contributing code, releasing new versions or otherwise maintaining the CFEngine CLI?
Please see the [HACKING.md](./HACKING.md) file.