Skip to content

Getting Started

Prerequisites

Installation

sh
pnpm add -g @n-dx/core

After installing, ndx (or n-dx) is available as the primary command. See the Quickstart for a 5-minute walkthrough. To build from source, see Contributing.

Initialize a Project

sh
ndx init .

This creates .sourcevision/, .rex/, and .hench/ directories in the target project — plus assistant-specific artifacts for Claude and Codex. See Assistant Surfaces below for details on what is generated for each assistant.

Selecting Assistants

By default, ndx init provisions both Claude and Codex surfaces. Use flags to control which assistants are set up:

sh
ndx init .                       # both Claude and Codex (default)
ndx init --claude-only .         # only Claude surfaces
ndx init --codex-only .          # only Codex surfaces
ndx init --assistants=claude .   # equivalent to --claude-only
ndx init --no-codex .            # skip Codex provisioning

Re-init is safe

Running ndx init again detects existing assistant surfaces and reuses them. If only Claude artifacts exist, re-init skips Codex (and vice versa) unless you explicitly pass an assistant flag.

Configure Your LLM

sh
ndx config llm.vendor claude .

# API mode (recommended — best token accounting and reliability)
ndx config llm.claude.api_key sk-ant-... .
# or set the environment variable:
export ANTHROPIC_API_KEY=sk-ant-...

# Optionally pin a model (default: claude-sonnet-4-6)
ndx config llm.claude.model claude-opus-4-20250514 .
sh
# CLI mode (no API key required)
ndx config llm.claude.cli_path claude .
claude login

Codex

sh
ndx config llm.vendor codex .
ndx config llm.codex.cli_path codex .
codex login

Assistant Surfaces

ndx init generates assistant-specific artifacts so that each AI coding assistant can discover your project's workflow, skills, and MCP servers. Both assistants share the same underlying skills and MCP tools — the only difference is the file format each assistant expects.

Claude

ArtifactPathPurpose
InstructionsCLAUDE.mdProject guidance, architecture docs, workflow rules
Skills.claude/skills/{name}/SKILL.mdSlash-command skills (YAML frontmatter format)
Settings.claude/settings.local.jsonAuto-approved read-only MCP tool permissions
MCP serversRegistered via claude mcp add (or auto-configured for Codex)Rex and SourceVision stdio servers

To start working with Claude Code after init:

sh
claude    # open Claude Code — it reads CLAUDE.md automatically

Claude discovers skills from .claude/skills/ and MCP servers from .claude/settings.local.json. For HTTP MCP transport (recommended for production), see MCP Integration.

Codex

ArtifactPathPurpose
InstructionsAGENTS.mdProject guidance, workflow, available skills, MCP server docs
Skills.agents/skills/{name}/SKILL.mdTask skills (plain markdown format)
MCP config.codex/config.tomlMCP server definitions (stdio transport)

To start working with Codex after init:

sh
codex     # open Codex — it reads AGENTS.md automatically

Codex discovers MCP servers from .codex/config.toml and skill documentation from AGENTS.md.

Shared Skills

Both assistants receive the same set of workflow skills, rendered in their respective formats:

SkillDescription
ndx-workExecute PRD tasks with workflow discipline
ndx-planAnalyze codebase and generate PRD proposals
ndx-statusShow PRD progress and task tree
ndx-captureCapture ideas and add to PRD
ndx-zoneExplore architectural zones
ndx-configView and edit project configuration
ndx-reshapeRestructure the PRD tree
ndx-feedbackFile a GitHub issue with project context

Your First Run

sh
# 1. Analyze your codebase
ndx analyze .

# 2. Turn findings into PRD tasks
ndx recommend --accept .

# 3. Execute the next task
ndx work --auto .

# 4. Check progress
ndx status .

That's it. See the Workflow page for the full development loop, or Commands for the complete reference.

Feedback

Found a bug or have a feature idea? Use the /ndx-feedback skill in your assistant to submit it directly:

/ndx-feedback ndx init keeps prompting for provider even though it's already configured

This creates a GitHub issue with your environment details automatically included.

Released under the Elastic License 2.0.