콘텐츠로 이동

Agents로 Tier0 운영하기

지원 에디션EdgeCloudEnterprise

Tier0는 AI agents가 플랫폼을 운영할 수 있도록 Skills와 CLI 명령을 제공합니다.

선호하는 AI agent로 Tier0를 운영하세요.
Claude Code
Codex
Gemini CLI
Cursor
GitHub Copilot

환경에 맞는 설치 방식을 선택하세요.

Node.js 16 이상을 사용할 수 있다면 npx로 CLI와 skills를 설치합니다.

Terminal window
npx -y @tier0/cli@latest install

이 명령은 전체 설치 프로그램을 실행하며 다음 두 가지를 수행합니다.

  • tier0 CLI binary를 ~/.tier0/bin/에 설치합니다.
  • 내장 Tier0 Skill baseline을 설치하고 Codex, Claude Code 등 감지된 agents에 동기화합니다.
  1. tier0 CLI binary를 설치합니다.

    Terminal window
    curl -fsSL https://raw.githubusercontent.com/FREEZONEX/Tier0-cli/main/install.sh | bash
  2. 최신 Tier0 Skills를 다운로드하고 감지된 agents에 동기화합니다.

    Terminal window
    tier0 skills update
  3. 설치된 Skill 버전과 health를 확인합니다.

    Terminal window
    tier0 skills status
  • 설치된 Skill 버전과 health를 확인합니다.
    Terminal window
    tier0 skills status
  • 누락되었거나 손상된 내장 Skill baseline을 복구합니다.
    Terminal window
    tier0 skills install
  • 최신 Tier0 Skill로 업데이트합니다.
    Terminal window
    tier0 skills update

Skills와 CLI가 함께 작동하는 방식

섹션 제목: “Skills와 CLI가 함께 작동하는 방식”

Tier0 CLI는 실행 가능한 명령을 제공하고, Skills는 agents가 이 명령을 선택하고 안전하게 사용하도록 안내합니다.

  • Prompt: Plant/Line1/Metric/Temperature의 현재 온도를 확인합니다.
  • Skill
    • tier0-uns
    • 현재 값은 전체 topic path에서 읽어야 한다고 agent에게 알려 주고 적절한 UNS read 작업을 선택합니다.
  • CLI: tier0 uns read Plant/Line1/Metric/Temperature --json
Skill 목적
tier0 Tier0 작업을 적절한 skill로 라우팅하고 공통 설정, 인증, 안전 규칙을 제공합니다.
tier0-uns Browse, read, write, history, search, create, update, delete, restore를 포함한 UNS 작업을 agents에게 안내합니다.
tier0-flow SourceFlow와 EventFlow 관리를 agents에게 안내합니다. 여기에는 검사, 내보내기, 생성, 업데이트, 배포, 삭제가 포함됩니다.
tier0-mqtt MQTT 자격 증명 관리, publish, 범위가 제한된 실시간 subscribe를 agents에게 안내합니다.
tier0-files Upload, download, 접근 URL 생성, delete를 포함한 Tier0 파일 작업을 agents에게 안내합니다.

Private deployment는 로그인 전에 base URL을 설정해야 합니다. 설정 후 모든 명령은 해당 인스턴스에서 실행됩니다.

Terminal window
tier0 config --base-url https://your-tier0.example.com
tier0 login # interactive browser login
  1. 운영 중인 Tier0 인스턴스에서 받은 API key를 설정합니다.

    Terminal window
    tier0 config --api-key <api-key>
  2. API key의 identity와 permissions를 확인합니다.

    Terminal window
    tier0 auth whoami --json
  3. tier0 CLI로 다른 작업을 수행합니다.

--dry-run을 사용하면 지원되는 쓰기 작업을 Tier0에 요청하지 않고 검증하고 미리 볼 수 있습니다.

  • UNS: write/create/update/delete/restore
  • Flow: create/update/delete/deploy
  • API: tier0 api
  • MQTT: auth create/auth delete/publish
  • Files: delete
Terminal window
tier0 uns write --topic demo --value '{"value":1}' --dry-run
tier0 flow deploy --id 1 --flows-file flows.json --dry-run --json
tier0 api /openapi/v1/uns/write --body-file body.json --dry-run --json
tier0 mqtt auth create --name my-client --save my-client --dry-run --json
tier0 assets delete --file-path workspace/path/to/file.csv --dry-run --json
Terminal window
{
"ok": true,
"dry_run": true,
"data": {
"api": [
{"method": "POST", "url": "https://tier0.dev/openapi/v1/uns/write", "body": {}}
]
}
}

--json을 사용하면 명령 실패 시 오류 메시지와 코드를 포함한 JSON object가 반환됩니다.

Terminal window
{"ok":false,"error":{"type":"validation","subtype":"invalid_argument","param":"--qos","message":"--qos must be 0, 1, or 2"}}
  • 제거 명령
Terminal window
# Tier0 CLI를 제거하고 local configuration과 skills는 유지합니다.
npx @tier0/cli@latest uninstall
# Tier0 CLI를 제거하고 local configuration, credentials, cache를 삭제하지만 skills는 유지합니다.
npx @tier0/cli@latest uninstall --purge
# skills 제거
npx @tier0/cli@latest uninstall --remove-skills
# 위 항목을 모두 제거
npx @tier0/cli@latest uninstall --purge --remove-skills
  • Global NPM 제거
Terminal window
npm uninstall -g @tier0/cli
  • 수동 정리
Terminal window
rm -rf ~/.tier0/bin/tier0 ~/.tier0/skills
npx -y --package=skills -- skills remove tier0 -y -g

Tier0 CLI Reference에는 모든 CLI 명령이 정리되어 있습니다.