
Weknora Shared
Use when driving a WeKnora RAG server through the `weknora` CLI as an agent, ...
Install
npx skills add Tencent/WeKnora --skill weknora-shared -g -a claude-code -y- Repository
- Tencent/WeKnora36.2k
- Category
- AI and agents
- Updated
- 3d ago
- License
- See repository
- Context cost
- Mediumabout 2,784 tokens
- Runs scripts
- No, instructions only
What it does
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.
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/--hoston 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 jsongives the{token, mode, profile}envelope). weknora auth logoutclears a profile's stored credentials but keeps the profile registered (re-auth later withauth login); useprofile removeto delete the profile entirely.weknora doctorruns 4 health checks (reachability, credential, version, storage).

