From 4a6f9f6f12c5757701f294331da8e8a0939f2853 Mon Sep 17 00:00:00 2001 From: HemanthGowdaHM Date: Thu, 26 Feb 2026 14:13:25 +0530 Subject: [PATCH] docs: clarify how Fire behaves when called on a class --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 1482d56d..d472946a 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,11 @@ python calculator.py double 10 # 20 python calculator.py double --number=15 # 30 ``` +When `Fire` is called on a class, it automatically creates an instance of that +class. The class's methods then become available as subcommands on the CLI. +For example, running `python calculator.py double 10` calls the `double` +method on a new `Calculator` instance. + To learn how Fire behaves on functions, objects, dicts, lists, etc, and to learn about Fire's other features, see the [Using a Fire CLI page](docs/using-cli.md).