# Bear CLI places YAML front matter in the wrong place

**URL:** <https://community.bear.app/t/bear-cli-places-yaml-front-matter-in-the-wrong-place/19439>\
**Category:** Bear Bug Report\
**Tags:** bug\
**Created:** [June 24, 2026, 6:00pm UTC](https://community.bear.app/t/bear-cli-places-yaml-front-matter-in-the-wrong-place/19439 "2026-06-24T18:00:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gnome.irdan](https://avatars.discourse-cdn.com/v4/letter/g/ea666f/32.png) [@gnome.irdan](https://community.bear.app/u/gnome.irdan)\
**Post date:** [June 24, 2026, 6:00pm UTC](https://community.bear.app/t/bear-cli-places-yaml-front-matter-in-the-wrong-place/19439/1 "2026-06-24T18:00:38Z")

</div>

- **Bear Version** : 2.8.1

- **OS Version** : Mac Tahoe 26.5.1

- **What were you doing** : using Bear CLI to create new notes

- **What feature did you use** : Creating a note with both an explicit title and body content beginning with YAML frontmatter.

- **What happened** : Bear inserted the title as a Markdown `#` heading before the supplied body content. This moved the YAML block below the title:

- **What did you expect to happen** : When creating a note, I should be able to supply a title while preserving YAML frontmatter as the first content in the note. Ideally, Bear would either:

---

<div class="post-metadata">

**Author:** ![rexikan](https://dub1.discourse-cdn.com/flex013/user_avatar/community.bear.app/rexikan/32/4117_2.png) [@rexikan](https://community.bear.app/u/rexikan)\
**Post date:** [June 25, 2026, 4:52am UTC](https://community.bear.app/t/bear-cli-places-yaml-front-matter-in-the-wrong-place/19439/2 "2026-06-25T04:52:11Z")

</div>

Right. What you should do in that case is just to omit the title as an argument and supply the full note content, including YAML, title, and any other content.

I will take a note about it, and we will see if we can improve the CLI in this regard.

---

<div class="post-metadata">

**Author:** ![gnome.irdan](https://avatars.discourse-cdn.com/v4/letter/g/ea666f/32.png) [@gnome.irdan](https://community.bear.app/u/gnome.irdan)\
**Post date:** [June 25, 2026, 3:13pm UTC](https://community.bear.app/t/bear-cli-places-yaml-front-matter-in-the-wrong-place/19439/3 "2026-06-25T15:13:10Z")

</div>

I figured out this workaround but it would be great to have front matter as a first-class citizen in the CLI 🙂 Currently it’s very easy to break the frontmatter if we supply the title argument in any call.

---

<div class="post-metadata">

**Author:** ![rexikan](https://dub1.discourse-cdn.com/flex013/user_avatar/community.bear.app/rexikan/32/4117_2.png) [@rexikan](https://community.bear.app/u/rexikan)\
**Post date:** [August 20, 2026, 7:21am UTC](https://community.bear.app/t/bear-cli-places-yaml-front-matter-in-the-wrong-place/19439/4 "2026-08-20T07:21:10Z")

</div>

Agree. The code is updated to account for leading frontmatter also when giving a title. It will probably be part of the next release. Thanks for the feedback!

---

<div class="post-metadata">

**Author:** ![gnome.irdan](https://avatars.discourse-cdn.com/v4/letter/g/ea666f/32.png) [@gnome.irdan](https://community.bear.app/u/gnome.irdan)\
**Post date:** [August 20, 2026, 5:47pm UTC](https://community.bear.app/t/bear-cli-places-yaml-front-matter-in-the-wrong-place/19439/5 "2026-08-20T17:47:27Z")

</div>

Yay! Thank you so much.
