Infram classifies automation files by extension, not folder structure. This supports flexible repository layouts while preserving predictable behavior.
- Scripts: executable automation files intended for full task execution.
- Snippets: quick command fragments for interactive terminal use.
Use comment tags at the top of each file:
# @name: Largest files
# @description: Show the ten largest files on the target system.
# @os: Ubuntu, Debian, Rocky Linux- Snippets:
.snippet,.txt,.cmd - Scripts:
.sh,.bash,.zsh,.fish,.ps1
| Tag | Purpose |
|---|---|
@name |
Display name in UI |
@description |
Functional description |
@os |
Comma-separated OS filter |
Use these exact values:
Ubuntu, Debian, Alpine Linux, Fedora, CentOS, Red Hat, Rocky Linux, AlmaLinux, openSUSE, Arch Linux, Manjaro, Gentoo, NixOS, Proxmox VE
If @os is omitted, the entry is shown for all systems.
automation-repo/
├─ snippets/
│ ├─ update-packages.snippet
│ └─ check-disk.txt
└─ scripts/
├─ rotate-logs.sh
└─ backup-db.sh
- Keep commands idempotent where possible.
- Include explicit error handling in scripts.
- Avoid interactive prompts unless required.
- Document destructive actions clearly in
@description.
- Header includes
@nameand@description. - Extension matches intended behavior (script vs snippet).
@osvalues are valid and spelled exactly.- Script executes successfully in a non-production environment first.
For guided prompts, confirmations, progress markers, and result summaries, see Scripting Variables & Directives.