Information for: DEVELOPERS   PARTNERS

Using the Dev Studio CLI

The Dev Studio command-line interface (CLI) includes command line-based documentation you can use to explore its available functions by running the following command from a command prompt window:

ads help

Commands within the Dev Studio CLI can be nested, or they can be within topics to provide a clear experience. Dev Studio CLI exposes these topics of commands before listing every related command. For a tutorial about a specific command, add the --help parameter for the command. For example, running ads api --help displays results similar to the following:

Utilize the Cloud Platform REST API. Run api:setup to insert your api keys.

USAGE
   ads api:COMMAND

COMMANDS
  api:accounts                   Returns details about your account.
  api:agreement                  Accepts a legal agreement by UUID.
...

Displaying CLI help topics

Dev Studio CLI includes over 200 commands for interacting with Cloud Platform. To view a list of topics and commands, run either of the following commands:

  • ads help: Displays all top-level topics.
  • ads help <topic>: Displays all commands for the specified topic.

Overriding CLI commands

Important

Overriding commands can cause your application to not function properly.

If you need to change an ads command for a project, you can override the command by using a project-based YAML configuration file. To generate a sample configuration file, run the command with an --override flag, and then edit the listed file to run the code needed for your environment. Dev Studio supports only the chaining of commands.

You can override the following commands:

The following example overrides the ads deploy command:

Command

ads deploy --override

Results

ads deploy is now overridden in /home/acquia/ads-projects/vagrant1/ads.yml
with a sample command.
Use ads deploy --delete-override to restore the original command.
Please edit ads.yml as needed:
--

version: 1
commands:
  deploy:
    commands:
      - echo "ads deploy is overwritten by this in ads.yml"
    concurrent: false
    exitOnError: true
    verbose: true

[[email protected] vagrant1]$ ads deploy
[18:29:54] echo "ads deploy is overwritten by this in ads.yml" [started]
ads deploy is overwritten by this in ads.yml
[18:29:54] → ads deploy is overwritten by this in ads.yml
[18:29:54] echo "ads deploy is overwritten by this in ads.yml" [completed]

To cancel the override, run the command with the --delete-override flag, as displayed in the following example:

Command

ads deploy --delete-override

Results

ads deploy is no longer overridden.

Troubleshooting Dev Studio CLI

To troubleshoot most Dev Studio CLI-related error messages, complete the following steps:

  • Re-run commands using --verbose to diagnose issues.
  • Use ads logs:tail [ENVIRONMENT] when running commands to get log output to terminal.
Error message Resolution
No container found for PROJECTNAME Run ads start from the project directory to start Lando.
Invalid commit message!

The override for the Acquia BLT Git hooks is -n. For example:

git commit -m "message" -n