mcpField
E
eve-cli-primitives

eve-cli-primitives

github.com/incept5云与 DevOps0302 次安装17 周前更新
代码仓库

关于 eve-cli-primitives

eve-cli-primitives 是 Eve 命令行技能的命令参考,面向管理 Eve 云环境、部署和 Agent 工作流的用户。它覆盖配置、作业、集成、构建与诊断等操作。

主要功能

  1. 01配置配置文件与身份验证
  2. 02管理组织、项目和环境
  3. 03创建并跟踪作业与工作流
  4. 04管理密钥、集成和构建
  5. 05查询追踪并诊断服务

适用场景

  1. 01配置 Eve 项目的部署环境
  2. 02启动并查看 Agent 作业
  3. 03运行工作流并检查日志
  4. 04排查请求追踪和环境问题

安装

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

$npx skills add https://github.com/incept5/eve-skillpacks --skill eve-cli-primitives

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

详细介绍

Eve CLI 原语

使用此技能作为 Eve 的命令指南。示例应简短具体。

配置文件(API 目标 + 默认值)

# Create and use a profile
eve profile create staging --api-url https://api.eve.example.com
eve profile use staging

# Set defaults to avoid repeating flags
eve profile set --default-email [email protected] --default-ssh-key ~/.ssh/id_ed25519
eve profile set --org org_xxx --project proj_xxx

# Inspect current profile
eve profile show

身份验证

eve auth login
eve auth status
eve auth logout
eve auth permissions

# Sync local OAuth tokens for agent harnesses (optional)
eve auth sync

# Nostr challenge (API-level, no CLI command yet)
# POST /auth/challenge {"provider": "nostr", "pubkey": "<hex>"}

组织和项目

eve org list
eve org ensure my-org --slug myorg

eve project list
eve project ensure --name "My App" --slug my-app --repo-url [email protected]:me/my-app.git --branch main

# Membership management
eve org members --org org_xxx
eve org members add [email protected] --role admin --org org_xxx
eve org members remove user_abc --org org_xxx

eve project members --project proj_xxx
eve project members add [email protected] --role admin --project proj_xxx
eve project members remove user_abc --project proj_xxx

URL 影响: 组织的 --slug 和项目的 --slug 会直接构成部署 URL 和 K8s 命名空间:

  • URL:{service}.{orgSlug}-{projectSlug}-{env}.{domain}(例如,api.myorg-my-app-staging.eve.example.com)
  • 命名空间:eve-{orgSlug}-{projectSlug}-{env}(例如,eve-myorg-my-app-staging)

请谨慎选择 slug——创建后不可更改。

环境和部署

# Create a persistent environment
eve env create staging --project proj_xxx --type persistent

# Inspect environments
eve env list --project proj_xxx
eve env show staging --project proj_xxx

# Deploy an environment (requires --ref with 40-char SHA or a ref resolved against --repo-dir)
eve env deploy staging --ref main --repo-dir .

# When environment has a pipeline configured, the above triggers the pipeline.
# Use --direct to bypass pipeline and deploy directly:
eve env deploy staging --ref main --repo-dir . --direct

# Pass inputs to pipeline:
eve env deploy staging --ref main --repo-dir . --inputs '{"key":"value"}'

# Diagnostics
eve env diagnose proj_xxx staging
eve env diagnose proj_xxx staging --request <req_id>     # request-level integrated diagnose
eve env logs proj_xxx staging <service>
eve env logs proj_xxx staging <service> --follow         # stream logs
eve env logs proj_xxx staging <service> --filter route=/api/x --filter status=500
eve env delete proj_xxx staging

--filter k=v 可重复使用;常见键包括:route、status、level、request_id。使用 --grep 进行自由文本匹配,使用 --since/--tail 限定时间范围。

作业(创建 + 观察)

eve job create --description "Review auth flow"
eve job list --phase active
eve job show <job-id>
eve job follow <job-id>
eve job diagnose <job-id>
eve job result <job-id>

# Per-job harness + env overrides (Eden-style per-request brain selection)
eve job create --description "..." \
  --harness-override-file ./profile.json \
  --env-override OPENAI_API_KEY='${secret.OPENAI_KEY}' \
  --env-override MODEL_ENDPOINT=https://qwen.local

--harness-override-file 接受 JSON 对象 {harness, model?, reasoning_effort?, variant?, temperature?}。--env-override KEY=VALUE 可重复使用,会验证 UPPER_SNAKE_CASE 键,并支持 ${secret.KEY} 插值,该插值在启动时解析。

协调(监督 + 线程)

eve supervise <job-id> --timeout 60
eve thread messages <thread-id> --since 10m
eve thread post <thread-id> --body '{"kind":"directive","body":"focus on auth"}'
eve thread follow <thread-id>

Agent + 聊天

# Sync agent/team/chat configuration from repo
eve agents sync --project proj_xxx --ref main --repo-dir .
# Inspect resolved agent config (from latest sync)
eve agents config --project proj_xxx --json
# Simulate chat routing without Slack
eve chat simulate --project proj_xxx --team-id T123 --channel-id C456 --user-id U789 --text "hello"

# Set org default agent slug (fallback when no slug matches)
eve org update org_xxx --default-agent mission-control

包(AgentPacks)

eve packs status
eve packs resolve --dry-run
eve migrate skills-to-packs

Slack 网关命令(在 Slack 内运行):

@eve <agent-slug> <command>
@eve agents list
@eve agents listen <agent-slug>
@eve agents unlisten <agent-slug>
@eve agents listening

Nostr 命令(通过私信发送至平台公钥):

/agent-slug command text
agent-slug: command text

密钥

eve secrets list --project proj_xxx
eve secrets set API_KEY "value" --project proj_xxx
eve secrets delete API_KEY --project proj_xxx
eve secrets show API_KEY --project proj_xxx
eve secrets ensure --project proj_xxx --keys API_KEY
eve secrets export --project proj_xxx --keys API_KEY

系统管理(如已获授权)

eve system status
eve system jobs
eve system envs
eve system env-health --json
eve system env-cost --all
eve system logs api --tail 50
eve system pods
eve system events

eve system env-cost 从管理 API 返回本月至今的环境分配快照。这是快照视图,而非实时 OpenCost 查询;输出中会标注过时或不可用的估算值。

工作流

eve workflow list
eve workflow run qa-review --input '{"task":"audit"}'
eve workflow invoke qa-review --input '{"task":"audit"}'
eve workflow run qa-review --input '{...}' --env-override MODEL=opus-4.5
eve workflow logs job_abc123

--env-override KEY=VALUE 可在 run 和 invoke 中重复使用;这些值会作为 env_overrides 传递给每个步骤的作业。

集成(Slack、Nostr、GitHub)

eve integrations list --org org_xxx
eve integrations slack connect --org org_xxx --team-id T123 --token xoxb-test
eve integrations test <integration_id> --org org_xxx

# Nostr integration (via API)
# POST /integrations {"provider": "nostr", "account_id": "<platform-pubkey>", ...}

流水线和工作流

eve pipeline list
eve pipeline show <project> <name>
eve pipeline run <name> --ref <sha> --env <env> --repo-dir ./my-app

eve workflow list
eve workflow show <project> <name>
eve workflow run <project> <name> --input '{"k":"v"}' [--env-override KEY=VALUE]
eve workflow invoke <project> <name> --input '{"k":"v"}' [--env-override KEY=VALUE] [--no-wait]
eve workflow logs <job-id>

构建

构建是一等原语,用于跟踪从输入(规范)到执行(运行)再到输出(制品)的镜像构建过程。

# List builds for a project
eve build list [--project <id>]

# Create a build spec
eve build create --project <id> --ref <sha> --manifest-hash <hash>

# Show build spec details
eve build show <build_id>

# Start a build run
eve build run <build_id>

# List runs for a build
eve build runs <build_id>

# View build logs
eve build logs <build_id> [--run <run_id>]

# List produced image artifacts (digests)
eve build artifacts <build_id>

# Full diagnostic dump (spec + runs + artifacts + logs)
eve build diagnose <build_id>

# Cancel an active build
eve build cancel <build_id>

流水线的 build 步骤会自动执行构建。使用 eve build diagnose 调试构建失败。

跟踪(OTEL)

可供 Agent 查询的跟踪存储。结合使用 eve env diagnose --request <id> 和 eve env logs --filter request_id=<id>,进行端到端请求排查。

eve traces query --request-id <id>                    # spans for a single request
eve traces query --trace-id <id>                      # spans for a known trace
eve traces query --service api --since 15m --error    # recent errors in a service
eve traces query --route /api/projects --p99          # p99 latency for a route
eve traces query --request-id <id> --json             # machine-readable

必须指定 --request-id、--trace-id、--since、--route 或 --error 之一。--no-cache 会绕过跟踪缓存。

自定义域名

eve domain list [--env <name>] [--project <id>]
eve domain verify <hostname>             # check DNS and show activation status
eve domain status <hostname>             # show domain status and owning env
eve domain transfer <hostname> --to <env>  # move ownership between envs
eve domain unbind <hostname>             # clear binding so next deploy claims it
eve domain remove <hostname>             # delete the domain entirely

系统运行状况

eve system health

Harness(可选)

eve harness list
eve harness list --capabilities
eve harness get mclaude
eve agents config --json

注意事项

  • 如果配置文件中未设置默认项目,请使用 --project。
  • 集成按组织划分;集成相关命令请使用 --org。
  • 作业相关命令优先使用 eve job ...(单数形式)。

评论

支持 Markdown