The Rambam · Sefer Ahavah
הלכות ברכות א׳Blessings 1
Chapter 1 of 11 in Blessings — 20 halachot
Halacha 1א׳
מצות עשה מן התורה לברך אחר אכילת מזון שנאמר ואכלת ושבעת וברכת את יי' אלהיך ואינו חייב מן התורה אלא אם כן שבע שנאמר ואכלת ושבעת וברכת ומדברי סופרים אכל אפילו כזית מברך אחריו.
It is an affirmative precept of the Torah to say Grace after a meal, as it is said, "And thou shalt eat and be satisfied and shalt bless the Lord, thy God" (Deuteronomy 8:10). The Torah only imposes the obligation on a person when he is satisfied; for it is said, "When thou hast eaten and art satisfied, thou shalt bless etc." According to the ordinances of the sages, however, even if one has eaten only as much food as the size of an olive, he recites Grace after the meal.
Halacha 2ב׳
ומדברי סופרים לברך על כל מאכל תחלה ואחר כך יהנה ממנו ואפילו נתכוין לאכול או לשתות כל שהוא מברך ואח"כ יהנה וכן אם הריח ריח טוב מברך ואחר כך יהנה ממנו וכל הנהנה בלא ברכה מעל וכן מדברי סופרים לברך אחר כל מה שיאכל וכל מה שישתה והוא שישתה רביעית והוא שיאכל כזית ומטעמת אינה צריכה ברכה לא לפניה ולא לאחריה עד רביעית.
It is also an ordinance of the Sages that before partaking of any food, a blessing is first recited and then it is eaten. And however little one intends to eat or drink, the blessing is first recited and then the refreshment is taken. So too, one who wishes to smell a fragrant odor first recites the blessing and then enjoys the fragrance. Whoever partakes of any enjoyment without reciting a blessing commits a trespass. It is also an ordinance of the sages that a blessing is to be recited after eating or drinking, provided that the quantity drunk is at least a quarter of a log (equal to the volume of an egg and a half), and the food eaten is at least as much as an olive in size. A cook who is tasting food does not need to recite a blessing before or after doing so, provided that the quantity tasted is less than a quarter of a log.
Halacha 3ג׳
וכשם שמברכין על ההנייה כך מברכין על כל מצוה ומצוה ואח"כ יעשה אותה וברכות רבות תקנו חכמים דרך שבח והודיה ודרך בקשה כדי לזכור את הבורא תמיד אע"פ שלא נהנה ולא עשה מצוה.
And just as blessings are recited when partaking of material enjoyments, so when about to fulfill any precept, a blessing is said, after which the precept is performed. The sages have moreover instituted several blessings of praise and thanksgiving and petition, in order that when not partaking of material enjoyments nor engaged in the fulfillment of religious duties we should constantly have God in mind.
Mishneh Torah, Hebrew Wikisource edition, via Sefaria — CC BY-SA
English: The Mishneh Torah by Maimonides, tr. Moses Hyamson, 1937-1949 — public domain