Command line interface#

PyAEDT provides a command line interface (CLI) for starting AEDT sessions, working with open projects, running scripts, exporting data, and opening documentation directly from a terminal.

Get started#

To see the available commands, run:

pyaedt --help

All commands can be run with --json to output results in JSON format for easy parsing in scripts.

$ pyaedt --json version
{"status": "ok", "data": {"version": "1.0.dev0"}}

$ pyaedt version
PyAEDT version: 1.0.dev0

Main commands#

The CLI is organized into these top-level commands:

  • version - Display the installed PyAEDT version

  • aedt-versions - List AEDT versions installed on the machine

  • session - Start, list, stop, or attach to AEDT sessions

  • project - List, open, create, save, and close AEDT projects

  • script - Run a Python script inside AEDT

  • export - Export screenshots or design configuration data

  • panels - Install PyAEDT panels into AEDT

  • doc - Open PyAEDT documentation and related resources

  • test-config - Create, inspect, or update tests/local_config.json

Version commands#

Use the version commands to check the installed PyAEDT version or AEDT versions on the machine.

PyAEDT version

pyaedt version

AEDT installed version

pyaedt aedt-versions

Session commands#

Use the session group to manage running AEDT instances.

Start a session

pyaedt session start
pyaedt session start --version 2026.1
pyaedt session start --non-graphical
pyaedt session start --port 50051
pyaedt session start -v 2026.1 -ng --port 50051

By default, session start uses the most recent stable AEDT version installed and port 50051. Use --port 0 to let AEDT choose an available port automatically.

List running sessions

pyaedt session list

This shows the PID, detected AEDT version, and port for each running session.

Attach to a running session

pyaedt session attach
pyaedt session attach --port 50051
pyaedt session attach --port 50051 --project MyProject --design MyDesign

If --port is omitted, PyAEDT shows an interactive list of running sessions. When available, IPython is used for the interactive console.

Stop sessions

pyaedt session stop --port 50051
pyaedt session stop --all

Project commands#

Use the project group to work with projects in an already running AEDT gRPC session. These commands require --port.

List open projects and designs

pyaedt project list --port 50051

Open a project

pyaedt project open my_project.aedt --port 50051

Create a project

pyaedt project create --port 50051 --project DemoProject

Create a design in a project

pyaedt project create --port 50051 --project DemoProject --design Filter1 --type Hfss

Supported design types include Hfss, Maxwell2d, Maxwell3d, Q3d, Q2d, Icepak, Circuit, TwinBuilder, Mechanical, Emit, Rmxprt, Hfss3dLayout, and MaxwellCircuit.

Save the active project

pyaedt project save --port 50051
pyaedt project save --port 50051 --path saved_copy.aedt

Close a project

pyaedt project close --port 50051
pyaedt project close --port 50051 --project DemoProject

Script commands#

Use run to execute a Python script.

Run a script

pyaedt run my_script.py --port 50051

The script runs with an attached Desktop object available as desktop.

Run an Ironpython script

pyaedt run my_script.py --ironpython --port 50051

Ironpython scripts only support native AEDT API.

Export commands#

Use export to extract files from the active design.

Export a screenshot

pyaedt export screenshot --port 50051 --path screenshot.jpg
pyaedt export screenshot --port 50051 --project DemoProject --design Filter1

Export design configuration

pyaedt export config --port 50051
pyaedt export config --port 50051 --output config.json
pyaedt export config --port 50051 --project DemoProject --design Filter1

If --output is omitted, the exported JSON is printed to the terminal.

Panels management#

Use panels add to install PyAEDT panels into AEDT.

pyaedt panels add --personal-lib "C:\\Users\\username\\AppData\\Roaming\\Ansoft\\PersonalLib"
pyaedt panels add --personal-lib "C:\\Users\\username\\AppData\\Roaming\\Ansoft\\PersonalLib" --reset
pyaedt panels add --personal-lib "C:\\Users\\username\\AppData\\Roaming\\Ansoft\\PersonalLib" --minimal

Useful options:

  • --reset - Remove the existing Toolkits directory before installing

  • --minimal - Install only the light panel set (PyAEDT Console and Run Script)

  • --skip-version-manager - Skip the Version Manager panel

  • --skip-extension-manager - Skip the Extension Manager panel

Documentation shortcuts#

Use the doc group to open online documentation and project resources:

pyaedt doc
pyaedt doc getting-started
pyaedt doc installation
pyaedt doc user-guide
pyaedt doc api
pyaedt doc examples
pyaedt doc github
pyaedt doc issues
pyaedt doc changelog
pyaedt doc search hfss mesh

Open the changelog for a specific version

pyaedt doc changelog 0.26.1

If no subcommand is provided, pyaedt doc opens the documentation home page.

Test configuration#

Use test-config to manage the local test configuration stored in tests/local_config.json.

pyaedt test-config
pyaedt test-config --show

Running pyaedt test-config starts an interactive configuration flow.

Common workflows#

Start AEDT, inspect projects, and stop it

pyaedt session start --version 2026.1 --port 50051
pyaedt session list
pyaedt project list --port 50051
pyaedt session stop --port 50051

Run a script against a running session

pyaedt session start --non-graphical --port 50051
pyaedt run my_script.py --port 50051
pyaedt session stop --port 50051

Export design data

pyaedt export screenshot --port 50051 --project DemoProject --design Filter1
pyaedt export config --port 50051 --project DemoProject --design Filter1 --output filter1.json

Requirements#

If the pyaedt command is not available, install PyAEDT with CLI dependencies:

pip install pyaedt[all]

The interactive attach console uses IPython when it is installed.

Get help#

Use --help on any command group or command to see the available options:

pyaedt --help
pyaedt session --help
pyaedt project --help
pyaedt run --help
pyaedt export --help
pyaedt panels add --help
pyaedt doc --help
pyaedt test-config --help