@humain/humain-code
v0.8.3
Published
Coding agent CLI with read, bash, edit, write tools and session management
Maintainers
Readme
HUMAIN Code CLI
HUMAIN Code CLI is a minimal, extensible AI agent for the terminal. Adapt it to your workflow. Customize it with extensions, skills, prompt templates, and themes. Bundle them as HUMAIN Code CLI packages and share via npm or git.
Use HUMAIN Code CLI interactively, automate it in print or JSON mode, control it over RPC, or build applications with the TypeScript SDK.
The built-in subagent tool discovers user agents in ~/.humain-terminal/agent/agents and, when requested, project-local agents in .humain-terminal/agents. Project-local agents are repository-controlled: untrusted interactive projects require a per-call confirmation, while trusted projects use the existing project-trust decision without prompting again.
HUMAIN Code CLI runs in five modes: interactive, print or JSON, RPC, host-managed agent-exec, and an SDK for embedding in your own apps.
Getting started
Install the command-line interface with npm:
npm install -g --ignore-scripts @humain/humain-codeThis requires Node.js 22.22.2 or newer. HUMAIN Code CLI does not require dependency lifecycle scripts for a normal npm installation.
On macOS and Linux, Nix users can build and run HUMAIN Code CLI from this checkout with nix run ..
Start HUMAIN Code CLI in the directory where you want it to work:
cd /path/to/project
humain-codeThe humain-code CLI is also available through the humain-code-cli, hc, hcc, ht, and humain aliases. The old humain-terminal command still works but is deprecated. The npm package is @humain/humain-code (formerly @humain/terminal). The .humain-terminal config directory and HUMAIN_TERMINAL_* environment variables are unchanged.
To use HUMAIN models, run /login and choose Sign in with HUMAIN. The order is HUMAIN Code (humain-code-account), HUMAIN Node, HUMAIN Gateway, HUMAIN Fuse. Code appears immediately and shows checking connection… while the selected environment is verified; the other providers stay available independently. Production is the default. Use --env dev or --env staging (stg is an alias) to target a non-production Code environment. Then choose a model with /model. See Providers.
Native Code sign-in normally uses encrypted account files with an OS-keychain encryption key. When the keychain is unavailable, you may explicitly choose session-only sign-in before any grant is acquired. Nothing from that sign-in is saved; normal interactive, print, JSON and RPC exits attempt one device-family revocation within 3,000 ms. Unconfirmed revocation is reported on stderr. A crash leaves the session valid until expiry. Persistent accounts are not revoked on normal exit.
Unsupported humain-sso and legacy env/API-key humain-code providers have been removed. Old endpoint variables no longer enable them. User tier files and inert credentials are preserved; retired selections stop without selecting a fallback. Fuse uses its own API key and stays model-empty until owner evidence qualifies its catalog and prices.
See the documentation for full setup and usage instructions.
Support and bug reports
HUMAIN Code CLI is HUMAIN-owned. Send bugs, questions, feedback, and private security reports to [email protected]. GitLab remains the internal system of record; public support does not require a tracker account. Do not post security-sensitive reports publicly.
/bug creates a local ZIP archive in the current directory. It includes narrow, already-available environment/account/generation/install support IDs and bounded diagnostics, never credential files or grants. It asks every time before attaching the conversation and displays its secret-redacted UTF-8 byte size. Declining excludes conversation-derived diagnostics and custom-entry content. Opaque/private/binary data is omitted; unassured secret coverage refuses the export. Review the archive before manually emailing it to [email protected]: code and business content can still be sensitive. Nothing is automatically emailed or uploaded.
Generating a summary requires separate explicit consent, even if you attach the conversation. Only the secret-redacted projection reaches the selected inference provider; the request may use your monthly allowance or provider tokens. Its output is sanitized again before export. Attachment consent does not authorize inference, and failed managed summaries are not automatically resent.
Metadata disclosure
HUMAIN Code CLI automatically sends adoption and performance metadata to the selected built-in --env origin: production https://code.humain.com (default), dev https://code.dev.humain.com, or staging https://code.stg.humain.com. Signed-out metadata is pseudonymous, not anonymous: it uses a purpose-specific random install identifier scoped to the environment. Signed-in metadata is account-attributed using the verified HUMAIN Code account. Signed-out history is not retrospectively linked to your account after login; signed-in events do not include the signed-out install identifier.
Metadata excludes prompts, output, reasoning, paths, tool arguments or results, command text, raw errors, headers, environment dumps, or credentials. CLI analytics metadata is retained for 400 days and diagnostic metadata for 30 days. Fleet-wide metadata is restricted to authorized Forge analytics/admin roles. Authorized account deletion removes identifiable CLI metadata under Forge policy; billing and legal retention are separate. This does not remove local CLI sessions or normal Forge web history, or prevent your selected inference provider from processing conversation content to answer requests.
Explicit offline/no-network controls, including HUMAIN_TERMINAL_OFFLINE=1 and PI_OFFLINE=1, suppress metadata and version-observation delivery. Delivery is bounded and best-effort, with no disk spool; delivery failures do not fail prompts or direct-provider use. The separate version observation reports only the CLI version, not a unique install count. Questions about this policy: [email protected].
Development
Clone the repository, install its dependencies, and run the development build:
git clone https://gitlab.humain.com/humain/data-and-ai-modeling/standard/agentic/humain-terminal.git
cd humain-terminal
npm install --ignore-scripts
./humain-terminal-test.shhumain-terminal-test.sh can be called from any directory and preserves the caller's working directory.
Before submitting changes, run:
npm run check
./test.shFor HUMAIN Code CLI contribution instructions, see the repository CONTRIBUTING.md and Development.
HUMAIN Code CLI also bundles web access, has built-in MCP support (see MCP), and supports HUMAIN Gateway, HUMAIN Node, and Forge/DeployNow integrations. See HUMAIN Code CLI for those workflows.
License
MIT
