Skip to content

Getting started

This tutorial walks you through the one thing Spyke is built for: keeping track of changes to a PLC program. By the end you’ll have saved your first versions and compared them — the everyday loop most teams use Spyke for.

It takes about ten minutes. You don’t need to know Git.

  1. Start tracking a PLC program.
  2. Save a version.
  3. Make a small change and save another version.
  4. Compare the two versions to see exactly what changed.

You’ll need two things:

  • The Spyke CLI installed. The CLI is the command-line tool you run from a terminal. If you don’t have it yet, see Install the CLI.
  • A PLC program file to track. Any program you’ve exported from your PLC software works. The examples below use a Studio 5000 export named LINE3_PALLETIZER.L5X, but the steps are the same for any file.

Put the program file in its own folder. That folder is your project — the set of files Spyke watches.

Open a terminal, move into your project folder, and tell Spyke to start tracking it:

Terminal window
cd LINE3_PALLETIZER
spyke init

spyke init sets up the project history — the running record of every version you’ll save. You only do this once per project.

Behind the scenes, Spyke stores this history in plain Git, so your work isn’t locked into a proprietary format. You don’t need to know anything about Git to use Spyke, but it’s there if you ever want it.

A version is a snapshot of your program at a moment in time, with a short note describing it. Saving the current state as your starting point:

Terminal window
spyke save -m "Initial version of the palletizer program"

The -m flag is the message — a plain-language description of what this version is. Good messages make the history easy to read later, so write them the way you’d explain the change to a coworker:

  • “Initial version of the palletizer program”
  • “Add jam-detection timer to infeed conveyor”
  • “Raise fill setpoint on Tank 2 to 480 L”

That’s it. The version is saved, and it will stay in your history even as you keep working.

Now make a real edit. In your PLC software, open the program, make a small change — say, adjust a timer preset on one rung — and export the file back to the same folder, replacing the old one.

Back in the terminal, save the new state as another version:

Terminal window
spyke save -m "Increase infeed timer preset to 5s"

You now have two versions in your history: where you started, and where you are now.

This is where version control earns its keep. To see exactly what changed between your two versions:

Terminal window
spyke compare

Spyke shows the difference the way an engineer reads a program — the specific rung and the timer preset that changed — rather than as raw text. There’s more on how this works in Semantic diffs.

You can also list your full history at any time:

Terminal window
spyke history

Each entry shows the version, who saved it, when, and the message you wrote.

You’ve put a PLC program under version control and run the core loop:

  • Save a version whenever you reach a state worth keeping.
  • Compare versions to see exactly what changed.

That loop is the foundation of everything else Spyke does.