@openviking/compile
v0.1.4
Published
OpenViking retrieval and content-write CLI for cloud agents
Downloads
1,323
Maintainers
Readme
@openviking/compile
OpenViking retrieval and content-write CLI for cloud agents. The package installs an ov command with seven retrieval commands plus write; other mutation and administration commands are not included. Each included command follows the same option contract and behavior as its counterpart in @openviking/cli.
Install
npm i -g @openviking/compileDo not install this package globally alongside @openviking/cli; both packages provide an executable named ov. Install one package globally, or run this restricted distribution in an isolated project with npm exec.
npm exec --yes --package=@openviking/compile -- ov --helpAuthentication
The CLI reads its API key only from OPENVIKING_API_KEY:
export OPENVIKING_API_KEY="<your-api-key>"The value is sent unchanged as a Bearer credential in the Authorization
header. This is compatible with sandbox Vaults that expose a placeholder in
the environment and replace it at the network egress. The native CLI trusts
both Mozilla public roots and certificates installed in the operating
system's trust store, including sandbox egress gateway CAs.
The API endpoint defaults to:
https://api.vikingdb.cn-beijing.volces.com/openvikingTo use another OpenViking data-plane endpoint, write its URL to
~/.openviking/ovcli.conf:
{
"url": "https://openviking.example.com/openviking"
}Only the URL is read from this file. Authentication still comes exclusively
from OPENVIKING_API_KEY; credentials in ovcli.conf are ignored. Set
OPENVIKING_CLI_CONFIG_FILE to select a different config file.
Commands
| Command | Purpose |
| --- | --- |
| ov read <uri> | Read full file content |
| ov write <uri> --content <text> | Replace, append, or create text content |
| ov grep --uri <uri> <pattern> | Search file content with a regular expression |
| ov glob <pattern> | Search file names with a glob pattern |
| ov ls [uri] | List directory contents |
| ov tree <uri> | Print a directory tree |
| ov find <query> | Run semantic retrieval |
| ov search <query> | Run context-aware retrieval |
Run ov <command> --help for command-specific options. Add --output json for machine-readable output.
write accepts inline text or a local UTF-8 text file:
ov write viking://resources/notes.md --content "updated text"
ov write viking://resources/notes.md --from-file ./notes.md --append
ov write viking://resources/new.md --content "new text" --mode create --waitThe write modes are replace (default), append, and create. Use --processing-mode vectors_only to skip semantic processing while updating vectors.
Supported platforms
| Platform | Architecture | | --- | --- | | Linux | x64, ARM64 | | macOS | Apple Silicon, Intel | | Windows | x64 |
License
Apache-2.0
