New:Microsoft Teams Notifications Are Now Available in Socket.Learn more β†’
Get Started

@harness-forge/cli

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@harness-forge/cli

Harness Forge: modular agentic AI workspace installer, catalog, and workflow runtime.

Source
npmnpm
Version
1.5.2
Version published
Weekly downloads
50
42.86%
Maintainers
1
Weekly downloads
Β 
Created
Source

version

πŸ”¨ Harness Forge

Your AI coding agent is only as good as its harness.
One command to scan, equip, and continuously improve any AI coding agent in your repository.

Harness Forge demo

Build npm downloads stars license node

πŸš€ Get Started β€’ πŸ”„ Living Loop β€’ πŸ“Š Dashboard β€’ ⌨️ Commands β€’ πŸ’‘ Scenarios β€’ 🎯 Targets β€’ ❓ FAQ

πŸ” Scans & Equips

Your AI agent gets your repo's languages, frameworks, and patterns from the first prompt

πŸ”„ Self-Improves

A closed feedback loop learns what works, tunes itself, and gets smarter every session

πŸ“Š Full Visibility

Real-time dashboard shows every decision, token spend, and compaction β€” no black boxes


Without Harness ForgeWith Harness Forge
🧠 ContextAgent guesses at project structureAgent knows your languages, frameworks, boundaries
⚑ PerformanceStarts fresh every sessionSelf-improves over time via the Living Loop
πŸ“Š VisibilityBlack box β€” no idea what the agent decidedReal-time dashboard with 20 live panels
πŸ’° CostWasted tokens on retries and wrong pathsCompaction + auto-tuning saves 20-40%
πŸ“€ PortabilityStuck on one machine, one setupExport & import learned patterns as .hfb bundles

4 targets 14 languages 12 frameworks 45+ skills 50+ commands

Loop Patterns Tunings

πŸ”„ The Living Loop β€” Your Harness Gets Smarter

Most tools configure once and forget. Harness Forge keeps learning.

  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚ πŸ”       β”‚    β”‚ 🧠       β”‚    β”‚ ⚑       β”‚    β”‚ πŸ“€       β”‚    β”‚ πŸ“₯       β”‚
  β”‚ OBSERVE  │───▢│  LEARN   │───▢│  ADAPT   │───▢│  SHARE   │───▢│  IMPORT  β”‚
  β”‚          β”‚    β”‚          β”‚    β”‚          β”‚    β”‚          β”‚    β”‚          β”‚
  β”‚ Tracks   β”‚    β”‚ Finds    β”‚    β”‚ Auto-    β”‚    β”‚ Export   β”‚    β”‚ Bootstrapβ”‚
  β”‚ sessions β”‚    β”‚ patterns β”‚    β”‚ tunes    β”‚    β”‚ bundles  β”‚    β”‚ anywhere β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β–²                                                              β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“… Day 1 β€” You install

npx @harness-forge/cli

Scans your repo. Installs skills, rules, knowledge packs. Default settings. Everything works out of the box.

πŸ“… Day 3 β€” After ~10 sessions

🧠 Pattern found: "Summarize" saves 40% more tokens
   than "Trim" in this repo (confidence: 82%)

⚑ Auto-tuned: compaction threshold 75% β†’ 65%
   Result: 20% fewer budget warnings

πŸ“… Day 5 β€” Share with your team

hforge export --bundle my-team.hfb
# Send to a teammate β†’
hforge import my-team.hfb
# They get your learned patterns instantly

πŸ“… Ongoing β€” Dashboard shows it all

hforge dashboard

Loop health ring, effectiveness scores, pattern list, tuning log β€” live in your browser.

The more you use it, the better it gets. After ~10 sessions, Harness Forge has learned your repo's patterns and tuned itself for optimal performance. No manual configuration needed.

πŸ›‘οΈ Guardrails β€” auto-tuning is safe
  • Every tunable parameter has hard min/max bounds β€” the tuner can't go wild
  • Every change is logged with before/after values and the pattern that triggered it
  • If the next 3 sessions score worse, the tuning is automatically reverted
  • Your manual config overrides are sacred β€” the tuner won't touch them
  • The dashboard shows every tuning with a one-click revert button

