Sync an API collection with a folder on your computer
Not every collection needs a Git provider on day one. Sometimes you want the requests as files next to the service you're writing, so you can edit them in your editor, grep them, or hand them to a script. Local folder sync does exactly that: the collection is kept as YAML in a folder on your computer, and Requestarium pulls from it and pushes to it.
Link a folder
In the desktop app: Collection ▸ Overview ▸ Sync with Git ▸ Folder. Type the full path, such as /home/you/api or C:\work\api; it's created if it doesn't exist. Leave Folder inside it alone and Requestarium picks a place: the folder sync.yaml lists for this collection, else the folder itself if it holds nothing yet, else collections/<collection-name>.
From a terminal:
requestarium sync link --local ./api "Users API"
requestarium sync link --local ./api "Users API" --path users
requestarium sync link --local ./api --dry-runWithout a collection name, the command reads the folder's .requestarium/sync.yaml and links every collection it lists, creating the ones the workspace doesn't have yet.
In VS Code, open the folder and use Link to this folder in a collection's Sync tab.
Linking moves nothing by itself. The dialog then compares: an empty folder offers Push, a folder that already holds the collection offers Pull.
What's in the folder
api/
.requestarium/
sync.yaml # settings; commit it
.gitignore # contains "local/"
local/ # this computer's state; never commit
requestarium.yaml
users/_folder.yaml
users/list-users.request.yaml
environments/staging.env.yamlOne file per request and folder makes diffs small and readable. local/ holds the files as of the last sync, which is what makes a three-way merge possible without Git history.
Pull and push
Exactly as with a repository:
requestarium sync status "Users API"
requestarium sync pull "Users API"
requestarium sync push "Users API" --message "Add refunds"Edit users/list-users.request.yaml in your editor, then pull: the change merges into the collection. Edit the request in the app, then push: the file is rewritten. When both sides changed the same field, you settle it in the same conflict view Git sync uses.
A push to a folder has no commit; its message is kept in the collection's sync history.
Let the desktop app watch
While the desktop app is open, it looks at the linked folders every few seconds. When a folder changes, the collection's sync button gets a dot and the Sync overview says Folder changed, pull to update. Nothing is applied on its own.
Turn on Write changes to the folder as I save them for a link, and a change you save in the app is written to the folder within a few seconds, as long as it's a plain push: the folder is as it was at the last sync and nothing conflicts. Otherwise the dot tells you to open the dialog.
Secrets stay out of the files
The usual sync rules apply. Passwords, tokens and API keys from the Authorization tab are written as {{variable}} names, and secret environment variables are written as names only. A sync.yaml with secrets.policy: refuse stops a push that would write a typed credential in a header.
From a folder to a repository
- Run
git initin the folder, commit (the.gitignorealready keepslocal/out) and push it to your provider. - In the app, unlink the collection (the collection and the files stay) and link it to the repository, same folder path. The first comparison finds both sides equal.
Teammates then use Open from repo to get every collection at once.
Good to know
- A local link belongs to one folder on one computer. Teammates see that the collection is synced with
/home/ann/api on Ann's laptop, but can't pull or push it. - The web app and browser extension show local links read-only: a browser can't read your files.
- Branches, pull requests, webhooks and schedules belong to providers, so they don't apply to folders. Use Git in the folder for versions.