- Adafruit-Ampy Module
pip install adafruit-ampy
or
pip3 install adafruit-ampy
Using CMD, PowerShell or Bash Terminal
ampy --help
Before you start using Gooz CLI, you need to do the setup process. This process is quite easy and the following process needs to be followed.
python3 goozcli.py setup
At the initial installation stage, it will be sufficient to do the following.
config.json file not found
Need setup process
Example:
python goozcli.py setup
ERROR: Your device can not be reachable
config.json file not found
Setup process has been started
Please enter board port -> COM6
Please enter username -> Gorki
Please enter workdir path(OS folders path) -> C:\GoozOS
Configuration JSON -> {'port': 'COM6', 'username': 'Gorki', 'workdir': 'C:\\GoozOS'}
✅ config.json has been changed!
Setup has been done successfully
After a successful setup, config.json will be visible in the directory where Gooz CLI is located.
Parameter | Value |
---|---|
Port | COMx |
Workdir | Work path |
Username | Any Username |
Work path is related with user. Gooz CLI takes your OS codes from workdir.
If you are working in a different development environment or for different situations, you can make changes to the config.json file.
python3 goozcli.py config
Ex Usage:
DEBUG: Your device has been connected successfully
Please enter board port -> COM6
Please enter username -> Gorki
Please enter workdir path(OS folders path) -> D:\Gooz\GoozNew
Configuration JSON -> {'port': 'COM6', 'username': 'Gorki', 'workdir': 'D:\\Gooz\\GoozNew'}
✅ config.json has been changed!
If you want to view the files inside your board after connecting it, you can use the command below.
python3 goozcli.py ls
Ex Output:
DEBUG: Your device has been connected successfully
['/app', '/dev', '/docs', '/gooz_engine.py', '/lib', '/main.py', '/system']
Upload your codes to your MicroPython device
IMPORTANT : This process will upload everything from your MicroPython device
python3 goozcli.py upload
or
python3 goozcli.py upload -y
Delete your codes from your MicroPython device
IMPORTANT : This process will delete everything from your MicroPython device
python3 goozcli.py delete
or
python3 goozcli.py delete -y
You can convert the packages you write into JSON files that can be read by Gooz OS via Gooz CLI. Ex:
python3 goozcli.py convert
Ex Output:
DEBUG: Your device has been connected successfully
Please enter package name -> webgooz
Is your package in app or another folder?
If your package is under app folder please enter only 'd'
If your package is under another folder please enter folder path
EXAMPLE: /mynewapp/newapp
WARNING: Another folder must be under workdir
Please enter folder -> d
['gooz_web.py', 'manage.py']
WARNING: These files convert, do you agree? [y,N] ->
Gooz OS included in the board can be tested via Gooz CLI. For this, test.py must be located in the folder where Gooz CLI is installed. The sample test file is in the repo.
python3 goozcli.py test
Ex Output:
DEBUG: ifconfig Test Success
TEST DEBUG: curl http:example command
ERROR: curl http:example Test Failed
TEST DEBUG: shutdown command
DEBUG: shutdown Test Success
System will be shutdown
RESULT: 9/10 Success Test
Test process has been done
You can pull any file you want from Gooz OS to your media via Gooz CLI.
python3 goozcli.py get [FILE_NAME]
- Management your codes which are in MicroPython device
- Username and Password supporting
- Run GoozOS from Gooz CLI
- DevOps Microservices