How can I add buttons to the sidebar?
I found a solution for this one, actually, you can do this with:

Javascript: Craft.elementIndex.addButton($('&lt;a href="http:/##" class="btn submit" /&gt;').html('test'))

Template: Just add a div with class .buttons, Craft's javascript will check for that and you won't get duplicated divs.

{% block sidebar %}
  &lt;div class="buttons"&gt;
     &lt;a href="http://##" class="btn submit"&gt;Download CSV&lt;/a&gt;
  &lt;/div&gt;
  {{ parent() }}
{% endblock %}


Done.
I hope this helps others too.