Skip to content

CLI reference

The Spyke CLI is run from a terminal, inside your project folder. This page lists every command.

If you’re new to Spyke, start with the getting-started tutorial instead — it walks through the common commands in order.

CommandWhat it does
spyke initStart tracking the current folder. Run once per project.
spyke saveSave the current state of the program as a new version.
spyke historyList every saved version, newest first.
spyke compareShow what changed between versions.
spyke restoreBring back an earlier version.

Run any command with --help to see its options:

Terminal window
spyke save --help

Sets up the project history for the current folder — the running record of every version you save. Run this once, in the folder that holds your program file.

Terminal window
spyke init

Spyke stores the history in plain Git, so your work is never locked into a proprietary format. You don’t need to know Git to use Spyke.

Saves the current state of your program as a new version, with a short message describing it.

Terminal window
spyke save -m "Increase infeed timer preset to 5s"
OptionDescription
-m, --messageA plain-language description of the version. Required.

Write messages the way you’d explain the change to a coworker — for example, "Add jam-detection timer to infeed conveyor". Clear messages make your history easy to read later.

Lists every saved version, newest first. Each entry shows the version, who saved it, when, and the message.

Terminal window
spyke history

Shows what changed between two versions, the way an engineer reads a program — the specific rung, tag, or setpoint that changed. See Semantic diffs for how this works.

With no arguments, compare shows what’s changed since your most recent saved version:

Terminal window
spyke compare

You can also compare any two saved versions:

Terminal window
spyke compare <older> <newer>
OptionDescription
--jsonOutput the result as JSON instead of text, for use in scripts.

Brings back an earlier version of the program, so you can return to a state you know worked.

Terminal window
spyke restore <version>

Use spyke history to find the version you want.