I’m writing a Node.js app that performs remote script (Javascript) management for your Fibery Buttons and Rules, using an undocumented Fibery API.
It can pull your automation script definitions from your Workspace and store them locally on your machine, then push them back, so you can manage and edit them locally, add them to source control, etc.
NOTE: This app exists to help you to manage the script actions in your existing Rules and Buttons, not create new ones.
Some other features it has:
- A simple macro facility to allow scripts to “include” other source files (reuse your code in multiple scripts without duplication)
- Restore automations from an earlier point in time
If you’re interested in helping me test and polish this app, LMK!
It is fully functional but not exhaustively tested.
OVERVIEW
This is a Node.js app that uses UNDOCUMENTED Fibery.io API calls to get and update automation scripts (Javascript) in your Fibery.io Button and Rule automations. This allows you to write and manage your Fibery scripts locally with familiar tools (including source control).
COMMANDS
Usage: fibscripts { pull | push | purge | orphans | help {cmd} } [ options… ]
help [cmd] Show help, optionally for a specific program command
pull Download and save Fibery workspace Button and Rule Javascript actions
push Push local Javascript Button and Rule actions back to Fibery workspace
purge --before {date} Delete cache entries older than the specified cutoff date
orphans List orphaned local files and dirs that were deleted in Fibery
OPTIONS
--workspace -w Your Fibery workspace domain, e.g. "my.fibery.io" - or, the full path to the local workspace dir
--space -s Space name filter
--db -d DB name filter
--button -b Button name filter
--rule -r Rule name filter
--cache -c Use existing cached Space/DB info instead getting it from Fibery
--nogit -g Don't try to use git (when your local script files are not tracked in git)
--nofiles Ignore local script files; use with `push` to restore automations from cache files
--yes -y Create/rename local files/directories as needed for pull operations
--fake -f Dry run - don't actually update or overwrite anything
--verbose -v Verbose output
--debug -u Debug output
--quiet -q Disable progress messages and spinners; only output a terse summary
--before {date-time} End of range for cache files (matches before OR EQUAL)
--after {date-time} Start of range for cache files
REQUIRED ENVIRONMENT VARIABLES
FIBERY Base path for all local storage managed by the app
FIBERY_DOMAIN Which Fibery workspace domain to manage (or specify this with the `--workspace` option)
FIBERY_API_KEY API key for your FIBERY_DOMAIN - get it from "Fibery Settings > API Keys"