Commands
Complete reference documentation for all nmbl commands.
nmbl commands are organized into three categories:
- Code Analysis Commands - Read-only commands that analyze your code
- File/System Modification Commands - Commands that modify files or system state
- Authentication Commands - Manage authentication credentials
These commands analyze your code without making any modifications.
Calculate cyclomatic complexity for C# methods in your projects.
Syntax:
nmbl cc <ProjectFileOrDirectory>
Arguments:
ProjectFileOrDirectory- Path to a .csproj file or directory
Examples:
# Analyze a specific project
nmbl cc src/MyProject/MyProject.csproj
# Analyze all projects in a directory
nmbl cc src/
Output: Displays a table of methods with their cyclomatic complexity scores, ordered by complexity (highest first).
Calculate aggregate complexity for projects or solutions.
Syntax:
nmbl ac <Path> [options]
Arguments:
Path- Path to a .csproj file, .slnx solution file, or directory
Options:
--verbose,-v- Show breakdown of contributing methods
Examples:
# Calculate AC for a project
nmbl ac src/MyProject/MyProject.csproj
# Calculate AC for a solution with details
nmbl ac MySolution.slnx --verbose
Output:
Outputs the integer aggregate complexity value. With --verbose, shows methods with CC >= 10.
Calculate cognitive complexity for C# code.
Syntax:
nmbl cogc <ProjectFileOrDirectory>
Arguments:
ProjectFileOrDirectory- Path to a .csproj file or directory
Examples:
# Analyze cognitive complexity
nmbl cogc src/MyProject/MyProject.csproj
Output: Displays cognitive complexity scores for methods in your code.
Generate dependency graphs in Mermaid, HTML, or SVG format.
Syntax:
nmbl deps <ProjectOrSolution> [options]
Arguments:
ProjectOrSolution- Path to .csproj or .slnx file
Options:
--output <path>- Output file path (determines format by extension: .md, .html, .svg)--include-nuget- Show NuGet packages without versions--include-nuget-versions- Show NuGet packages with version numbers
Examples:
# Generate Mermaid markdown
nmbl deps MySolution.slnx --output deps.md
# Generate HTML with interactive diagram
nmbl deps MyProject.csproj --output deps.html
# Generate SVG image
nmbl deps MySolution.slnx --output deps.svg
# Include NuGet packages
nmbl deps MyProject.csproj --include-nuget --output deps.md
Output: Creates a visual dependency graph in the specified format.
Count lines of code in your projects.
Syntax:
nmbl loc <ProjectOrSolution>
Arguments:
ProjectOrSolution- Path to .csproj or .slnx file
Examples:
# Count lines in a project
nmbl loc src/MyProject/MyProject.csproj
# Count lines in entire solution
nmbl loc MySolution.slnx
Output: Displays line counts for each file and totals.
List inbound and outbound project references.
Syntax:
nmbl projectreferences <Project>
Arguments:
Project- Path to .csproj file
Examples:
nmbl projectreferences src/Core/Core.csproj
Output: Shows which projects reference the specified project and which projects it references.
Count #region directives in C# files.
Syntax:
nmbl regions <ProjectFileOrDirectory>
Arguments:
ProjectFileOrDirectory- Path to .csproj file or directory
Examples:
# Count regions in a project
nmbl regions src/MyProject/MyProject.csproj
# Count regions in a directory
nmbl regions src/
Output: Displays files containing #region directives and their counts.
Find TODO and HACK comments in your code.
Syntax:
nmbl todos <ProjectFileOrDirectory>
Arguments:
ProjectFileOrDirectory- Path to .csproj file or directory
Examples:
# Find TODOs in a project
nmbl todos src/MyProject/MyProject.csproj
Output: Lists all TODO and HACK comments with their locations.
Check the status of git repositories in a directory tree.
Syntax:
nmbl gitstatus <RootPath>
Arguments:
RootPath- Root directory to search for git repositories
Examples:
# Check all repositories in a directory
nmbl gitstatus ~/projects
Output: Shows status of each git repository (clean, modified, ahead/behind, etc.).
Run dotnet test and display a formatted, color-coded results table grouped by project.
Syntax:
nmbl test [path] [options]
Arguments:
path- Path to a.slnx,.sln,.csprojfile, or directory (default: current directory)
Options:
--output <format>,-o <format>- Output format:table(default),json,markdown--no-format- Skip nmbl formatting; use rawdotnet testoutput--no-color- Disable color coding in the results table
Examples:
# Run tests in current directory
nmbl test
# Run tests for a specific solution
nmbl test MySolution.slnx
# Output results as markdown
nmbl test --output markdown
# Skip nmbl formatting
nmbl test --no-format
Output: Displays a results table (Passed/Failed/Skipped per project) and a timing summary (Restore, Build, Test, Total).
These commands modify files or system state.
Recursively remove all bin and obj folders from a directory tree.
Syntax:
nmbl cleanse [Path] [options]
Arguments:
Path- Root directory to clean (default: current directory)
Options:
-y- Skip confirmation prompt
Examples:
# Clean current directory (with confirmation)
nmbl cleanse
# Clean specific path without confirmation
nmbl cleanse ~/projects/MySolution -y
Output: Reports number of folders deleted.
Remove #region and #endregion directives from C# files.
Syntax:
nmbl endregions <ProjectFileOrDirectory> [options]
Arguments:
ProjectFileOrDirectory- Path to .csproj file or directory
Options:
-y- Skip confirmation prompt
Examples:
# Remove regions from a project
nmbl endregions src/MyProject/MyProject.csproj
# Remove regions without confirmation
nmbl endregions src/ -y
Output: Reports number of region directives removed from each file.
Pull latest changes in multiple git repositories.
Syntax:
nmbl gitupdate <RootPath>
Arguments:
RootPath- Root directory containing git repositories
Examples:
# Update all repositories
nmbl gitupdate ~/projects
Output: Shows update status for each repository.
Automate multi-step tasks using AI agents in a loop.
Syntax:
nmbl iterate [run] [iterations] [options]
nmbl iterate setup [options]
Arguments:
iterations- Maximum number of iterations (default: 10)
Options (run):
--agent <name>- AI agent:copilot-sdk(default),copilot-cli,claude-cli--model <name>- Model to use (use?for interactive selection)--input <path>- Directory with prompt.md, requirements.md, progress.md--workspace <path>- Directory for work files (default:./work/)
Options (setup):
--dir <path>- Target directory (default:./.iterate/)--from <file>- Use existing file as requirements.md--issue <number>- Fetch requirements from GitHub issue--repo <owner/repo>- GitHub repository for issue--force- Overwrite existing files
Examples:
# Run with defaults
nmbl iterate
# Setup from GitHub issue
nmbl iterate setup --issue 123
# Run with Claude agent
nmbl iterate run 20 --agent claude-cli
Output: Reports iteration progress and final completion status.
Authenticate using OAuth (Google).
Syntax:
nmbl login
Examples:
nmbl login
Opens a browser for Google authentication.
Clear stored authentication tokens.
Syntax:
nmbl logout
Examples:
nmbl logout
Removes all stored authentication credentials.
Display current authentication status.
Syntax:
nmbl whoami
Examples:
nmbl whoami
Shows your current authentication method and user information.
For detailed examples of all commands:
nmbl help --with-examples