Commands

Complete reference documentation for all nmbl commands.

Command Categories

nmbl commands are organized into three categories:

Code Analysis Commands

These commands analyze your code without making any modifications.

cc - Cyclomatic Complexity

Calculate cyclomatic complexity for C# methods in your projects.

Syntax:

nmbl cc <ProjectFileOrDirectory>

Arguments:

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).


cogc - Cognitive Complexity

Calculate cognitive complexity for C# code.

Syntax:

nmbl cogc <ProjectFileOrDirectory>

Arguments:

Examples:

# Analyze cognitive complexity
nmbl cogc src/MyProject/MyProject.csproj

Output: Displays cognitive complexity scores for methods in your code.


deps - Dependency Graph

Generate dependency graphs in Mermaid, HTML, or SVG format.

Syntax:

nmbl deps <ProjectOrSolution> [options]

Arguments:

Options:

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.


loc - Lines of Code

Count lines of code in your projects.

Syntax:

nmbl loc <ProjectOrSolution>

Arguments:

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.


projectreferences - Project References

List inbound and outbound project references.

Syntax:

nmbl projectreferences <Project>

Arguments:

Examples:

nmbl projectreferences src/Core/Core.csproj

Output: Shows which projects reference the specified project and which projects it references.


regions - Region Count

Count #region directives in C# files.

Syntax:

nmbl regions <ProjectFileOrDirectory>

Arguments:

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.


todos - TODO/HACK Comments

Find TODO and HACK comments in your code.

Syntax:

nmbl todos <ProjectFileOrDirectory>

Arguments:

Examples:

# Find TODOs in a project
nmbl todos src/MyProject/MyProject.csproj

Output: Lists all TODO and HACK comments with their locations.


gitstatus - Git Repository Status

Check the status of git repositories in a directory tree.

Syntax:

nmbl gitstatus <RootPath>

Arguments:

Examples:

# Check all repositories in a directory
nmbl gitstatus ~/projects

Output: Shows status of each git repository (clean, modified, ahead/behind, etc.).


File/System Modification Commands

These commands modify files or system state.

cleanse - Remove bin/obj Folders

Recursively remove all bin and obj folders from a directory tree.

Syntax:

nmbl cleanse [Path] [options]

Arguments:

Options:

Examples:

# Clean current directory (with confirmation)
nmbl cleanse

# Clean specific path without confirmation
nmbl cleanse ~/projects/MySolution -y

Output: Reports number of folders deleted.


endregions - Remove Region Directives

Remove #region and #endregion directives from C# files.

Syntax:

nmbl endregions <ProjectFileOrDirectory> [options]

Arguments:

Options:

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.


gitupdate - Update Git Repositories

Pull latest changes in multiple git repositories.

Syntax:

nmbl gitupdate <RootPath>

Arguments:

Examples:

# Update all repositories
nmbl gitupdate ~/projects

Output: Shows update status for each repository.


iterate - AI-Powered Task Completion

Automate multi-step tasks using AI agents in a loop.

Syntax:

nmbl iterate [run] [iterations] [options]
nmbl iterate setup [options]

Arguments:

Options (run):

Options (setup):

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.


Authentication Commands

login - OAuth Authentication

Authenticate using OAuth (Google).

Syntax:

nmbl login

Examples:

nmbl login

Opens a browser for Google authentication.


logout - Clear Tokens

Clear stored authentication tokens.

Syntax:

nmbl logout

Examples:

nmbl logout

Removes all stored authentication credentials.


whoami - Authentication Status

Display current authentication status.

Syntax:

nmbl whoami

Examples:

nmbl whoami

Shows your current authentication method and user information.


Getting Help

For detailed examples of all commands:

nmbl help --with-examples