SVGO
Node.js tool for optimizing SVG files
...This can include editor metadata, comments, hidden elements, default or non-optimal values and other stuff that can be safely removed or converted without affecting the SVG rendering result. Some options can be configured with CLI though it may be easier to have the configuration in a separate file. SVGO has a plugin-based architecture, so almost every optimization is a separate plugin.