Skip to main content
A file rule is a standing instruction about files on a device: whenever files matching a source pattern appear, upload them to a bucket, and govern how long the device retains them. Rules are shipped to devices as part of a release. For details on how to define file rules, see the rule definition page.

Properties

string
required
A human-readable name for the rule.Examples: Robot Logs, Crash Reports, Camera Footage
string
A hash of the rule’s resolved definition. File rules are deduplicated by digest within a workspace: pushing a rule identical to an existing one returns the existing rule instead of a duplicate.Example: sha256:1234567890
Source
required
Which files on the device the rule manages. See sources.
Upload
An optional field that defines where matching files are uploaded to. Absent when the rule only manages local retention. See uploads.
Retention
An optional field that defines how long the device retains local copies of matching files. Absent when the device keeps them indefinitely — Miru never deletes them. See retention.

Immutability

File rules are immutable. A rule is created once, shipped to devices as part of a release, and never edited in place. To change what is managed, you must create a new rule, release it, and deploy it to your devices.

Git provenance

Rules are defined as YAML files in your Git repository and created by releasing them via the CLI. Each rule records the Git commits it was released from — the commit itself and the rule file’s path relative to the repository root — so any rule in Miru can be traced back to the exact lines of YAML that defined it.

Create a file rule

File rules must be created as part of a release. Visit the define file rules page to learn how to create file rules and releases.

View a file rule

To view a file rule in Miru, navigate to the Releases page, and click into the release that contains the file rule you want to view.
Releases Page
At the bottom of the page under the Overview tab, you will find a list of the release’s file rules.
Release File Rules List
To see more details about a file rule, click the dropdown arrow next to the file rule.
Release File Rule Details
Last modified on September 22, 2026