Skip to content

Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.

feat: rename for consistency (#179)

Zayn Jarvis3663793abc1e
diff --git a/.github/workflows/rust-cli.yml b/.github/workflows/rust-cli.yml
index 800f6b245..2f1e0c940 100644
--- a/.github/workflows/rust-cli.yml
+++ b/.github/workflows/rust-cli.yml
@@ -9,7 +9,7 @@ on:
- 'Cargo.toml'
- '.github/workflows/rust-cli.yml'
tags:
- - 'cli-*' # Trigger release on tags starting with cli-
+ - 'cli@*' # Trigger release on tags starting with cli@
pull_request:
branches: [ main ]
paths:
@@ -132,7 +132,7 @@ jobs:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: build
- if: startsWith(github.ref, 'refs/tags/cli-')
+ if: startsWith(github.ref, 'refs/tags/cli@')
permissions:
contents: write
steps:
@@ -141,7 +141,7 @@ jobs:
- name: Get version from tag
id: get_version
- run: echo "version=${GITHUB_REF#refs/tags/cli-}" >> $GITHUB_OUTPUT
+ run: echo "version=${GITHUB_REF#refs/tags/cli@}" >> $GITHUB_OUTPUT
- name: Download all artifacts
uses: actions/download-artifact@v4
@@ -162,7 +162,7 @@ jobs:
### Quick Install (macOS/Linux)
```bash
- curl -fsSL https://raw.githubusercontent.com/${{ github.repository }}/refs/tags/cli-${{ steps.get_version.outputs.version }}/crates/openviking-cli/install.sh | bash
+ curl -fsSL https://raw.githubusercontent.com/${{ github.repository }}/refs/tags/cli@${{ steps.get_version.outputs.version }}/crates/ov_cli/install.sh | bash
```
### Manual Installation
@@ -182,7 +182,7 @@ jobs:
SHA256 checksums are provided for each binary for verification.
## Changes
- See the [commit history](https://github.com/${{ github.repository }}/commits/cli-${{ steps.get_version.outputs.version }}) for details.
+ See the [commit history](https://github.com/${{ github.repository }}/commits/cli@${{ steps.get_version.outputs.version }}) for details.
files: |
artifacts/**/*.tar.gz
artifacts/**/*.zip
diff --git a/Cargo.toml b/Cargo.toml
index a08b6a5f5..c09add8cd 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,5 +1,5 @@
[workspace]
-members = ["crates/openviking-cli"]
+members = ["crates/ov_cli"]
resolver = "2"
[profile.release]
diff --git a/README.md b/README.md
index 161650eab..56414106b 100644
--- a/README.md
+++ b/README.md
@@ -71,6 +71,18 @@ Before starting with OpenViking, please ensure your environment meets the follow
pip install openviking
```
+#### Rust CLI (Optional)
+
+```bash
+curl -fsSL https://raw.githubusercontent.com/volcengine/OpenViking/main/crates/ov_cli/install.sh | bash
+```
+
+Or build from source:
+
+```bash
+cargo install --git https://github.com/volcengine/OpenViking ov_cli
+```
+
### 2. Model Preparation
OpenViking requires the following model capabilities:
diff --git a/crates/openviking-cli/Cargo.toml b/crates/ov_cli/Cargo.toml
similarity index 89%
rename from crates/openviking-cli/Cargo.toml
rename to crates/ov_cli/Cargo.toml
index 547aff5ae..fcbd1825b 100644
--- a/crates/openviking-cli/Cargo.toml
+++ b/crates/ov_cli/Cargo.toml
@@ -1,9 +1,9 @@
[package]
-name = "openviking-cli"
+name = "ov_cli"
version = "0.1.0"
edition = "2021"
authors = ["OpenViking Contributors"]
-description = "CLI client for OpenViking"
+description = "Rust CLI client for OpenViking"
license = "MIT"
[[bin]]
diff --git a/crates/ov_cli/README.md b/crates/ov_cli/README.md
new file mode 100644
index 000000000..12115a0ff
--- /dev/null
+++ b/crates/ov_cli/README.md
@@ -0,0 +1,141 @@
+# OpenViking CLI
+
+Command-line interface for [OpenViking](https://github.com/volcengine/OpenViking) - an Agent-native context database.
+
+## Installation
+
+### Quick Install (Linux/macOS)
+
+```bash
+curl -fsSL https://raw.githubusercontent.com/volcengine/OpenViking/main/crates/ov_cli/install.sh | bash
+```
+
+### From Source
+
+```bash
+cargo install --path crates/ov_cli
+```
+
+## Configuration
+
+Create `~/.openviking/ovcli.conf`:
+
+```json
+{
+ "url": "http://localhost:1933",
+ "api_key": "your-api-key"
+}
+```
+
+## Quick Start
+
+```bash
+# Add a resource
+ov add-resource https://raw.githubusercontent.com/volcengine/OpenViking/refs/heads/main/docs/en/about/01-about-us.md --wait
+
+# List contents
+ov ls viking://resources
+
+# Semantic search
+ov find "what is openviking"
+
+# Get file tree
+ov tree viking://resources
+
+# Read content
+ov read viking://resources/...
+```
+
+## Command Groups
+
+### Resource Management
+- `add-resource` - Import local files or URLs
+- `add-skill` - Add a skill
+- `export` - Export as .ovpack
+- `import` - Import .ovpack
+
+### Relations
+- `relations` - List relations
+- `link` - Create relation links
+- `unlink` - Remove relation
+
+### Filesystem
+- `ls` - List directory contents
+- `tree` - Get directory tree
+- `mkdir` - Create directory
+- `rm` - Remove resource
+- `mv` - Move/rename
+- `stat` - Get metadata
+
+### Content Access
+- `read` - Read L2 (full content)
+- `abstract` - Read L0 (abstract)
+- `overview` - Read L1 (overview)
+
+### Search
+- `find` - Semantic retrieval
+- `search` - Context-aware retrieval
+- `grep` - Content pattern search
+- `glob` - File glob pattern
+
+### System
+- `system wait` - Wait for async processing
+- `system status` - Component status
+- `system health` - Health check
+- `observer queue` - Queue status
+- `observer vikingdb` - VikingDB status
+- `observer vlm` - VLM status
+
+### Session
+- `session new` - Create session
+- `session list` - List sessions
+- `session get` - Get session details
+- `session delete` - Delete session
+- `session add-message` - Add message
+- `session commit` - Commit and extract memories
+
+### Config
+- `config show` - Show configuration
+- `config validate` - Validate config
+
+## Output Formats
+
+```bash
+ov --output json ls
+ov --output table ls
+ov --json ls # Compact JSON wrapper for scripts
+```
+
+## Examples
+
+```bash
+# Add URL and wait for processing
+ov add-resource https://example.com/docs --wait --timeout 60
+
+# Search with threshold
+ov find "API authentication" --threshold 0.7 --limit 5
+
+# Recursive list
+ov ls viking://resources --recursive
+
+# Glob search
+ov glob "**/*.md" --uri viking://resources
+
+# Session workflow
+SESSION=$(ov session new --json | jq -r '.result.session_id')
+ov session add-message --session-id $SESSION --role user --content "Hello"
+ov session commit --session-id $SESSION
+```
+
+## Development
+
+```bash
+# Build
+cargo build --release
+
+# Run tests
+cargo test
+
+# Install locally
+cargo install --path .
+```
diff --git a/crates/openviking-cli/install.sh b/crates/ov_cli/install.sh
similarity index 78%
rename from crates/openviking-cli/install.sh
rename to crates/ov_cli/install.sh
index 539502a5b..2b3d1cb47 100755
--- a/crates/openviking-cli/install.sh
+++ b/crates/ov_cli/install.sh
@@ -2,8 +2,8 @@
set -e
# OpenViking CLI Installer
-# Usage: curl -fsSL https://raw.githubusercontent.com/<OWNER>/<REPO>/refs/tags/<TAG>/crates/openviking-cli/install.sh | bash
-# Example: curl -fsSL https://raw.githubusercontent.com/volcengine/openviking/refs/tags/cli-0.1.0/crates/openviking-cli/install.sh | bash
+# Usage: curl -fsSL https://raw.githubusercontent.com/<OWNER>/<REPO>/refs/tags/<TAG>/crates/ov_cli/install.sh | bash
+# Example: curl -fsSL https://raw.githubusercontent.com/volcengine/openviking/refs/tags/[email protected]/crates/ov_cli/install.sh | bash
# Skip checksum: curl -fsSL ... | SKIP_CHECKSUM=1 bash
# Custom repo: REPO=owner/repo curl -fsSL ... | bash
@@ -60,17 +60,44 @@ detect_platform() {
fi
}
-# Get latest release info
+# Get latest CLI release info
get_latest_release() {
- info "Getting latest release information..."
- LATEST_RELEASE=$(curl -s "https://api.github.com/repos/${REPO}/releases/latest")
- TAG_NAME=$(echo "$LATEST_RELEASE" | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/')
+ info "Getting latest CLI release information..."
+
+ # Paginate through releases and stop at first CLI match
+ PAGE=1
+ PER_PAGE=30
+ TAG_NAME=""
+
+ while [[ -z "$TAG_NAME" ]]; do
+ RELEASES=$(curl -s "https://api.github.com/repos/${REPO}/releases?per_page=${PER_PAGE}&page=${PAGE}")
+
+ # Check if we got any releases
+ RELEASE_COUNT=$(echo "$RELEASES" | jq 'length')
+ if [[ "$RELEASE_COUNT" -eq 0 ]]; then
+ error "Could not find any CLI releases. Make sure CLI releases exist with tags starting with 'cli-'"
+ fi
+
+ # Find first CLI release in this page
+ TAG_NAME=$(echo "$RELEASES" | jq -r '.[] | select(.tag_name | startswith("cli@")) | .tag_name' | head -n 1)
+
+ if [[ -n "$TAG_NAME" ]]; then
+ break
+ fi
+
+ PAGE=$((PAGE + 1))
+
+ # Safety limit: don't fetch more than 5 pages (150 releases)
+ if [[ "$PAGE" -gt 5 ]]; then
+ error "Could not find any CLI releases in the last 150 releases"
+ fi
+ done
if [[ -z "$TAG_NAME" ]]; then
- error "Could not determine latest release version"
+ error "Could not determine latest CLI release version"
fi
- info "Latest version: $TAG_NAME"
+ info "Latest CLI version: $TAG_NAME"
DOWNLOAD_URL="https://github.com/${REPO}/releases/download/${TAG_NAME}/${ARTIFACT_NAME}.${ARCHIVE_EXT}"
CHECKSUM_URL="https://github.com/${REPO}/releases/download/${TAG_NAME}/${ARTIFACT_NAME}.${ARCHIVE_EXT}.sha256"
}
diff --git a/crates/openviking-cli/src/client.rs b/crates/ov_cli/src/client.rs
similarity index 100%
rename from crates/openviking-cli/src/client.rs
rename to crates/ov_cli/src/client.rs
diff --git a/crates/openviking-cli/src/commands/content.rs b/crates/ov_cli/src/commands/content.rs
similarity index 100%
rename from crates/openviking-cli/src/commands/content.rs
rename to crates/ov_cli/src/commands/content.rs
diff --git a/crates/openviking-cli/src/commands/filesystem.rs b/crates/ov_cli/src/commands/filesystem.rs
similarity index 100%
rename from crates/openviking-cli/src/commands/filesystem.rs
rename to crates/ov_cli/src/commands/filesystem.rs
diff --git a/crates/openviking-cli/src/commands/mod.rs b/crates/ov_cli/src/commands/mod.rs
similarity index 100%
rename from crates/openviking-cli/src/commands/mod.rs
rename to crates/ov_cli/src/commands/mod.rs
diff --git a/crates/openviking-cli/src/commands/observer.rs b/crates/ov_cli/src/commands/observer.rs
similarity index 100%
rename from crates/openviking-cli/src/commands/observer.rs
rename to crates/ov_cli/src/commands/observer.rs
diff --git a/crates/openviking-cli/src/commands/pack.rs b/crates/ov_cli/src/commands/pack.rs
similarity index 100%
rename from crates/openviking-cli/src/commands/pack.rs
rename to crates/ov_cli/src/commands/pack.rs
diff --git a/crates/openviking-cli/src/commands/relations.rs b/crates/ov_cli/src/commands/relations.rs
similarity index 100%
rename from crates/openviking-cli/src/commands/relations.rs
rename to crates/ov_cli/src/commands/relations.rs
diff --git a/crates/openviking-cli/src/commands/resources.rs b/crates/ov_cli/src/commands/resources.rs
similarity index 100%
rename from crates/openviking-cli/src/commands/resources.rs
rename to crates/ov_cli/src/commands/resources.rs
diff --git a/crates/openviking-cli/src/commands/search.rs b/crates/ov_cli/src/commands/search.rs
similarity index 100%
rename from crates/openviking-cli/src/commands/search.rs
rename to crates/ov_cli/src/commands/search.rs
diff --git a/crates/openviking-cli/src/commands/session.rs b/crates/ov_cli/src/commands/session.rs
similarity index 100%
rename from crates/openviking-cli/src/commands/session.rs
rename to crates/ov_cli/src/commands/session.rs
diff --git a/crates/openviking-cli/src/commands/system.rs b/crates/ov_cli/src/commands/system.rs
similarity index 100%
rename from crates/openviking-cli/src/commands/system.rs
rename to crates/ov_cli/src/commands/system.rs
diff --git a/crates/openviking-cli/src/config.rs b/crates/ov_cli/src/config.rs
similarity index 100%
rename from crates/openviking-cli/src/config.rs
rename to crates/ov_cli/src/config.rs
diff --git a/crates/openviking-cli/src/error.rs b/crates/ov_cli/src/error.rs
similarity index 100%
rename from crates/openviking-cli/src/error.rs
rename to crates/ov_cli/src/error.rs
diff --git a/crates/openviking-cli/src/main.rs b/crates/ov_cli/src/main.rs
similarity index 100%
rename from crates/openviking-cli/src/main.rs
rename to crates/ov_cli/src/main.rs
diff --git a/crates/openviking-cli/src/output.rs b/crates/ov_cli/src/output.rs
similarity index 100%
rename from crates/openviking-cli/src/output.rs
rename to crates/ov_cli/src/output.rs
diff --git a/crates/openviking-cli/test_ov.sh b/crates/ov_cli/test_ov.sh
similarity index 100%
rename from crates/openviking-cli/test_ov.sh
rename to crates/ov_cli/test_ov.sh