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:
Make sure you have git installed
Clone the repo from GitHub. Depending on how you're connecting, grab the HTTPS or SSH URL of the repository.
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.)
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
)To update your local copy with changes from GitHub, run
git pull
regularly while you're editing.For this tutorial, we assume you're making changes on the
main
ormaster
branch: the one that is deployed as your production system to OpenFn.To edit your steps, use a code editor. We recommend Visual Studio Code.
- When using VS Code, make sure you install the Prettier VSCode Extension and set it as the default formatter in Settings as seen below. This will apply the correct code formatting to the files you change.
Once you're done, you can check which files you changed with
git status
.Then use
git add {filepath}
followed bygit commit -m {change notes}
to prepare the changes to be merged into the repo.
There's a lot to learn about git. Here's a good place to start.
- 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.