Command to generate the frontmatter?
@t-kalinowski is already working on this.
Since Aug 12, 2026.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 42/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Domain
- cli, developer-experience
Research direction
Start by reviewing the existing ir run workflow and the frontmatter documentation linked from the issue; no implementation files or tests are named. Define how an ir add-template command should create the shown template, including package and R-version handling, and how ir run should report missing frontmatter; the feature is done when both workflows are specified and tested.
Written by the indexing model from the issue text.
Description
I might be missing something about the usual workflow when using ir (tbh, I have just quickly tried it), but shouldn't there be a command to automatically generate the frontmatter? I don't think uv has this but they have some kind of automation with uv add --script example.py 'requests<3' 'rich'.
I don't want to type the entire frontmatter or to copy it from the docs every time. It would be nice to have ir add-template script.R (probably with a better command name) that would automatically add this:
#!/usr/bin/env -S ir run
#| packages:
#| - <to fill with packages loaded in the script and their used versions>
#| r-version: ">= <my current R version>"
#| isolated: true
I can then choose to tweak this frontmatter or not. That way, I can take any existing standalone script and instantly add the info used by ir.
I can also imagine ir run giving a message No frontmatter found in <script.R>. Use ir add-template to add one.
- Dominant language
- Rust
- Stars
- 66
- Forks
- 2
- Avg merge
- 3h 22m
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from r-lib/ir
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
Difficulty 3/5 1-2 days Newbie friendliness 62/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
higress-group/HiRoute#405 ·
Maintainers usually reply within 1 day
-
rust_analyzer flycheck: no CLI way to enable clippy from `check.overrideCommand`Possibly taken @TrapsterDK claimed this today. Openneeds-triage
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
bazelbuild/rules_rust#4392 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
🐞 bug 🧩 bevy_gantz_egui
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
nannou-org/gantz#500 ·
Maintainers usually reply within 1 day