Command line interface#

PyAEDT provides a command line interface (CLI) to help you manage AEDT processes and test configurations from your terminal. The CLI offers simple commands to start, stop, and monitor AEDT sessions without writing any Python code.

Get started#

To use the CLI, open your terminal and type:

pyaedt --help

This displays all available commands and options.

Main Commands#

The PyAEDT CLI provides these main commands:

  • version - Display the installed PyAEDT version

  • processes - List all running AEDT processes

  • start - Start a new AEDT session

  • stop - Stop running AEDT processes

  • attach - Attach to a running AEDT process for interactive work

  • config - Manage test configuration settings

  • panels - Install PyAEDT panels in AEDT

  • doc - Quick access to PyAEDT documentation

Display version#

Check which version of PyAEDT you have installed:

pyaedt version

This shows the current PyAEDT version number.

List running processes#

View all AEDT processes currently running on your system:

pyaedt processes

This command displays useful information for each process:

  • Process ID (PID)

  • Process name

  • Command line arguments

  • Port number (if available)

Start AEDT#

Launch a new AEDT session directly from the command line:

pyaedt start

This starts AEDT with default settings (latest AEDT version released, graphical mode).

You can customize the startup with these options:

Set AEDT Version

pyaedt start --version 2025.2
pyaedt start -v 2025.2

Non-Graphical Mode

Run AEDT without the user interface (useful for automation):

pyaedt start --non-graphical
pyaedt start -ng

Specify Port

Set a specific port for the AEDT connection:

pyaedt start --port 50051
pyaedt start -p 50051

Student Version

Start the AEDT Student edition:

pyaedt start --student

Combine Options

You can use multiple options together:

pyaedt start -v 2025.2 -ng -p 50051

Stop AEDT#

Stop running AEDT processes using different methods:

Stop by Process ID

pyaedt stop --pid 12345

Stop multiple processes:

pyaedt stop --pid 12345 --pid 67890

Stop by Port

pyaedt stop --port 50051

Stop All AEDT Processes

pyaedt stop --all
pyaedt stop -a

Attach to AEDT#

Attach to a running AEDT process and launch an interactive PyAEDT console:

pyaedt attach

This command detects all running AEDT processes and presents them in an interactive menu. You can select which process to attach to; this launches an IPython console with a PyAEDT Desktop instance already connected to that process.

Direct Attachment by PID

If you already know the process ID, attach directly:

pyaedt attach --pid 12345
pyaedt attach -p 12345

This skips the interactive menu and connects immediately to the specified process.

Interactive Process Selection

When you run pyaedt attach, you’ll see output like this:

Found 2 AEDT process(es):

  1. PID: 12345 | Version: 2025.2 | Port: 50051
  2. PID: 67890 | Version: 2025.1 | Port: COM mode

Select process number (1-2) or 'q' to quit:

Simply enter the number of the process you want to attach to, and an interactive console opens with PyAEDT already initialized and connected.

Using the Interactive Console

Once attached, you have access to the Desktop object and can interact with AEDT:

# The Desktop object is already available as 'desktop'
desktop.project_list()

# Create a new project
hfss = ansys.aedt.core.Hfss()

# Work with your designs
hfss.modeler.create_box([0, 0, 0], [10, 10, 10])

Requirements

The attach command requires IPython to be installed:

pip install ipython

Or install PyAEDT with all optional dependencies:

pip install pyaedt[all]

Test configuration management#

The config test command helps you create and modify the test configuration file used when running PyAEDT tests. This is useful for developers and contributors.

Launch the interactive configuration tool:

pyaedt config test

This starts a guided setup that walks you through all configuration options and saves the configuration to tests/local_config.json.

To see your configuration without making changes:

pyaedt config test --show
pyaedt config test -s

You can also set individual values directly. For example:

pyaedt config test desktop-version 2025.2
pyaedt config test non-graphical true
pyaedt config test use-grpc true

For a complete description of all configuration parameters and their usage, see the Local testing parameters section in the Contributing guide.

Panels management#

The panels command helps you install PyAEDT panels into your AEDT installation. These panels provide graphical interfaces for common PyAEDT operations directly within AEDT.

Add Panels to AEDT

Install PyAEDT panels into AEDT:

pyaedt panels add

This command launches an interactive setup that:

  1. Detects installed AEDT versions on your system

  2. Prompts you to select the AEDT version

  3. Asks for the path to your PersonalLib folder

  4. Installs the PyAEDT panels