πŸ“Š Real-Time Dashboard

hforge dashboard β€” see everything, live in your browser.

Harness Forge Dashboard

20 panels notifications realtime

πŸ”„ Loop Ring

Live status of each loop stage with health score

πŸ“ˆ Effectiveness

Session score trend β€” are things getting better?

🧠 Insights

Discovered patterns with confidence bars

⚑ Tuning Log

Policy changes with one-click revert

πŸ“‹ All 20 dashboard panels
PanelWhat it shows
πŸ”’ KPI CardsTotal events, tokens, enforcement level, budget gauge
πŸ“ˆ Event TimelineScatter plot of all events over time, color-coded by category
πŸ’Ύ Memory PressureToken usage line chart with threshold marklines
πŸ“Š Budget BreakdownDonut chart of budget allocation (hot-path, output, tools, safety)
πŸ“‹ Live Event FeedSearchable, expandable table of every harness decision
πŸ€– Subagent BriefsDelegated tasks, their context, and outcomes
πŸ“Š Brief MetricsSubagent activity summary and success rates
πŸ”‡ Suppression GaugeHow many duplicate context items were removed
πŸšͺ Expansion GateHistory access requests β€” granted vs denied
βš™οΈ Config EditorEdit memory-policy, context-budget, load-order live
πŸ”„ Loop Health RingSelf-improvement cycle status with stage counts
πŸ“ˆ Effectiveness TrendSession score sparkline (last 20 sessions)
🧠 Insights PanelDiscovered patterns with confidence and "NEW" badges
⚑ Tuning LogPolicy changes with before/after and revert button
πŸ“Š Event DistributionBar chart of top event types
⏱️ Event RateEvents per minute over time
πŸ—ΊοΈ Event HeatmapCategory Γ— time heatmap
πŸ’° Tokens SavedRunning counter of tokens saved by compaction
πŸ“Š Profile DistributionOutput profile selection breakdown
ℹ️ Session InfoSession ID, uptime, version, connection status

πŸ”” Desktop notifications for critical events β€” budget exceeded, memory rotation, tuning applied, pattern discovered.

🏒 Multi-project support β€” switch between projects in one dashboard. Your project list is saved in the browser.

πŸš€ Get Started in 60 Seconds

npx @harness-forge/cli

The CLI walks you through:

  • 🎯 Which AI targets (Codex, Claude Code, or both)
  • πŸ“Š How deep (quick / recommended / advanced)
  • πŸ‘€ Preview of exactly what gets created
  • βœ… One confirmation and you're done

Then make hforge available on your PATH:

npx @harness-forge/cli shell setup --yes

One-liner for CI / scripts:

hforge init \
  --root . \
  --agent codex \
  --agent claude-code \
  --setup-profile recommended \
  --yes

Verify everything is healthy:

hforge doctor --root . --json

⌨️ Your Daily Workflow

Commands organized by when you use them β€” not alphabetically.

πŸŒ… Starting a session

CommandWhat it does
πŸ’‘hforge nextRecommends the single most useful action right now
πŸ₯hforge doctorFull health check with evidence
πŸ”„hforge refreshRegenerate runtime after code changes
πŸ“‹hforge statusReview what's installed

πŸ”„ While working

CommandWhat it does
πŸ“Šhforge dashboardOpen the real-time browser dashboard
πŸ“ˆhforge scoreShow recent session effectiveness scores
🧠hforge insightsBrowse learned patterns with confidence
⚑hforge adaptView/manage auto-tunings
πŸ”hforge traceView recent session traces
πŸ”„hforge loopLiving Loop health summary

πŸ“€ Sharing & maintenance

CommandWhat it does
πŸ“¦hforge export --bundle team.hfbExport tuned harness as portable bundle
πŸ“₯hforge import team.hfbBootstrap from a shared bundle
πŸ”§hforge updateUpdate harness to latest version in place
πŸ”¬hforge auditVerify install integrity
πŸ”Žhforge diff-installCheck what drifted since last install
🧹hforge pruneClean up unused artifacts

🧬 Advanced

