Skip to main content

CLI tool for Ignition SCADA 8.3+ REST API

Project description

ignition-cli

CLI tool for the Ignition SCADA 8.3+ REST API. Built with Typer, httpx, and Pydantic.

Quick Start

# Install from PyPI
pip install ignition-cli

# Configure a gateway connection (--webdev-project enables tag read/write)
ignition-cli config add dev --url https://gateway:8043 --token "keyId:secretKey" --webdev-project mcp-connector

# Test the connection
ignition-cli config test

# Check gateway status
ignition-cli gateway status

Commands

Command Group Description Key Commands
config Manage gateway profiles init, add, list, show, test, set-default, remove
gateway Gateway operations status, info, backup, restore, modules, logs, loggers, log-download, scan-projects, scan-config, entity-browse
project Manage Ignition projects list, show, create, delete, export, import, copy, rename, resources, diff, watch
tag Tag operations browse, read*, write*, export, import, providers
device Device connections list, show, restart (supports --module/--type for non-OPC-UA)
resource Generic resource CRUD list, show, create, update, delete, names, types, upload, download
perspective Perspective views, pages, styles view list/show/create/update/delete/tree, page list/show/update, style list/show/create/update/delete, session show/update
mode Deployment modes list, show, create, update, delete, assign, unassign
api Raw API access get, post, put, delete, discover, spec

* Tag read and write require the included SFLOW MCP Connector or a custom WebDev endpoint. Use --webdev-project to configure.

Output Formats

All list/show commands support --format / -f with: table (default), json, yaml, csv.

ignition-cli project list -f json | jq '.[].name'
ignition-cli gateway status -f yaml

Authentication

  • API Token (recommended): --token "keyId:secretKey" (sent as X-Ignition-API-Token header)
  • HTTP Basic Auth: --username admin --password secret
  • Environment variables: IGNITION_GATEWAY_URL, IGNITION_API_TOKEN

Tag Read/Write Setup

Tag read and write are not part of the standard Ignition REST API. They require a WebDev endpoint on the gateway.

Recommended: Install the included SFLOW MCP Connector (contrib/mcp-connector.zip) on your gateway. See contrib/README.md for instructions.

Then configure your profile with the WebDev project name:

ignition-cli config add dev --url https://gateway:8043 --token "keyId:secretKey" --webdev-project mcp-connector

Or pass it per-command:

ignition-cli tag read "[default]HMI/Temperature" --webdev-project mcp-connector
ignition-cli tag write "[default]HMI/Setpoint" 75.0 --webdev-project mcp-connector

Without --webdev-project, the CLI falls back to a direct /tags/read endpoint (non-standard, requires a custom module).

Tools

Perspective View Previewer

tools/perspective-viewer.html — a self-contained HTML file that renders Perspective view JSON locally in a browser. No server or dependencies required.

  • Paste JSON or drag & drop a .json file
  • Load via URL parameter: ?file=path for Playwright automation
  • Keyboard shortcut: Ctrl/Cmd+Enter to render
  • Controls: Dark/light background, component outlines toggle, fit-to-pane scaling
  • Renders: Coord/flex/column/drawing/breakpoint/tab/split containers, labels, buttons, inputs, vessel/pump/valve/motor/sensor symbols, SVG shapes (path, rect, circle, ellipse, polygon), embedded view placeholders

Documentation

Run ignition-cli --help for full usage information. See docs/usage.md for the complete reference.

Scenarios

8 production-ready automation scripts in docs/scenarios/ for tasks where the CLI provides unique value:

# Scenario # Scenario
1 Tag Snapshot & Version Control 5 Tag Template Factory
2 Tag Diff Across Gateways 6 Upgrade Verification
3 Resource Inventory Export 7 Compliance Audit Report
4 Bulk Device Commissioning 8 Environment Cloning

Development

git clone https://github.com/floriansmeyers/SFLOW-Ignition-CLI.git
cd SFLOW-Ignition-CLI
pip install -e ".[dev]"
pytest tests/

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ignition_cli-0.4.0.tar.gz (739.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ignition_cli-0.4.0-py3-none-any.whl (45.0 kB view details)

Uploaded Python 3

File details

Details for the file ignition_cli-0.4.0.tar.gz.

File metadata

  • Download URL: ignition_cli-0.4.0.tar.gz
  • Upload date:
  • Size: 739.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for ignition_cli-0.4.0.tar.gz
Algorithm Hash digest
SHA256 7132782175e3085b8f790bae331fda184ec0883e05aa7e500cd3e131c7fe4632
MD5 0b7959dc77b4490b877d731a1d534b88
BLAKE2b-256 a72ea2c666e5f953b863fcf0a67e2684f41847328dfb42614f17c0af2eedd99e

See more details on using hashes here.

File details

Details for the file ignition_cli-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: ignition_cli-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 45.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for ignition_cli-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e2cceb41de57523d170785d3b7179b896b329b2a74bd8913e0ee505df475a553
MD5 98e90b9a3b67a457078e8936b3d31106
BLAKE2b-256 d48f4c81c6a39794cf451bda3f83951801a25a891ab5693b53c88185f04e87ae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page