Skip to main content
Version: v2 ⚡

Edit Steps locally

If you're a developer, you can use your favorite text editor and make changes offline, committing and pushing to GitHub. This page describes how to edit Steps locally, instead of on the platform via the Inspector.

First, make sure that version control is set up for your Project (see Manage Projects for more on configuring this). When that's all done, follow these steps on your local machine:

  1. Make sure you have git installed

  2. Clone the repo from GitHub. Depending on how you're connecting, grab the HTTPS or SSH URL of the repository.

GH Clone URL

tip

You can connect to GitHub with username+password (HTTPS) or an SSH keypair you generated. (You can check out the GitHub docs for more info.)

  1. Then use it to clone the repo to your computer by running this command in a folder that you'd like to contain your new repo: git clone {repo URL} (e.g., git clone https://github.com/OpenFn/Miracle-Feet.git)

  2. To update your local copy with changes from GitHub, run git pull regularly while you're editing.

  3. For this tutorial, we assume you're making changes on the main or master branch: the one that is deployed as your production system to OpenFn.

  4. To edit your steps, use a code editor such as Visual Studio Code.

VS Code

  1. Make sure you install the Prettier VSCode Extension and set is as default formatter in Settings as seen below. This will apply the correct code formatting to the files you change.

Prettier

  1. Once you're done, you can check which files you changed with git status.

  2. Then use git add {filepath} followed by git commit -m {change notes} to prepare the changes to be merged into the repo.

tip

There's a lot to learn about git. Here's a good place to start.

  1. Then run git push to upload the files to the repo (see more on git docs).

From there, the version control integration will update changed steps in your OpenFn Project and you can test those changes on the platform.

Once you're ready to start running steps and testing your changes locally, head over to the The CLI docs for guidance.