Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

huagent

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

huagent

AI coding agent CLI — 22 LLM providers, 101 models, MIT-licensed

latest
npmnpm
Version
4.3.1
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Huagent

AI coding agent CLI by Huanime. 22 LLM providers, 101 models, MIT-licensed.

npm Downloads Node License: MIT Providers Models Tests

A production-grade AI coding agent in your terminal. Stream-native engine, modern TUI, type-safe multi-provider abstraction. Built for developers who want Claude-Code-class capabilities with full provider flexibility.

huagent ·                                                                 claude-sonnet-4-6
 autonomous off  scope src/middleware/jwt.ts  perm workspace-write
──────────────────────────────────────────────────────────────────────────

> add jwt auth to our express app, replace the old session thing
✓ Got it. Let me first scope the existing auth, then design a JWT middleware

✓ PLAN    add jwt auth to our express app          1.0s
✓ READ    src/middleware/auth.ts                    0.8s
✓ WRITE   src/middleware/jwt.ts                     2.0s
✓ TEST    src/middleware/jwt.ts: passed             2.3s

╭─ subagents (1 running) ─╮  ╭─ Tests passed: 12/12 in 2.3s ─╮
│ reviewer   Check ... 65%│  ╰───────────────────────────────╯
╰─────────────────────────╯

╭─ v4 │ tok 4.2k ($0.0127) │ steps 8 │ perm workspace-write ─╮
╰─────────────────────────────────────────────────────────────╯

Install

One-liner (recommended):

curl -fsSL https://raw.githubusercontent.com/ahmdd4vd/Huagent/main/install.sh | sh

npm:

npm install -g huagent

From source:

git clone https://github.com/ahmdd4vd/Huagent.git
cd Huagent
npm install
npm run build
node bin/huagent.js

Quick start

export ANTHROPIC_API_KEY=***      # or any other provider
huagent

huagent auto-detects your provider from environment variables:

Env varProvider
ANTHROPIC_API_KEYAnthropic Claude
OPENAI_API_KEYOpenAI
GEMINI_API_KEYGoogle Gemini
MINIMAX_API_KEYMiniMax
TOKENROUTER_API_KEYCustom (TokenRouter)
GROQ_API_KEYGroq (ultra-fast inference)
DEEPSEEK_API_KEYDeepSeek
OPENROUTER_API_KEYOpenRouter
GITHUB_TOKENGitHub Copilot
HF_TOKENHuggingFace
PERPLEXITY_API_KEYPerplexity
TOGETHER_API_KEYTogether AI
FIREWORKS_API_KEYFireworks AI
CEREBRAS_API_KEYCerebras
XAI_API_KEYxAI Grok
MISTRAL_API_KEYMistral
NVIDIA_API_KEYNVIDIA NIM
OPENCODE_API_KEYOpenCode Zen
CODEX_API_KEYOpenAI Codex
MIMO_API_KEYXiaomi MiMo
AWS_BEARER_TOKEN_BEDROCKAWS Bedrock
GOOGLE_APPLICATION_CREDENTIALSGoogle Vertex AI

Providers

22 LLM providers, 101 models. Each provider ships with a default model, full model registry, and capability metadata.

Flagship: Claude Opus 4.7, Claude Sonnet 4.6, GPT-5.5, Gemini 3 Pro, Grok 4, Llama 3.3 70B (via Groq/Cerebras/Together/Fireworks/OpenRouter)

Reasoning: DeepSeek R1, o3, QwQ 32B, Sonar Reasoning, Magistral Medium

Fast: Claude Haiku 4.5, GPT-5 mini, Llama 3.1 8B Instant, Gemini 3 Flash, Grok 3 mini

Code: Qwen 3 Coder 480B, Codestral 25, DeepSeek Coder V2, GPT-5.5 Codex

Local (free): Ollama (Llama 3.2, Qwen 2.5 Coder 32B, DeepSeek R1 32B)

Search-augmented: Perplexity Sonar Pro

