Arduino-cli work offline

How to install and run on the offline PC machine

I moved your topic to an appropriate forum category.
In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an « About the _____ category » topic at the top of each category that explains its purpose.
This is an important part of responsible forum usage, as explained in the « How to get the best out of this forum » guide. The guide contains a lot of other useful information. Please read it.
Thanks in advance for your cooperation.

Welcome to the forum

Your topic has been moved to a more appropriate forum category

I'm not familiar with the Arduino CLI. But I suspect that you can do the following (which works with IDE 2.x) assuming the operating systems (Linux, Windows, Mac, ...) are the same.

Install the CLI (or IDE 2.x) on a computer with internet access. Install all board packages that you need. Copy those to a memory stick (or similar).

Place the memory stick in the offline computer and copy it all to the locations where you found them on the online computer.

You can repeat for needed libraries; those are not dependent of the operating system.