Scripts
Found this helpful? Share it:
Found this helpful? Share it:
A script is a plain .sh file in your Drive that you run on
any of your computers. Save it once, then run it wherever you need it
📜
Scripts are not a separate kind of resource. Any shell file in your Drive, up to 256 KB, can be run on a computer. Edit it like any other file, and every run uses the current contents.
Open the file browser, find the .sh file, and choose Run on computer(from the right-click menu, or the
button in the file viewer). Pick which computer to run it on, add any
values it needs, and start it. Output streams back into the app as it
runs.
An agent can run a script for you too. Ask it to run a specific shell file on a computer, and it uses the same path.
Pin a script to a computer and it appears on that computer's dashboard with a Run button, so a routine you use often is one click away. Pin the same script to several computers when you run it in more than one place.
You can pass environment values when you start a run, and the script reads them as normal environment variables.
Stored credentials are not injected into a script run. A script only sees the plain values you give it at run time, so do not rely on a saved secret being available inside a script. To hand credentials to long-lived code instead, see Credentials.
Each run is recorded with a snapshot of the script, its exit status, and its output, so you can see what happened even after the file changes or is deleted. You can stop a run in progress.
For a one-off command you do not want to save, run it directly on the computer instead. See Computer commands and files.
Related articles
Computers
Pair your own machine or launch a cloud one, then let your AI run commands and work with files on it.
Computer commands and files
Run commands through the daemon and browse remote files with the built-in file manager.
Credentials
Store API keys and app connections once, then let your commands, functions, and agents use them without pasting a key into a chat.
Was this helpful?