- 자신의 컴퓨터 환경에 맞는 설치파일 다운로드하기
- 압축을 풀고 폴더 안에있는 goliothoctl 실행하기
**맥의 경우 보안관리자에 가서 열기를 허용해줘야 열림.
✘ anton ~/develop/goliothctl_1.2.1_macos_64bit ./goliothctl The goliothctl CLI manages authentication, developer workflow, interactions with the platform, local configuration and more. Usage: goliothctl [flags] goliothctl [command] Examples: # List Projects goliothctl project list # Set current project goliothctl config set projectId my-first-project # List devices goliothctl device list # Provision device and credentials goliothctl provision --hwId "DE:AD:BE:EF" --name "My first device" --credId "deadbeef-id" --psk "supersecret" Available Commands: apikeys Access API Keys information. blueprint Create, update, and delete blueprint. config The `goliothctl config` subcommands are used to get and set values in the current local goliothctl config. device Use the `goliothctl device` subcommands to add, remove, list, and update data associated with devices. dfu Firmware management command. help Help about any command lightdb Access data on Light DB login Authenticate with Golioth. logout Log out of Golioth manually. logs Show device logs (from the last 4h by default) project Access and manage project information. provision Create a device and provision it with credentials. stream Access the data in a LightDB Stream. tag Create, update, and delete tags. updates Trigger device updates. version Show CLI Version Flags: --apiUrl string golioth api server url (default "https://api.golioth.io") -c, --config string config file (default is $HOME/.golioth/.goliothctl.yaml) -h, --help help for goliothctl --projectId string golioth project id Use "goliothctl [command] --help" for more information about a command.
위와 같이 나오면 실행된것 확인한 것이다.
3. 이제 계정을 만든다.
폴더에서 login command을 날리면 웹브라우저가 얼리면서 회원가입을하라고 한다.
./goliothctl login
회원가입을 하면 토큰이 생긴다.
4. 프로젝트 만들기
./goliothctl project create --name "My first project"
5. 만들어진 프로젝트 확인
./goliothctl project list
6. 디바이스 만들기
./goliothctl device create --name "My first device"
결과
id:"xxxxxxxxxxxxxx" name:"My first device" status:"-"
7. 하드웨어 provisiton(배치?) 하기
./goliothctl provision --hwId "xx:xx:xx:xx" --name "My first device" --credId "esp32s2-id" --psk "supersecret"
결과 또는 './goliothctl device list' 로 검색해서 확인
created