Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Show CLI command equivalent of every GUI change one makes in real time.

    Scheduled Pinned Locked Moved Development
    8 Posts 5 Posters 3.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      k-bull
      last edited by

      Hello Developers,

      I've been a pfSense fan since the beginning.  I have to say, "GREAT JOB!".  My problem is is that I've always been a GUI tech. I've been trying very hard to get into CLI.  Some progress but not as thorough as I would like to be.  I ran  into this article http://www.networkcomputing.com/networking/gui-vs-cli-networking/2083404544.  The second to last paragraph sums it up.  How hard would it be to implement this into the already great, pfSense.  I think it would be a great addition to the project

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        Nearly impossible. Not everything has a CLI equivalent, some things are done through helper functions that use APIs and other interfaces to lower-level functions so it's not always a GUI wrapper around shell commands.

        In places where commands are executed, you could probably patch the mwexec and mwexec_bg functions to log what they're running somewhere, but because things are formed programmatically, the odds of them being very useful for human readers would be low in many cases.

        It might be interesting for a very small number of people, but not enough I would see it making its way in as a feature.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • P
          phil.davis
          last edited by

          And a lot of settings end up being written to a conf file somewhere and then the appropriate service is restarted, which just reads the conf file. So such a thing would need to show the diff of the conf file before/after so you can see what happens in the back-end as the front-end changes.

          As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
          If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

          1 Reply Last reply Reply Quote 0
          • jahonixJ
            jahonix
            last edited by

            @phil.davis:

            …So such a thing would need to show the diff of the conf file before/after so you can see what happens in the back-end as the front-end changes.

            Luckily, we have that already!
            At  Diagnostics / Backup & Restore / Config History  you can diff between selected config files. That's great (and I only found it by accident. But I love it.)

            1 Reply Last reply Reply Quote 0
            • P
              phil.davis
              last edited by

              @jahonix:

              @phil.davis:

              …So such a thing would need to show the diff of the conf file before/after so you can see what happens in the back-end as the front-end changes.

              Luckily, we have that already!
              At  Diagnostics / Backup & Restore / Config History  you can diff between selected config files. That's great (and I only found it by accident. But I love it.)

              I meant that there could (also) be a diff available of the end-result conf file from the change (e.g. dhcp.conf unbound.conf etc files) - that would show people what it is that they would have to have done/edited on a "raw" FreeBSD system in order to make the equivalent change.
              That would be some effort to implement.

              As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
              If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

              1 Reply Last reply Reply Quote 0
              • jahonixJ
                jahonix
                last edited by

                …in the end we are all aware that it's not too brilliant an idea to change config/ini files in pfSense except for config.xml
                At least if you want it to work after updates/upgrades as well.
                This single config file is one of pfSense's beauties, isn't it?

                1 Reply Last reply Reply Quote 0
                • K
                  k-bull
                  last edited by

                  Had it been possible, although I still think it is, apart from it being a great learning tool for those that don't know CLI, wouldn't it be a great GUI troubleshooting tool?  For example, if one changes something in the GUI and the show-command-line shows something, for those that know CLI will be able to see if the GUI did the commands correct or incorrect.

                  1 Reply Last reply Reply Quote 0
                  • C
                    charliem
                    last edited by

                    As a diagnostic learning tool, take a look at the comprehensive output of status.php.  (I don't think it's a gui menu choice, just go to https://192.168.1.1/status.php, for example).

                    Find an area you want to learn about, then read through /usr/local/www/status.php and see how that output was generated.  A far cry from what you are asking for, but still a good place to learn

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.