CommandWhat it does
πŸ—ΊοΈhforge cartographMap repo structure and boundaries
πŸ”hforge recommendEvidence-backed setup recommendations
🧬hforge recursive plan "..."Structured recursive analysis for hard problems
🎯hforge target compare codex claude-codeSide-by-side target comparison

πŸ’‘ Real-World Scenarios

πŸ“‚ "Just cloned a repo, want AI help"

cd my-project
npx @harness-forge/cli
# Done β€” AI assistant understands this project

🀝 "I use both Codex and Claude Code"

hforge init --agent codex --agent claude-code --yes
hforge target compare codex claude-code

Both agents share .hforge/ but get their own config bridges.

πŸ”™ "Coming back to a project after a break"

hforge next
# Tells you: refresh runtime, review stale artifacts

πŸ‘₯ "Standardize AI setup across my team"

hforge export --bundle our-team.hfb
# Teammate runs:
hforge import our-team.hfb
# Same learned patterns, instant bootstrap

🎯 Supported Targets

Codex Claude Code Cursor OpenCode

CodexClaude Code
Runtimeβœ… Fullβœ… Full
Maintenanceβœ… Fullβœ… Full
HooksπŸ“„ Docs-drivenβœ… Native
PluginsπŸ“„ Manualβœ… Native
Shared .hforge/βœ… Yesβœ… Yes

Use both together β€” they share the same .hforge/ runtime.

hforge target compare codex claude-code

πŸ“¦ What's Included

14 languages 12 frameworks 45+ skills

🌐 14 Language packs

TypeScript, Python, Java, Go, Kotlin, Rust, C++, .NET, PHP, Perl, Swift, Shell, Lua, PowerShell

πŸ—οΈ 12 Framework packs

React, Next.js, Vite, Express, FastAPI, Django, ASP.NET Core, Spring Boot, Laravel, Symfony, Gin, Ktor

πŸ› οΈ 45+ Skills

Language engineering, workflow orchestration, operational helpers, and specialized skills like incident triage, dependency upgrades, API contract review, database migration review, release readiness, and token-budget-optimizer for context-aware compaction.

βš™οΈ How It Works Under the Hood

πŸ—‚οΈ What gets created in your repo
Your Repo
  β”‚
  β”œβ”€β”€ AGENTS.md              ← AI agents read this first
  β”œβ”€β”€ .agents/skills/        ← Discoverable skills
  β”œβ”€β”€ .codex/ or .claude/    ← Target-specific config
  └── .hforge/               ← Hidden canonical runtime
         β”œβ”€β”€ library/        ← Skills, rules, knowledge packs
         β”œβ”€β”€ runtime/        ← State, indexes, traces, insights
         β”œβ”€β”€ generated/      ← Command catalog, launchers
         └── templates/      ← Workflow templates

Visible bridges where AI agents need discovery. Hidden canonical layer where runtime content stays authoritative.

❓ FAQ

Do I need to install anything globally?

No. npx @harness-forge/cli runs directly. For the shorter hforge command, run hforge shell setup --yes once.

Does it change my source code?

Never. Harness Forge only creates its own files (AGENTS.md, .agents/, .hforge/, .codex/, .claude/). Your application code is untouched.

Can I use it in CI/CD?

Yes. Add --yes for non-interactive and --json for machine-readable output:

hforge init --root . --agent codex --setup-profile recommended --yes
hforge doctor --root . --json
How do I remove it?

Delete: .hforge/, .agents/, .codex/, .claude/, AGENTS.md. Your project is back to normal.

Does it send data anywhere?

No. Everything stays local under .hforge/. Nothing is ever sent to the internet. Inspect, delete, or back up anytime.

What Node.js version?

Node.js 22 or newer. Check with node --version.

πŸ“ˆ Project Activity

Star History Chart

🀝 Contributing

See CONTRIBUTING.md for development setup and guidelines.

πŸ™Œ Acknowledgements

Harness Forge was inspired by github/spec-kit. Credit to the GitHub team for shaping cleaner workflow models.

πŸ“„ License

GPL-3.0 β€” see LICENSE.

Your AI agent deserves a better harness.
npx @harness-forge/cli

FAQs

Package last updated on 07 Apr 2026

Related posts