ASP Chef CLI
A simple CLI to run ASP Chef, in headed or headless mode.
Install
The suggested way is via pip:
$ pip install asp-chef-cli
$ playwright install
Docker is another option (headed mode needs extra parameters):
$ sudo docker run -i malvi/asp-chef-cli
$ sudo docker run -i --net=host --env="DISPLAY" --volume="$HOME/.Xauthority:/root/.Xauthority:rw" malvi/asp-chef-cli
Usage
Run with one of the following commands:
$ python -m asp_chef_cli --help
$ sudo docker run malvi/asp-chef-cli --help
Add the recipe (an ASP Chef sharable URL) with the option --url (quote the URL as it contains characters like # that breaks bash and other terminals).
The headless mode can be activated with the flag --headless (always active in the docker image).
Possibly change the default browser used by playwright with the option --browser.
Finally, give a command to execute:
runsimply runs the recipe as it is;run-withruns the recipe with the input replaced by the one specified either with the option--inputor via the prompt.serverstarts a server for@dumbo/*operations.
The flag --help can be specified after a command to get a list of arguments for that command.
Examples
Let us consider this simple recipe with no input and guessing the atom world.
The recipe can be run headless by giving the following command:
$ python -m asp_chef_cli --headless --browser=chromium --url="https://asp-chef.alviano.net/#eJxtkNuOgjAQhl+plNUsl4srUKIQEXu6s+Ch2CIJIpan33bdRC/2ajKnf/75DibtRBt69QLNiUGSbkfJyawRsFAUqqFKMEBNpxl5TNz1YvzXC7w6ee5xHfUV3PWoTRWDauRbq+X3ck82MpfpJf/ePXhZGS6Bn+mltyo3MGvYLS8Z5AsAGVzOuN5AppGtr+Vqkd6rGBtGi07AD6dRchIZBk+nkgQXbr0gOUrhh2BPgqEyaH4w6VTHwfjuldFwFMlF5m1hauL8ZVfhV69cn9We1Ff3w7r5Gu1dW38op4famy/8tOcJGH5vtfjGNDaouRo3x4iaOF2/aT1ZURhNFGZ30Wag0pFlW0z/8vNDw0nRMRgBxwup4Mh0NPGSAep9OgaW5flOIR4YdD8XRxuHOsbDizkOjtgLfgC4qpvc%21" run
EMPTY MODEL
§
world.
It is possible to specify a different input as follows:
$ python -m asp_chef_cli --headless --browser=chromium --url="https://asp-chef.alviano.net/#eJxtkNuOgjAQhl+plNUsl4srUKIQEXu6s+Ch2CIJIpan33bdRC/2ajKnf/75DibtRBt69QLNiUGSbkfJyawRsFAUqqFKMEBNpxl5TNz1YvzXC7w6ee5xHfUV3PWoTRWDauRbq+X3ck82MpfpJf/ePXhZGS6Bn+mltyo3MGvYLS8Z5AsAGVzOuN5AppGtr+Vqkd6rGBtGi07AD6dRchIZBk+nkgQXbr0gOUrhh2BPgqEyaH4w6VTHwfjuldFwFMlF5m1hauL8ZVfhV69cn9We1Ff3w7r5Gu1dW38op4famy/8tOcJGH5vtfjGNDaouRo3x4iaOF2/aT1ZURhNFGZ30Wag0pFlW0z/8vNDw0nRMRgBxwup4Mh0NPGSAep9OgaW5flOIR4YdD8XRxuHOsbDizkOjtgLfgC4qpvc%21" run-with --input "hello."
hello.
§
hello.
world.
Local Server for @dumbo/* Operations
The server for @dumbo/* operations can be executed with the command server.
By default, it uses port 8000 (a different port can be specified using --port or -p; in this case, the port must be changed also in the options of ASP Chef).
For development, add the --reload flag so that the server is updated when the Python code of the CLI is changed.
The Docker version must specify port mapping, for example:
$ sudo docker run -p 8000:8000 malvi/asp-chef-cli server --host 0.0.0.0
Metadata
Release files for asp-chef-cli 0.5.6
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 |
|---|---|---|---|---|
| asp_chef_cli-0.5.6.tar.gz | 13.7 kB | Without provenance | Details for asp_chef_cli-0.5.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| asp_chef_cli-0.5.6-py3-none-any.whl | Python 3 | none | any | Details for asp_chef_cli-0.5.6-py3-none-any.whl |
Total release size: 29.5 kB
Release files / asp_chef_cli-0.5.6.tar.gz
| Download URL | asp_chef_cli-0.5.6.tar.gz |
|---|---|
| Size | 13.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d53b0ab779a0ffd227cadd3bd99dcd755144a51f2373df38c465b47423f14b7b
|
|
BLAKE2b-256 checksum How to use checksums |
a0cf6134d07af04b2093d1ed550fc57c11b5918b43394df8b9c238c6e2f75caf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.13.7 Linux/6.14.0-15-generic
|
Release files / asp_chef_cli-0.5.6-py3-none-any.whl
| Download URL | asp_chef_cli-0.5.6-py3-none-any.whl |
|---|---|
| Size | 15.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
44a7c173f1f4a180605b7f00485fea1adedbec55a70c0794dfbb8cc254d6406d
|
|
BLAKE2b-256 checksum How to use checksums |
316668c3ea0ea228d6ce53dcad608f7b566b558cef37264f586205cb9d73741e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.13.7 Linux/6.14.0-15-generic
|
Security for asp-chef-cli 0.5.6
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.