Below is a code snippet which I use to ensure that only necessary plugins are loaded when running symfony commands via Command Line Interface (CLI).

// config/ProjectConfiguration.class.php
class ProjectConfiguration extends sfProjectConfiguration
{
    public function setup()
    {
        ....

        //-----
        // Plugins
        //-----
        $basePlugins = array(
            'sfDoctrinePlugin',
            'userPlugin'
        );

        // Only add web plugins if we are not being accessed via cli
        if (php_sapi_name() === 'cli') {
            $webPlugins = array();
        } else {
            $webPlugins = array(
                'sfFormExtraPlugin',
                'sfJqueryReloadedPlugin',
                'icsicsBreadcrumbsPlugin'
            );
        }

        $this->enablePlugins(
            array_merge($basePlugins, $webPlugins)
        );
        //------

        ....
    }
}

Code is trivial, basically any plugins you need to add for CLI and web should be added to $basePlugins array, any web only plugins should be added to $webPlugins array as long as PHP is not running in CLI mode.