6.1Symfony CLI常用命令一览表


symfony [全局选项] <命令> [命令选项] [参数...]


--help, -h
--quiet, -q
//Increase the verbosity of messages: 1 for normal output, 2 and 3 for more verbose outputs and 4 for debug
-v|vv|vvv, --verbose, --log-level  
//查看symfony cli版本

Available wrappers

Runs PHP (version depends on project's configuration).
Environment variables to use SymfonyCloud relationships or Docker services are automatically defined.

//Runs Composer without memory limit
//Runs the Symfony Console (bin/console) for current project                                                    
//Runs the named binary using the configured PHP version                                                    
php, pecl, pear, php-fpm, php-cgi, php-config, phpdbg, phpize  


account:info                                                                 Show info about your Symfony account
account:ips                                                                  List SymfonyCloud IPs for use in scripts
account:login, login                                                         Log in with your SymfonyConnect account
account:logout, logout                                                       Logout from your SymfonyConnect account
account:ssh:key:add                                                          Add an SSH key
account:ssh:key:remove                                                       Remove an SSH key
account:ssh:keys                                                             List project's SSH keys


book:check-requirements, book:check                                          Check that you have all the pre-requisites locally to code while reading the "Symfony 5: The Fast Track" book
book:checkout                                                                Check out a step of the "Symfony 5: The Fast Track" book repository


domain:attach                                                                Attach a domain
domain:cname, cname                                                          Display the CNAME value to use in DNS entries
domain:default                                                               Display/Set the default domain
domain:detach                                                                Detach a domain
domain:get                                                                   Show detailed information for a domain
domain:list, domains                                                         List domains
domain:update                                                                Update a domain


env:activate                                                                 Activate one or several environments
env:activity, activity, history                                              Display activity history for an environment
env:checkout                                                                 Checkout a SymfonyCloud environment as a local Git branch
env:cp                                                                       Copy files/folders between your host and the local machine
env:create                                                                   Create an environment
env:cron, cron                                                               Run a cron for the environment
env:db:dump, db:dump                                                         Dump remote database
env:db:size, db:size                                                         Estimate the disk usage of a database
env:deactivate                                                               Deactivate one or several environments
env:debug, debug                                                             Debug an environment by switching Symfony to the debug mode temporarily
env:delete                                                                   Delete an environment
env:deploy, deploy                                                           Deploy an environment
env:fpm:status, php-fpm-status                                               Get PHP-FPM status
env:link                                                                     Link a local branch to an environment
env:list, envs                                                               List environments
env:logs, log, logs                                                          Display logs for an environment
env:mount:list, mount:list                                                   Get a list of mounts
env:mount:size, mount:size                                                   Check the disk usage of mounts
env:needs-deploy                                                             Check if the current environment needs to be deployed
env:redeploy, redeploy                                                       Redeploy an environment, shortcut for deploy --reuse-build 
env:rsync                                                                    Rsync files/folders between your host and the local machine
env:setting:list, env:settings                                               List settings for an environment
env:setting:set                                                              Change setting value for an environment
env:sql, sql                                                                 Run SQL on the remote database
env:ssh, ssh                                                                 Open an SSH connection to the app container
env:sync                                                                     Synchronize environment's data from the parent one
env:urls, urls                                                               Show public URLs for this environment
env:validate                                                                 Validate an environment configuration


env:backup:create, env:snapshot:create, env:snapshots:create, backup:create  Create a backup of an environment
env:backup:list, env:snapshots, env:snapshots:list, backups, env:backups     List project backups
env:backup:restore, env:snapshot:restore, backup:restore                     Restore an environment backup


integration:add                                                              Configure an integration with a third-party service
integration:delete                                                           Delete an integration
integration:get                                                              Display details for an integration
integration:list, integrations                                               List project integrations


local:check:requirements, check:requirements, check:req
local:check:security, security:check, check:security, local:security:check
local:new, new
//Auto-discover the list of available PHP version
//Attach a local domain for the proxy                                                   
local:proxy:domain:attach, proxy:domain:attach
//Detach domains from the proxy                             
local:proxy:domain:detach, proxy:domain:detach
//Start the local proxy server (local domains support)                              
local:proxy:start, proxy:start
//Get the local proxy server status                                             
local:proxy:status, proxy:status
//Stop the local proxy server                                          
local:proxy:stop, proxy:stop
//Run a program with environment variables set depending on the current context                                               
local:run, run
local:server:ca:install, server:ca:install
local:server:ca:uninstall, server:ca:uninstall
//查看所有已配置本地web server
local:server:list, server:list
//查看本地web server日志
local:server:log, server:log
local:server:prod, server:prod
//运行一个本地web server
local:server:start, serve, server:start
//查看本地web server状态
local:server:status, server:status
//停止本地web server
local:server:stop, server:stop


//在浏览器打开本地项目mail catcher
open:support, open:issue


project:create                                                               Create a new project
project:delete                                                               Delete current project
project:deploy-key                                                           Display the SSH deploy key of a project
project:edit, project:update                                                 Edit a project's quota
project:git-url                                                              Display the Git remote URL of a project
project:info                                                                 Display information about the current project
project:init, init                                                           Initialize a new project using templates
project:link, link                                                           Link current git repository to a SymfonyCloud project
project:list, projects                                                       List active projects
project:rename                                                               Rename a project
project:scale                                                                Scale a project up or down
project:unlink, unlink                                                       Unlink current git repository


project:billing:accept                                                       Confirm that the project should not be ended (charging will occur at the end of the trial period)
project:billing:unsuspend, project:unsuspend                                 Unsuspend (reactivate) a project by paying unpaid invoices (charging will occur immediately)
project:billing:update-card                                                  Update card used for billing


self:help, help, list
self:update, self-update
self:version, version


tunnel:close                                                                 Close SSH tunnels
tunnel:info                                                                  View relationships for SSH tunnels
tunnel:list, tunnels                                                         List SSH tunnels
tunnel:open                                                                  Open SSH tunnels to the app's services


user:add                                                                     Add a user to the project
user:list, users                                                             List project users
user:remove                                                                  Remove a user from the project


var:delete                                                                   Delete one or more variables from a project or an environment
var:disable                                                                  Disable one or more variables for an environment
var:enable                                                                   Enable one or more variables for an environment
var:export                                                                   Export environment variables depending on the current context
var:get, vars                                                                List variables
var:set                                                                      Set one or multiple variables for a project or an environment