Cloud: AWS Bedrock (Claude 4.7, Nova Pro/Lite, Llama 3.3 70B), Google Vertex AI (Claude 4.6, Gemini 3 Pro)

Browse all in the TUI:

huagent             # then type:
/providers          # list all 22 providers
/models             # models for current provider
/models anthropic   # models for a specific provider
/models openai gpt-5.5  # switch model

Features

  • 22 LLM providers out of the box, 101 models with pricing + capabilities
  • Stream-native engine — type-safe SSE, automatic tool-call accumulation, accurate cost tracking
  • Modern TUI — width-adaptive (40–240+ cols), no emoji, modern palette
  • Discipline layer — every task goes through Plan → Ground → Observe → Diagnose → Verify
  • WllmConcept — wiki knowledge engine with semantic search, evolution, provenance
  • 26 slash commands — full runtime control over model, provider, mode, scope, memory
  • 5 permission modes — read-only, workspace-write, sandboxed, danger-full-access, custom
  • Auto-detect — set an env var, huagent figures out the provider
  • MIT licensed — free forever

Usage

Slash commands

CommandDescription
/helpShow available commands
/model <name>Switch model
/modelsList models for current provider
/models <provider>List models for a specific provider
/provider <name>Switch LLM provider
/providersList all 22 providers
/autonomousToggle autonomous mode (no confirmations)
/scope <file>Limit edits to one file
/permissions <mode>Switch permission mode
/modesShow all current modes
/memoryInspect loaded memory
/skillsList installed skills
/agentsList subagent types
/marketplaceBrowse wiki bundles
/initCreate starter HUAAGENT.md
/statusShow session status
/costShow token usage + cost
/doctorRun diagnostic checks
/sessionsList saved sessions
/resume <id>Load a saved session
/export <file>Export conversation
/diffShow git diff
/undoShow how to undo last edit
/themeShow or switch theme
/clearFresh local session
/exitExit huagent

Permission modes

ModeBehavior
read-onlyNo edits, no commands
workspace-writeEdit project files only (default)
sandboxedEdits go to a temp dir
danger-full-accessNo confirmations
customUser-defined ruleset

Flags

huagent                                            # interactive TUI
huagent "fix the auth bug"                         # one-shot, no TUI
huagent --provider anthropic --model claude-sonnet-4-6
huagent --autonomous                               # start in autonomous mode
huagent --scope src/auth.ts                        # limit to one file
huagent --permission-mode sandboxed
huagent --tui=modern                               # default TUI
huagent --tui=legacy                               # original TUI
huagent --version

Testing

870+ tests across 5 suites:

npm test
SuiteTestsCoverage
tests/test-providers.ts35022-provider integrity, 101-model pricing, auto-detect, cross-provider
tests/test-tui-stress.ts153Visual regression at 40–240 cols, 1000+ activities, unicode, edge cases
tests/tui-v4.test.ts119Theme, activity store, status, activity feed, slash commands
tests/discipline.test.ts181Plan/Ground/Observe/Diagnose/Verify cycle
tests/cli-commands.test.ts68parseOptions, all 26 slash commands
npm run verify     # lint + test + build

Architecture

See docs/ARCHITECTURE.md for a high-level map of the codebase.

src/
├── cli.tsx              # entry point, arg parsing, bootstrap
├── providers/           # 22-provider registry, 101-model list, unified client
├── engine/v4/           # stream-native actor model, discipline layer
├── tui/                 # modern TUI (width-adaptive)
├── tools/               # bash, file ops, git, search
├── memory/              # SQLite-backed memory
├── wllm/                # wiki concept engine
├── sessions.ts          # session save/load
└── slash-commands.ts    # 26 slash commands

Contributing

See CONTRIBUTING.md. Bug reports and feature requests welcome via issues.

Security

See SECURITY.md for the vulnerability reporting policy and threat model.

License

MIT © 2026 Huanime. All rights reserved.

Inspired by claw-code, OpenClaude, and ECC. Built with Ink.

Keywords

ai

FAQs

Package last updated on 15 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts