Skip to content

eva-foundry/41-eva-cli

41-eva-cli ? EVA ADO Command Center

EVA Ecosystem Integration

Tool Purpose How to Use
37-data-model Single source of truth for all project entities GET http://localhost:8010/model/projects/41-eva-cli
29-foundry Agentic capabilities (search, RAG, eval, observability) C:\eva-foundry\eva-foundation\29-foundry
48-eva-veritas Trust score and coverage audit MCP tool: audit_repo / get_trust_score
07-foundation-layer Copilot instructions primer + governance templates MCP tool: apply_primer / audit_project

Agent rule: Query the data model API before reading source files.

Invoke-RestMethod "http://localhost:8010/model/agent-guide"   # complete protocol
Invoke-RestMethod "http://localhost:8010/model/agent-summary" # all layer counts

eva is a governed, evidence-first CLI for software delivery across ADO, GitHub, and Azure.


What it is

eva promote dev --from-pr 56 --workitem AB#1234

One command that:

  1. Retrieves PR metadata and validates all CI checks pass (including evidence-pack from RB-001)
  2. Triggers AzureClient deploy stub ? graceful receipt entry (real Azure wired once RB-002 is live)
  3. Captures telemetry snapshot stub
  4. Assembles evidence ID: {workitem}-PR{pr}-{timestamp} e.g. 141-PR1-20260221T204206
  5. Updates ADO work item ? adds Hyperlink relation + [EVA] evidence=? comment (idempotent)
  6. Prints a receipt with all steps and their outcomes
  7. Appends to .eva/audit.log.jsonl

Live-tested against ADO project eva-poc (org marcopresta) and GitHub repo eva-foundry/38-ado-poc.


Status ? 2026-02-21

Area Status
Core (cli.py, config.py, models.py, receipts.py, utils.py) ? delivered
Adapters (ADO, GitHub, Azure stub) ? delivered
Commands (context, ado, gh, runbook, evidence, promote) ? delivered
eva init --from-artifacts auto-seeds config from ado-artifacts.json ? delivered
.env + .eva/.env loading ? delivered
33/33 pytest (16 CLI + 17 adapter mock) ? passing
Live E2E: ADO WI 141 linked, PR #1 all checks passed ? verified
AzureClient.deploy() ? real Azure trigger ?? next sprint
AzureClient.telemetry_snapshot() ? Log Analytics query ?? next sprint
eva evidence pack ? zip + SHA-256 + upload ?? next sprint
eva promote stg/prod ? approval-gated ?? next sprint

Installation

cd C:\eva-foundry\eva-foundation\41-eva-cli
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e ".[dev]"

Quick start

# 1. Initialize local state (auto-seeds config from ado-artifacts.json if present)
eva init

# 2. Set credentials ? or put them in .env / .eva/.env
$env:EVA_ADO_PAT    = "your-ado-pat"
$env:EVA_GH_TOKEN   = "your-github-token"

# 3. Configure context
eva context set --app eva-da-rebuild --env dev

# 4. Show context
eva context show

# 5. Check a PR
eva gh pr-show 56
eva gh pr-check 56

# 6. Dry-run promote (shows plan only)
eva promote dev --from-pr 56 --workitem AB#1234 --dry-run

# 7. Execute promote
eva promote dev --from-pr 56 --workitem AB#1234

# 8. View evidence record
eva evidence show AB1234-PR56-20260221T101500

Credential setup

Method File Env vars
Shell $env:EVA_ADO_PAT = "?" EVA_ADO_PAT, EVA_GH_TOKEN
dotenv .env in project root same keys
dotenv .eva/.env (gitignored) same keys

Copy .env.example ? .env and fill in your tokens.


Command reference

Global flags (all commands)

--app <appId>        Override default app from context
--env <env>          dev | stg | prod
--json               Machine-readable JSON output
--dry-run            Show plan ? do not execute
--yes                Skip confirmations
--verbose            Debug output

eva init [--from-artifacts PATH] [--force]

Creates .eva/config.json, .eva/context.json, .eva/policies.json, .eva/audit.log.jsonl.

