Install Optics

Install the optics command, then add only the drivers and engines your platform needs.

Beginner, about 5 min

Optics has two parts. The core is the optics command, which reads your tests and runs them. Engines are optional add-ons: a driver for each kind of target (browser, phone, TV) and extra ways to find things on screen. You install the core once and add engines as you need them.

Before you begin#

You need Python 3.12 or newer. Check with:

$ python3 --version
Python 3.12.13

If you have an older version, install a current one from python.org or your system's package manager.

Install the core#

We recommend the installer. It creates a private Python environment under ~/.optics, adds optics to your PATH, and leaves your system Python alone.

$ curl -fsSL https://optics-framework.org/install | sh

Open a new terminal so it picks up the updated PATH, then check the install:

$ optics --version
Optics Framework 1.10.5
Installer options

Pass options after sh -s --. On Windows, set the matching environment variable before running the installer.

OptionWindows variableWhat it does
--version 1.10.5OPTICS_VERSIONInstall a specific release.
--extra appium,easyocrOPTICS_EXTRAInstall engines at the same time.
--dir PATHOPTICS_INSTALL_DIRInstall somewhere other than ~/.optics.
--no-modify-pathOPTICS_NO_MODIFY_PATHDon't edit your shell profile.
--dry-runPrint what would happen and change nothing.
--uninstallRemove the managed install.
$ curl -fsSL https://optics-framework.org/install | sh -s -- --extra playwright,easyocr

Add engines for your platform#

The core install ships without drivers, so it stays small. Add the ones for what you test. optics setup installs engines that match your Optics version:

$ optics setup --install playwright

Playwright needs no server. Optics downloads its Chromium browser for you. To use Selenium instead, see Web.

Run optics setup with no options to pick engines from a list instead, or optics setup --list to see every name.

Optional engines#

Add these when a page tells you to. You don't need them for your first test.

EngineInstall nameAdds
EasyOCReasyocrFinds elements by reading text on a screenshot. Runs locally.
TesseractpytesseractA lighter OCR engine. Needs the Tesseract program installed too.
Google Visiongoogle-visionCloud OCR. Needs Google Cloud credentials.
GeminillmPlain-English test creation and AI self-heal. Needs a Gemini API key.
MCP servermcpLets AI agents drive Optics. Install with pip: pip install "optics-framework[mcp]".

Bundles install several at once: mobile (Appium), web (Playwright and Selenium), vision (all OCR engines) and all (everything except the MCP server). The engines reference lists every engine.

Check your setup#

optics doctor checks Python, each engine, and the tools around them:

$ optics doctor
🩺 optics doctor

Core
  ✅ python                            3.12.13
  ✅ optics-framework                  installed, version 1.10.5

Engines
  ⚠️ Appium                            appium-python-client not installed
      → optics setup --install appium
  ✅ Playwright                        playwright 1.63.0

Web
  ✅ playwright browser                Chromium download found

✅ rows are ready. ⚠️ rows are optional or not needed for your platform. Pass a project folder (optics doctor my_project) to also check its config.yaml.

If the install doesn't work#

  • **optics: command not found.** Open a new terminal. If it still fails, add ~/.optics/bin to your PATH, as the installer printed.
  • **optics setup refuses to install.** Conda, pipx and tool-managed environments (uv tool, Poetry, PDM) manage their own packages, so optics setup prints the right command for that tool instead. Run that command, or use a plain virtual environment.
  • EasyOCR fails under Conda. EasyOCR and Optics need different NumPy versions under Conda. Use the installer or a standard venv.

Troubleshooting covers more cases.

Next steps#