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.
What you’ll do
Section titled “What you’ll do”- Start tracking a PLC program.
- Save a version.
- Make a small change and save another version.
- Compare the two versions to see exactly what changed.
Before you begin
Section titled “Before you begin”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.
Step 1: Start tracking your program
Section titled “Step 1: Start tracking your program”Open a terminal, move into your project folder, and tell Spyke to start tracking it:
cd LINE3_PALLETIZERspyke initspyke 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.
Step 2: Save your first version
Section titled “Step 2: Save your first version”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:
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.
Step 3: Make a change and save again
Section titled “Step 3: Make a change and save again”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:
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.
Step 4: Compare the two versions
Section titled “Step 4: Compare the two versions”This is where version control earns its keep. To see exactly what changed between your two versions:
spyke compareSpyke 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:
spyke historyEach entry shows the version, who saved it, when, and the message you wrote.
What you’ve learned
Section titled “What you’ve learned”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.
Next steps
Section titled “Next steps”- Working with a teammate? See how to review a change before it goes to the floor.
- Want to understand the bigger picture first? Read Introduction to version control.
- Curious how Spyke shows ladder-logic changes rung by rung? See Semantic diffs.