Skip to main content

Auto-Save Feature

Runme badget

Runme auto-save feature makes saving your outputs and progress easier. It is an effective way to manage your records and outputs throughout your deployment.

The Runme autosave feature automatically records and tracks every change and activity in your deployment process without manual intervention, so you can focus on your task and team collaboration without worrying about losing your outputs.

How Runme Auto-Save Feature Works

Runme auto-save feature goes beyond saving commands and running shell scripts. It uses the'session output’ feature to provide advanced auto-save functionality.

Session Outputs

When auto-save is enabled, Runme captures a complete copy of the original Markdown document along with all cell outputs generated during the notebook’s execution using the “Runme Session Outputs”.

autosave-output-session

The information includes when each cell was ran, the time it took, and exit codes. Additional contextual metadata like hostname and username are also saved to the Session Outputs file. Runme also captures non-text mime types like images (base64 encoded) outside of textual output produced by terminals.

See an example below:

$ terraform workspace select staging

# Ran on 2024-02-09 15:09:08-05:00 for 1.286s exited with 0
Switched to workspace "staging".

The session outputs are written per Runme session, which is saved throughout the lifetime of the window running the runbook until it is reset via Reset Session in the notebook UX.

reset-session

If there are more forms you like to be added, kindly let us know. We are open to incorporating your requests.

Why Separate Session Outputs?

You might wonder why we have chosen to create a separate Session Outputs file instead of embedding outputs directly into the Markdown document. Well, here are our reasons:

  1. Promote Generality for Collaboration: We believe that cells, including their code and commands (inputs), should remain generic to facilitate collaboration and sharing of notebooks with others. This approach is particularly important for version control-tracked files.
  2. Avoid Version Control Errors: Separating files prevents accidental inclusion of outputs into version control, reducing the risk of overwriting historical artifacts from previous sessions if they were stored in the same file.
  3. Enhance User Experience (UX): Session files with outputs are not directly opened in the notebook UX. After writing the output, Runme may struggle to distinguish between input and output parts of a cell. Instead, the UX will prompt you to open the original document (which requires colocation in the same folder) as a notebook or launch the Markdown previewer to display the Session Outputs.

While we are contemplating the possibility of transparently opening Session Outputs files in the future, this may inevitably involve reformatting the original source file as part of the deserialization process.


Session Outputs

It is strongly recommended that you do not deploy the session output files to your version control. you can .gitignore the files to ensure that it doesn't get deployed.

How to Enable Auto-Save

  • Toggle Auto-Save On/Off: On your .md file, you have the flexibility to easily turn the Auto-Save feature on or off. This can be done directly from the top of your Markdown (.md) file. A simple toggle switch allows for easy control, ensuring that you can activate or deactivate Auto-Save as per your workflow requirements.

runme-autosave

  • Alternatively you can set autosave on as the default setting.This way, you won’t need to manually enable it every time.

Set Autosave as Default

By default, session output is turned off, indicated by the autosave button at the top bar displaying off. If you want to use the session output feature you can easily turn it on using the autosave button to toggle the feature (on) or (off). Alternatively, you can change the session outputs default to be permanently on by adjusting the settings. See the guide below to set the autosave on as the default settings

  • Begin by navigating to the extension settings in the Runme interface. This is typically found in the toolbar or under a settings menu.

runme-infra

  • You can search “autosave” to easily navigate to the Auto-save section.
  • To set it as default, select “Yes” to enable this feature as a default.

autosave-defualt

This action configures the system to automatically save the output of each cell execution.

💡 If you’re logged into the Cloud (prompt whenever Auto-Save is toggled on) cells will both be stored locally in a Session Outputs file and securely stored in your dashboard for later review or sharing with others. This is completely optional and if desired can be turned off (follow “Open Settings” in prompt).