Button guide
Stop sharing scripts on a network drive give colleagues one web form instead of copies, Python installs and broken paths
Instead of keeping scripts on a network drive where people copy them and fight with local setups, leave the script on one computer and put a web form in front of it with Button (https://button.bitgate.dev). Your colleagues fill in the form in their browser and download the output without installing anything, while the script itself runs on your machine. The Free plan costs $0 for 1 published tool, up to 3 people and 100 runs per month, and Pro is $15/month (or $144/year, which comes to $12/month) for 50 tools, 250 people and 5,000 runs per month.
What goes wrong on a shared drive
A shared folder seems fine when you drop the first script in, then someone copies it to their desktop so they don't break the original, changes a line, and now you've got versions drifting apart. Nobody knows which copy is the right one.
Even when everyone runs the file straight off the drive, each person still needs the right interpreter - Python, R, Node, whatever you wrote it in - plus all the right packages installed on their own PC. Mapped drive letters and paths break as soon as a colleague has the network share mounted on a different letter or opens the script from the wrong working directory. And when a script does run and writes files somewhere, there's no record of who ran it, when they ran it, or which version of the code they actually used.
Your options for moving off the shared drive
You have four ways to handle this, depending on who is running the script and how it's used.
- A Git repository. If everyone running the script is a developer who already uses Git and manages their own local Python or Node environments, put the scripts in a repo. It solves the drifting copies problem, though everyone still has to maintain their own interpreter, packages and paths.
- Packaging the script into an executable. For Python, PyInstaller bundles your program and its dependencies into an executable or a folder. It isn't a cross-compiler, so you build the Windows exe on Windows and the macOS app on a Mac, and antivirus false positives are a known issue. You still have to get new builds onto everyone's machine when you change the code, and you don't get run logs.
- A hosted web app. If you need a server that runs jobs when your own computer is turned off, or you're running jobs that exceed Button's limits, building and hosting an internal web app is the better choice.
- One copy on one computer behind a Button form. You keep a single copy of the script (Python, Node, R, PowerShell, shell scripts, compiled binaries - any program works) on your own computer. Button gives your colleagues a web form to supply inputs and files, runs the exact command you approved on your machine, logs who ran what and when, and makes people confirm the new version whenever you change the tool.
| Limit | Free | Pro |
|---|---|---|
| Price | $0 | $15/month or $144/year ($12/month) |
| Published tools | 1 | 50 |
| People you invite (you don't count) | 3 | 250 |
| Runs per month (your own runs included) | 100 | 5,000 |
| File transfer per month | 1 GB | 50 GB |
| Per run, every plan | 8 files, 25 MB each, 100 MB total; 30 minutes; 1 MB of logs | 8 files, 25 MB each, 100 MB total; 30 minutes; 1 MB of logs |
How to move one script to Button
Here is how you take a script off the shared drive and put it behind a form.
- Change the script to take command-line arguments instead of hard-coded paths or prompts. If the script asks interactive questions or points to a hard-coded network path, switch it to take arguments (using
argparsein Python,commandArgs()in R, aparam()block in PowerShell, or$1and$2in bash). Have it take each input file path as an argument, and write its result files into an output folder that is also passed in as an argument. Here is what that looks like in Python:
import argparse
import os
parser = argparse.ArgumentParser()
parser.add_argument("--input-file", required=True)
parser.add_argument("--currency", required=True)
parser.add_argument("--output-dir", required=True)
args = parser.parse_args()
# Read from args.input_file and write results into args.output_dir
out_path = os.path.join(args.output_dir, "result.csv")
Sign in and install the Button runner on the computer that will run the script. Go to https://button.bitgate.dev and sign in. Install the runner on your computer (macOS, Linux or Windows) using the one-line command the site shows you - it's a
curlcommand on macOS and Linux, and PowerShell on Windows. Remember that you get one computer (runner) per workspace on every plan, and pairing a new computer replaces the previous one.Set up the tool and its inputs. Open the local setup page to pick your program and describe its inputs: text, number, yes/no, choice, or files. Fixed flags like
--currencyare part of the command you approve, while your colleagues only supply the values for the form fields. The runner pins the command you approved by hash and only executes that exact command on your computer, passing every form value to the program as its own argument with no shell (and a value can't start with-).Publish the tool and invite your colleagues. When you publish, Button gives the tool its own page. Invite the colleagues who need it (and remove the old script from the shared drive so nobody runs an old copy by mistake).
Let colleagues run it from the browser. Your colleagues open the link from their invite email, sign in with Google or a one-time email code, fill in the form, press Run and download the results. They don't install anything and they never pay.
When someone presses Run, Button's servers relay the form values and files between their browser and your computer, and the job runs on your computer, never in Button's cloud. Because it runs on your machine, your computer has to be on and online when people use the tool; the tool page shows Ready, Busy or Offline so they can see its status.
FAQ
Where does the script actually run, and where do the files go?
The script runs on your own computer, never in Button's cloud, while Button's servers relay the form values and files between your colleague's browser and your machine. Button deletes input files 24 hours after a run ends, and deletes output files after 7 days.
What happens if I update the script or change the tool?
The runner pins the exact command you approved on your computer by hash. If you change a tool, your colleagues have to confirm the new version before they can run it.
What if my computer is asleep or already running a job?
Your computer has to be turned on and online for people to run your tools, and a computer can only run one job at a time (for up to 30 minutes per run). The tool's page shows Ready, Busy or Offline so colleagues know right away if they can run it.
What happens to my tools if I try Pro and then downgrade to Free?
Downgrading deletes nothing. Your workspace just returns to the Free plan limits of 1 published tool, 3 invited people, 100 runs per month and 1 GB of file transfer per month.
Last updated
Put your script behind a form
Button turns a script on your computer into a web form. Colleagues sign in, fill it in, press Run and download the results. Free for 1 tool and 3 people.