You can also provide all parameters directly:

pyaedt panels add --version 2025.2 --personal-lib "C:\\Users\\username\\AppData\\Roaming\\Ansoft\\PersonalLib"
pyaedt panels add -v 2025.2 -p "C:\\Users\\username\\AppData\\Roaming\\Ansoft\\PersonalLib"

Skip Version Manager

By default, the Version Manager panel is installed. To skip it:

pyaedt panels add --skip-version-manager

Installed Panels

The following panels are installed:

  • Console - Interactive Python console within AEDT

  • Jupyter - Launch Jupyter notebooks connected to AEDT

  • Run Script - Execute Python scripts from AEDT

  • Extension Manager - Manage PyAEDT extensions

  • Version Manager - Switch between AEDT versions (optional)

After installation, restart AEDT to see the new panels on the Automation tab.

Common PersonalLib Locations

If you’re not sure where your PersonalLib folder is located:

Windows:

C:\\Users\\<username>\\AppData\\Roaming\\Ansoft\\PersonalLib

Linux:

/home/<username>/Ansoft/PersonalLib

Documentation access#

The doc command provides quick access to PyAEDT documentation and resources directly from the command line. This opens the documentation in your default web browser.

Open Documentation Sections

Access different parts of the documentation:

pyaedt doc home              # Open documentation home page
pyaedt doc getting-started   # Open getting started guide
pyaedt doc installation      # Open installation guide
pyaedt doc user-guide        # Open user guide
pyaedt doc api               # Open API reference
pyaedt doc examples          # Open examples gallery

Access Development Resources

pyaedt doc github            # Open PyAEDT GitHub repository
pyaedt doc issues            # Open GitHub issues page
pyaedt doc changelog         # Open latest changelog
pyaedt doc changelog 0.9.0   # Open specific version changelog

Search Documentation

Search the documentation with keywords:

pyaedt doc search hfss        # Search for "hfss"
pyaedt doc search circuit     # Search for "circuit"
pyaedt doc search aedt mesh   # Search for "aedt mesh"

The search command accepts one or more keywords and opens the documentation search page with your query.

Practical examples#

Here are some common workflows using the CLI:

Start AEDT and Check Status

# Start AEDT
pyaedt start -v 2025.2

# Check it's running
pyaedt processes

# Stop when done
pyaedt stop --all

Interactive Development

# Start AEDT
pyaedt start -v 2025.2

# List processes to get PID
pyaedt processes

# Attach to it for interactive work (interactive menu)
pyaedt attach

# Or attach directly by PID
pyaedt attach -p 12345

# Work interactively in the console
# When done, exit the console and stop AEDT
pyaedt stop --all

Automation Script

# Start AEDT in non-graphical mode on a specific port
pyaedt start -ng -p 50051

# Your automation code runs here
python my_script.py

# Clean up
pyaedt stop --port 50051

Configure Tests

# Use interactive mode
pyaedt config test

# Or set values directly
pyaedt config test desktop-version 2025.2

Install PyAEDT Panels

# Interactive mode
pyaedt panels add

# Or provide all parameters
pyaedt panels add -v 2025.2 -p "C:\\Users\\username\\AppData\\Roaming\\Ansoft\\PersonalLib"

Quick Documentation Access

# Open API reference
pyaedt doc api

# Search for specific topics
pyaedt doc search maxwell 3d

# Open GitHub repository
pyaedt doc github

Emergency Cleanup

If AEDT processes are stuck:

# See what's running
pyaedt processes

# Stop everything
pyaedt stop --all

Troubleshooting#

Command Not Found

If pyaedt command is not recognized, ensure PyAEDT is installed with CLI support:

pip install pyaedt[all]

Cannot Stop Process

If you get “Access denied” errors:

  • You can only stop processes owned by your user

  • Some processes may require administrator privileges

  • Try closing AEDT normally from the application first

AEDT Won’t Start

Common issues when starting AEDT:

  • Verify AEDT is installed and in your system PATH

  • Check the version number is correct (for example, 2025.1, 2025.2)

  • Ensure license server is available

Configuration Not Found

The test configuration is created in the tests folder relative to the PyAEDT installation. If you’re not in a development environment, you may need to navigate to the correct directory first.

Get help#

For detailed help on any command:

pyaedt --help
pyaedt start --help
pyaedt stop --help
pyaedt attach --help
pyaedt config test --help
pyaedt panels add --help
pyaedt doc --help

For more information, visit the PyAEDT documentation or GitHub repository.