Title: feat(forge-cli): eforge ai status and usage commands · Issue #93 · elcode-id/elcode-forge · GitHub
Open Graph Title: feat(forge-cli): eforge ai status and usage commands · Issue #93 · elcode-id/elcode-forge
X Title: feat(forge-cli): eforge ai status and usage commands · Issue #93 · elcode-id/elcode-forge
Description: 1. Context & Objective Implement eforge ai status [--ping] and eforge ai usage [--format terminal|json] subcommands in crates/forge-cli to inspect effective AI configuration, masked API key availability, cache state, daily budget, and to...
Open Graph Description: 1. Context & Objective Implement eforge ai status [--ping] and eforge ai usage [--format terminal|json] subcommands in crates/forge-cli to inspect effective AI configuration, masked API key availab...
X Description: 1. Context & Objective Implement eforge ai status [--ping] and eforge ai usage [--format terminal|json] subcommands in crates/forge-cli to inspect effective AI configuration, masked API key ava...
Opengraph URL: https://github.com/elcode-id/elcode-forge/issues/93
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat(forge-cli): eforge ai status and usage commands","articleBody":"## 1. Context & Objective\nImplement `eforge ai status [--ping]` and `eforge ai usage [--format terminal|json]` subcommands in `crates/forge-cli` to inspect effective AI configuration, masked API key availability, cache state, daily budget, and token/cost usage summaries (PRD §19, §36).\n\n- **Parent Epic:** #84\n- **GitFlow Branch:** `feat/forge-093-cmd-ai-status-usage`\n- **Execution Wave:** `wave-12`\n- **DAG Dependencies:** Depends on #88, #90\n- **Estimated Size:** ~260 LOC (`\u003c 400 LOC`)\n\n## 2. Target Files\n- `crates/forge-cli/src/commands/ai_admin.rs` *(NEW: `run_ai_status`, `run_ai_usage`, `AiStatusReport`, `AiUsageReport`)*\n- `crates/forge-cli/src/cli.rs` *(MODIFY: add `Ai` subcommand with `Status` and `Usage` actions)*\n- `crates/forge-cli/src/lib.rs` *(MODIFY: dispatch `Ai` subcommands)*\n\n## 3. Public Contract\n- `eforge ai status [--path \u003cdir>] [--ping] [--format terminal|json]`:\n - Reports `enabled`, effective `provider`, `model`, `base_url`, `api_key_env`, masked credential status (`present (sk-...abcd)` or `missing` or `not required`), `cache_enabled`, `budget_daily_usd`, and optional `--ping` latency/connectivity check.\n- `eforge ai usage [--path \u003cdir>] [--format terminal|json]`:\n - Summarizes `.eforge/ai-usage.jsonl` for today and all-time totals by `provider`/`model`, cached request count, estimated USD spend, and remaining daily budget.\n\n## 4. Security & Privacy Invariants\n- `eforge ai status` without `--ping` makes ZERO network calls.\n- API keys are always masked via `mask_secret` and never printed in plain text in either `terminal` or `json` output.\n\n## 5. Definition of Done & Verification (Tier 2)\n- Tests covering `eforge ai status` with default disabled config, enabled config with masked env key, `--ping` against local mock server, and `eforge ai usage` over a fixture `.eforge/ai-usage.jsonl` ledger.\n- **Selective Verification Gate (Tier 2):**\n 1. `cargo fmt --package forge-cli -- --check`\n 2. `cargo clippy --package forge-cli --all-targets -- -D warnings`\n 3. `cargo test --package forge-cli`\n 4. Smoke run: `cargo run --bin eforge -- ai status --format json`","author":{"url":"https://github.com/luksluki","@type":"Person","name":"luksluki"},"datePublished":"2026-10-19T14:22:34Z","url":"https://github.com/elcode-id/elcode-forge/issues/93"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8cb94352-8235-7afb-c52b-08710f3cc359 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8AE2:33B8A3:7A2A51:A9E80C:6B059809 |
| html-safe-nonce | 947c6dd81aac4317d994e12c9dd03295b98190c078e74bd5230f82b10c5ac4f9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QUUyOjMzQjhBMzo3QTJBNTE6QTlFODBDOjZCMDU5ODA5IiwidmlzaXRvcl9pZCI6IjkwNTE2NzI5Njg1NzY3MzUyNDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9395e44b89f6e07931ffcfee746a1ec7542643cb8ac908777e81d9b709c4f5a3 |
| hovercard-subject-tag | issue:5925667832 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/elcode-id/elcode-forge/93/issue_layout |
| twitter:image | https://opengraph.githubassets.com/40a7babe3384fd4347ee6054f95b14fd7663be8cafd34a273e99dc51e5897ae6/elcode-id/elcode-forge/issues/93 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/40a7babe3384fd4347ee6054f95b14fd7663be8cafd34a273e99dc51e5897ae6/elcode-id/elcode-forge/issues/93 |
| og:image:alt | 1. Context & Objective Implement eforge ai status [--ping] and eforge ai usage [--format terminal|json] subcommands in crates/forge-cli to inspect effective AI configuration, masked API key availab... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | luksluki |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3b72fd2385d76a50ce0fe937d50bb4a81434432c4fd47866074a26f6cd03623f |
| turbo-cache-control | no-preview |
| go-import | github.com/elcode-id/elcode-forge git https://github.com/elcode-id/elcode-forge.git |
| octolytics-dimension-user_id | 337957755 |
| octolytics-dimension-user_login | elcode-id |
| octolytics-dimension-repository_id | 1423983661 |
| octolytics-dimension-repository_nwo | elcode-id/elcode-forge |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1423983661 |
| octolytics-dimension-repository_network_root_nwo | elcode-id/elcode-forge |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 58e2bd32336f3dcee343ec627a4d09c7c444e214 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width