If ado-artifacts.json exists in the current directory (or --from-artifacts ./path) its ado_org, ado_project, and github_repo are automatically written into config.json.

eva context show / set

View or update default app, env, ADO/GitHub/Azure coordinates.

eva ado create <type> --title <text> [--parent <id>]

Create ADO work item (story, feature, epic, bug).

eva ado update <id> [--state <state>] [--assigned-to <email>]

Update ADO work item fields.

eva ado link <id> [--pr <url>] [--evidence <id>]

Add PR link and evidence comment to work item.

eva gh pr-show <pr>

Show PR status, head SHA, merge state.

eva gh pr-check <pr>

Check PR readiness ? all checks must be completed+success.
Exit 0 = ready, 1 = not ready.

eva runbook list / show <id> / run <id> [--env] [--dry-run]

List, inspect, or execute runbooks. Sources catalog from 37-data-model API (port 8010) with local fallback.

eva evidence show <id>

Show evidence record from 40-eva-control-plane API (port 8020) with fallback.

eva evidence verify <id>

Check artifact hashes + required artifacts present.

eva promote dev --from-pr <pr> [--workitem <id>] [--dry-run]

The core workflow. Ten-step evidence flow:

1  gh.pr_get             retrieve PR metadata
2  evidence_id           {workitem}-PR{pr}-{ts}
3  dry-run gate          stop here if --dry-run
4  gh.pr_checks          all checks must be completed+success
5  az.deploy             trigger deploy (stub ? NotImplementedError ? graceful ~)
6  az.telemetry_snapshot capture metrics (stub ? graceful ~)
7  ado.add_link          add Hyperlink relation to work item (idempotent)
8  ado.add_comment       [EVA] evidence=? comment
9  print_receipt         Rich table summary
10 audit_log             append to .eva/audit.log.jsonl

Evidence ID format

{workitem}-PR{pr}-{timestamp}
e.g.  AB1234-PR56-20260221T101500

Propagated across: PR check title ? Azure deployment tag ? ADO work item comment ? evidence pack


Architecture

41-eva-cli/
  src/eva/
    cli.py              Typer app + init (--from-artifacts) + chat stub
    config.py           Pydantic settings + .eva/ JSON R/W
    models.py           Receipt, ReceiptArtifact, ReceiptLink
    receipts.py         print_receipt() + audit_log()
    utils.py            env(), now_compact(), sha256_file()
    adapters/
      ado.py            ADO REST v7.1 (PAT Basic auth, work items, WIQL)
      github.py         GitHub REST API (PRs, check-runs, artifacts)
      azure.py          Azure deploy + telemetry (stub ? real in next sprint)
    commands/
      context_cmd.py    eva context show / set
      ado_cmd.py        eva ado create / update / link
      gh_cmd.py         eva gh pr-show / pr-check / artifact-get
      runbook_cmd.py    eva runbook list / show / run
      promote_cmd.py    eva promote dev
      evidence_cmd.py   eva evidence show / verify / download
  tests/
    test_cli.py         16 CLI tests (init, context, runbook, promote dry-run)
    test_adapters.py    17 adapter tests (respx mocks ? offline, no creds)
  .env.example          credential template
  .gitignore            excludes .env, .eva/, __pycache__/
  ado-artifacts.json    project manifest (Epic + 4 Features + 6 PBIs)
  ado-import.ps1        ADO onboarding hook
  pyproject.toml        entry point: eva = "eva.cli:app"

Ecosystem links

Component Port What to query
Model catalog API 8010 GET /model/runbooks, /model/cp_agents
Runtime API 8020 GET /evidence/{id}, /runs
ADO cloud work items, sprints
GitHub cloud PRs, checks, artifacts

Next implementation steps

  1. AzureClient.deploy() ? trigger Container Apps Job or az deployment group create
  2. AzureClient.telemetry_snapshot() ? query Log Analytics / App Insights, persist to Blob
  3. eva evidence pack ? zip artifacts + compute hashes + upload to GitHub artifacts
  4. eva promote stg/prod ? with explicit approval gate before executing

About

EVA Foundation -- 41-eva-cli

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors