본문으로 건너뛰기
Skillpedia
리서치36k · #7586

weknora-shared

하는 일

이 스킬은 명령줄 도구를 통해 WeKnora 지식 베이스 서버에 접근하도록 설정합니다. 내용을 관리하거나 검색하기 전에 서버에 연결해야 하는 사람을 위한 스킬입니다.

사용하는 경우

  • ✓처음으로 WeKnora 명령줄 도구를 서버에 연결해야 할 때.
  • ✓WeKnora에서 지식 베이스, 문서, 세션, 에이전트를 관리하고 싶을 때.
  • ✓도구의 JSON 출력이나 종료 코드를 이해해야 하는 경우.

스킬 링크

https://github.com/Tencent/WeKnora/blob/main/cli/skills/weknora-shared/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/Tencent/WeKnora/blob/main/cli/skills/weknora-shared/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“명령줄에서 우리 WeKnora 서버에 로그인하고, 제대로 작동하는지 확인하도록 도와주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

스킬은 서버 주소와 API 키를 설정하거나 이름 있는 프로필을 저장하는 방법, 그리고 현재 로그인한 사용자를 확인하는 방법을 설명합니다. 또한 도구의 구조화된 출력과 오류 코드를 읽는 방법도 설명합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

WeKnora CLI — shared base

weknora is the agent-first CLI for a WeKnora RAG server. Every command prints a JSON envelope and uses a typed exit code, so you branch on machine-readable output, not prose. Read this skill before any task-specific weknora-* skill.

1. Authenticate (do this first — order matters)

Agents usually skip profiles entirely: set WEKNORA_API_KEY (or WEKNORA_TOKEN) + WEKNORA_HOST and every command authenticates statelessly and zero-disk — no profile add / auth login needed. auth token echoes that env credential; auth status / doctor confirm it. The steps below set up a persistent named profile instead (interactive / multi-environment use).

Authentication is a two-step sequence. weknora auth login operates on the active profile, so the profile must exist first:

# 1. register a connection target and make it active
weknora profile add prod --host https://kb.example.com --use
# 2a. API key (agent default — pipe the key on stdin, non-interactive):
echo "$WEKNORA_API_KEY" | weknora auth login --with-token
# 2b. OR email+password (interactive prompt only — no flags; not for agents)
weknora auth login

weknora auth status          # verify: who am I, which tenant
  • Target a non-active profile for one command with the global --profile NAME (e.g. weknora --profile staging auth refresh). There is no per-command --name/--host on auth commands.
  • Get the raw token for scripting with WEKNORA_TOKEN=$(weknora auth token) (raw token by default; works with an env credential too; --format json gives the {token, mode, profile} envelope).
  • weknora auth logout clears a profile's stored credentials but keeps the profile registered (re-auth later with auth login); use profile remove to delete the profile entirely.
  • weknora doctor runs 4 health checks (reachability, credential, version, storage).

2. Selecting a knowledge base (--kb)

--kb accepts a name or a UUID (resolved server-side). Resolution order: --kb flag → WEKNORA_KB_ID env → directory link (weknora link --kb X binds the cwd) → error. Read/create commands that operate "inside a project" inherit the link; search * and destructive --all operations always require an explicit --kb (so an agent never silently hits the wrong corpus).

A KB must have an embedding model bound to be searchable. A freshly created KB is retrieval_ready:false — uploaded docs stay unindexed and search/chat return nothing until you bind models. Create it ready in one step (kb create --embedding-model <m> --chat-model <m>, discover ids with weknora model list) or bind after the fact (kb config set <kb> --embedding-model <m> --chat-model <m>). kb status / kb check report retrieval_ready, and kb create hints the fix when it is false — so an unconfigured KB is never silently "healthy".

3. Output contract — every command

Default output is --format json: a single envelope.

Field Meaning
ok true/false — branch on this first (see batch/wait caveat below)
data success payload (object or array; absent on mutation-only success)
meta count / has_more / dry_run / plan …
error on failure: {type, message, hint?, retry_argv?, retryable?, risk?}
profile active profile name
  • error.type is a stable typed code (e.g. local.kb_not_found, input.invalid_argument, input.confirmation_required, server.error). Branch on it; error.hint usually tells you the next action.
  • --format text = a live human-readable projection. chat and session ask buffer a bounded answer-event projection into one JSON envelope by default; pass --reference for indexed citations, --verbose for execution detail, or --format ndjson for raw event lines. session resume remains an NDJSON streaming command.
  • --jq '<expr>' filters the envelope (e.g. weknora kb list --jq '.data[].id').
  • Exception: weknora auth token emits the raw token by default (it's a scripting helper); pass --format json for the {token, mode, profile} envelope.
  • Batch / wait caveat: multi-item commands come in two shapes, but for both you branch on the exit code, not ok:
    • doc/chunk/session delete with several ids → a batch envelope: status is success/partial/error, ok is true only when every item succeeded (ok:false on any failure), data is a per-
자주 묻는 질문

시작하려면 프로필이 필요한가요?

아닙니다. 환경 변수에 API 키와 호스트를 설정하면 프로필을 만들지 않고도 작동합니다.

단계 순서가 왜 중요한가요?

로그인 명령은 활성 프로필에서 작동하므로, 그 프로필이 먼저 있어야 합니다.

출력 형식은 무엇인가요?

모든 명령은 JSON 결과를 출력하며, 에이전트가 그것을 바로 읽습니다.

상세 정보

작성자의 원본 설명

Use when driving a WeKnora RAG server through the `weknora` CLI as an agent — authenticating, managing knowledge bases / documents / sessions / agents, running search or chat, or interpreting the CLI's JSON envelopes and exit codes. Read this before any other weknora-* skill.

repo: Tencent/WeKnora

인기도

GitHub 스타
36k
순위
#7586
라이선스
—
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