Use the project as a CLI #478
-
Hello |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
No, there's not a simple of way to use this package entirely as a CLI unfortunately. It was considered as a feature early on but the idea was dropped for a couple reasons:
With some modifications, you probably could have the package operate as a CLI by interacting with the Models directly, but many features would likely not work as intended and could cause damage to your pfSense instance. I personally wouldn't recommend it. |
Beta Was this translation helpful? Give feedback.
This would take a fair amount of experimentation so I wouldn't be able to provide specific steps to do it, sorry. The best I can offer is you'd need to write a PHP command line script that interacts with the API's Model classes directly. I'd recommend using the v2 API Models and the v2 API beta package as they have less reliance on HTTP attributes. Here's an example of interacting with the Model's directly. But again I'll emphasize that both pfSense and this package expect certain HTTP specific …