NVIDIA NemoClaw runs OpenClaw AI assistants inside hardened OpenShell sandboxes with NVIDIA Nemotron inference. This file provides agent-specific guidance for working on this codebase.
| Task | Command |
|---|---|
| Install all deps | npm install && cd nemoclaw && npm install && npm run build && cd .. && cd nemoclaw-blueprint && uv sync && cd .. |
| Run all tests | npm test |
| Run plugin tests | cd nemoclaw && npm test |
| Run all linters | make check |
| Type-check CLI | npm run typecheck:cli |
| Build plugin | cd nemoclaw && npm run build |
| Build docs | make docs |
- CLI and plugin: JavaScript (CJS in
bin/, ESM intest/) and TypeScript (nemoclaw/src/) - Blueprint: YAML configuration (
nemoclaw-blueprint/) - Docs: Sphinx/MyST Markdown
- Tooling scripts: Bash and Python
The bin/ directory uses CommonJS intentionally — it's the CLI entry point that must work without a build step. The nemoclaw/ plugin uses TypeScript and requires compilation.
Tests are organized into three Vitest projects defined in vitest.config.ts:
cli—test/**/*.test.{js,ts}— integration tests for CLI behaviorplugin—nemoclaw/src/**/*.test.ts— unit tests co-located with sourcee2e-brev—test/e2e/brev-e2e.test.js— cloud E2E (requiresBREV_API_TOKEN)
When writing tests:
- Root-level tests (
test/) use ESM imports - Plugin tests use TypeScript and are co-located with their source files
- Mock external dependencies; don't call real NVIDIA APIs in unit tests
- E2E tests run on ephemeral Brev cloud instances
NemoClaw isolates agents inside OpenShell sandboxes with:
- Network policies (
nemoclaw-blueprint/policies/) controlling egress - Credential sanitization to prevent leaks
- SSRF validation (
nemoclaw/src/blueprint/ssrf.ts) - Docker capability drops and process limits
Security-sensitive code paths require extra test coverage.
- Read
CONTRIBUTING.mdfor the full contributor guide - Run
make checkto verify your environment is set up correctly - Check that
npm testpasses before starting
Adding a CLI command:
- Entry point:
bin/nemoclaw.js(routes tobin/lib/modules) - Keep
bin/lib/modules as CommonJS - Add tests in
test/
Adding a plugin feature:
- Source:
nemoclaw/src/ - Co-locate tests as
*.test.ts - Build with
cd nemoclaw && npm run build
Adding a network policy preset:
- Add YAML to
nemoclaw-blueprint/policies/presets/ - Follow existing preset structure (see
slack.yaml,discord.yaml)
Updating docs:
- Edit under
docs/(never.agents/skills/nemoclaw-*/*.md) - Regenerate skills:
python scripts/docs-to-skills.py docs/ .agents/skills/ --prefix nemoclaw - Preview:
make docs-live
npm installat root triggersprek installwhich sets up git hooks. If hooks fail, check thatcore.hooksPathis unset:git config --unset core.hooksPath- The
nemoclaw/subdirectory has its ownpackage.json,node_modules/, and ESLint config — it's a separate npm project - SPDX headers are auto-inserted by pre-commit hooks; don't worry about adding them manually
- Coverage thresholds are ratcheted in
ci/coverage-threshold-*.json— new code should not decrease CLI or plugin coverage - The
.claude/skillssymlink points to.agents/skills— both paths resolve to the same content