6.1Symfony CLI常用命令一览表

句法

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

全局选项

//查看帮助
--help, -h
//关闭ANSI输出            
--no-ansi
//开启ANSI输出
--ansi
//关闭交互功能
--no-interaction
//不输出任何消息
--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版本
-V

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
composer
//Runs the Symfony Console (bin/console) for current project                                                    
console
//Runs the named binary using the configured PHP version                                                    
php, pecl, pear, php-fpm, php-cgi, php-config, phpdbg, phpize  

account

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

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

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

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

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

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

//核查symfony项目依赖
local:check:requirements, check:requirements, check:req
//核查项目以来里面的安全问题
local:check:security, security:check, check:security, local:security:check
//新建一个symfony项目
local:new, new
//查看本地的PHP版本
local:php:list
//Auto-discover the list of available PHP version
local:php:refresh
//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
//安装本地HTTPS支持                                                             
local:server:ca:install, server:ca:install
//卸载本地HTTPS支持
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

open

//打开在线文档
open:docs
//在浏览器打开本地项目
open:local
//在浏览器打开本地项目RabbitMQ
open:local:rabbitmq
//在浏览器打开本地项目mail catcher
open:local:webmail
//在浏览器打开远程项目
open:remote
//在浏览器打开远程项目RabbitMQ
open:remote:rabbitmq
//打开web支持页面
open:support, open:issue

project

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

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

//查看授权信息
self:about
//清除CLI更新的之前版本
self:cleanup
//查看命令帮助
self:help, help, list
//回滚cli到前一个版本
self:rollback
//更新cli到最新版本
self:update, self-update
//查看cli版本
self:version, version

tunnel

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

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

var

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

原创文章,作者:huoxiaoqiang,如若转载,请注明出处:https://www.huoxiaoqiang.com/php/symfony/6568.html

发表评论

登录后才能评论