Code repository - view creation

I find very useful the views, but it seems that is not possible to create them through code, it would be very interesting to provide this feature to generate programmatically this views from code repositories