Set filters on view via script?

I’m assuming the answer is no because I couldn’t find any documentation anywhere, but is there anyway to update a filter on a view with a script?

Still trying to work around the lack of context filter applying to all levels in a list/table and figured maybe a script could do it.