> ## Documentation Index
> Fetch the complete documentation index at: https://developer.upsun.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Symfony CLI Tips

> Find out about the most useful commands when using the Symfony CLI.


The [Symfony CLI](https://symfony.com/download) allows you to interact with your project from the command line.

It wraps the [Upsun CLI](/cli) with added features related to Symfony.
So when using Symfony, you can replace `upsun <command>` by `symfony upsun:<command>` in all of your commands.

## Useful Symfony CLI commands

* Open the web administration console:

  ```bash theme={null}
  symfony upsun:web
  ```

* Open the URL of the current environment:

  ```bash theme={null}
  symfony upsun:url
  ```

* Open an SSH connection to your environment:

  ```bash theme={null}
  symfony upsun:ssh
  ```

* Configure a project for Upsun:

  ```bash theme={null}
  symfony project:init --upsun
  ```

* Get a list of all the domains:

  ```bash theme={null}
  symfony upsun:domains
  ```

* Create a new environment:

  ```bash theme={null}
  symfony upsun:branch new-branch
  ```

* Get a list of all the environments:

  ```bash theme={null}
  symfony upsun:environments
  ```

* Push code to the current environment:

  ```bash theme={null}
  symfony upsun:push
  ```

* Get a list of all the active projects:

  ```bash theme={null}
  symfony upsun:projects
  ```

* Add a user to the project:

  ```bash theme={null}
  symfony upsun:user:add
  ```

* List variables:

  ```bash theme={null}
  symfony upsun:variables
  ```

### Useful commands when using Symfony with a database

* Create a local dump of the remote database:

  ```bash theme={null}
  symfony upsun:db:dump --relationship database
  ```

* Run an SQL query on the remote database:

  ```bash theme={null}
  symfony upsun:sql 'SHOW TABLES'
  ```

* Import a local SQL file into a remote database:

  ```bash theme={null}
  symfony upsun:sql < my_database_backup.sql
  ```
