extism / cli

The extism CLI is used to generate plugin scaffolding and manage Extism installations
BSD 3-Clause "New" or "Revised" License
21 stars 7 forks source link

Add call subcommand #2

Closed zshipko closed 2 years ago

zshipko commented 2 years ago

Closes #1

It can be used like this:

$ extism call mycode.wasm function_name --input data

or

$ echo data | extism call mycode.wasm function_name
nilslice commented 2 years ago

getting this error after pip3 install . from the root and running the call cmd:

extism call --log-level debug ../extism/wasm/code.wasm count_vowels --input testing123
Traceback (most recent call last):
  File "/opt/homebrew/bin/extism", line 8, in <module>
    sys.exit(main())
  File "/opt/homebrew/lib/python3.10/site-packages/extism_cli/__init__.py", line 513, in main
    extism.set_log_level("-", args.log_level)
AttributeError: module 'extism' has no attribute 'set_log_level'

tried --log-level in different positions too.. I must be doing something wrong

zshipko commented 2 years ago

@nilslice - thanks, fixed it - should have been set_log_file