mcpField
C
cli-contexts

cli-contexts

github.com/cheaper-inferenceAgent 工作流82.3k1.0k 次安装今天更新
代码仓库

关于 cli-contexts

cli-contexts 是 omniroute 命令行技能,用于管理上下文工程设置、context-relay 配置和对话会话,适合需要检查上下文管道及管理会话生命周期的运维人员。

主要功能

  1. 01查看和配置上下文工程
  2. 02管理 RTK 过滤器和分配
  3. 03添加、切换、导出和导入上下文
  4. 04将凭据迁移至 OS 密钥链
  5. 05列出、查看和过期会话

适用场景

  1. 01调整上下文令牌预算和过滤规则
  2. 02切换活跃服务器及认证上下文
  3. 03将上下文凭据迁移到 OS 密钥链
  4. 04查看或使指定对话会话过期

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/cheaper-inference/omniroute --skill cli-contexts

安装后在 Claude Code 中输入/cli-contexts确认已加载。

详细介绍

概述

通过 CLI 管理上下文工程配置、RTK 过滤器集和对话会话。应用 context-relay 设置并检查活跃的上下文管道。

快速安装

npm install -g omniroute   # or: npx omniroute
omniroute --version

子命令

context-eng

示例:

omniroute context-eng
context-eng analytics

标志:

  • --period <p>

示例:

omniroute context-eng analytics
context-eng caveman

示例:

omniroute context-eng caveman
context-eng config

示例:

omniroute context-eng config
context-eng show

示例:

omniroute context-eng show
context-eng set

标志:

  • --aggressiveness <n>
  • --max-shrink-pct <n>
  • --preserve-tags <list>

示例:

omniroute context-eng set
context-eng rtk

示例:

omniroute context-eng rtk
context-eng config

示例:

omniroute context-eng config
context-eng show

示例:

omniroute context-eng show
context-eng set

标志:

  • --token-budget <n>
  • --reserve-pct <n>

示例:

omniroute context-eng set
context-eng filters

示例:

omniroute context-eng filters
context-eng list

示例:

omniroute context-eng list
context-eng add

标志:

  • --pattern <p>
  • --priority <n>
  • --action <a>

示例:

omniroute context-eng add
context-eng remove <id>

标志:

  • --yes

示例:

omniroute context-eng remove <id>
context-eng test

标志:

  • --file <path>

示例:

omniroute context-eng test
context-eng raw-output <id>

示例:

omniroute context-eng raw-output <id>
context-eng combos

示例:

omniroute context-eng combos
context-eng list

示例:

omniroute context-eng list
context-eng get <id>

示例:

omniroute context-eng get <id>
context-eng assignments <id>

示例:

omniroute context-eng assignments <id>
contexts

示例:

omniroute contexts
contexts list

列出所有上下文

示例:

omniroute contexts list
contexts add <name>

添加新上下文

标志:

  • --url <u>
  • --api-key <k>
  • --api-key-stdin
  • --access-token <t>
  • --access-token-stdin
  • --scope <s>
  • --description <d>

示例:

omniroute contexts add <name>
contexts use <name>

切换活跃上下文

示例:

omniroute contexts use <name>
contexts current

显示活跃上下文(服务、身份验证、范围)

标志:

  • --name-only

示例:

omniroute contexts current
contexts show <name>

显示上下文详情

示例:

omniroute contexts show <name>
contexts remove <name>

移除上下文

标志:

  • --yes

示例:

omniroute contexts remove <name>
contexts rename <old> <new>

重命名上下文

示例:

omniroute contexts rename <old> <new>
contexts export

将上下文导出为 JSON

标志:

  • --out <path>
  • --no-secrets
  • --include-secrets

示例:

omniroute contexts export
contexts import <file>

从 JSON 文件导入上下文

标志:

  • --merge

示例:

omniroute contexts import <file>
contexts migrate

将旧版明文上下文凭据迁移到操作系统钥匙串

标志:

  • --yes

示例:

omniroute contexts migrate
sessions

示例:

omniroute sessions
sessions list

标志:

  • --user <u>
  • --kind <k>
  • --active
  • --limit <n>

示例:

omniroute sessions list
sessions show <sessionId>

示例:

omniroute sessions show <sessionId>
sessions expire <sessionId>

标志:

  • --yes

示例:

omniroute sessions expire <sessionId>
sessions expire-all

标志:

  • --user <u>
  • --yes

示例:

omniroute sessions expire-all
sessions current

示例:

omniroute sessions current

评论

支持 Markdown