Commands
Complete reference documentation for all nmbl commands.
Command Categories
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
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:
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).
cogc - Cognitive Complexity
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.csprojOutput: 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:
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.mdOutput: 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:
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.slnxOutput: Displays line counts for each file and totals.
projectreferences - Project References
List inbound and outbound project references.
Syntax:
nmbl projectreferences <Project>Arguments:
Project- Path to .csproj file
Examples:
nmbl projectreferences src/Core/Core.csprojOutput: 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:
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.
todos - TODO/HACK Comments
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.csprojOutput: 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:
RootPath- Root directory to search for git repositories
Examples:
# Check all repositories in a directory
nmbl gitstatus ~/projectsOutput: 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:
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 -yOutput: Reports number of folders deleted.
endregions - Remove Region Directives
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/ -yOutput: 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:
RootPath- Root directory containing git repositories
Examples:
# Update all repositories
nmbl gitupdate ~/projectsOutput: 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:
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-cliOutput: Reports iteration progress and final completion status.
Authentication Commands
login - OAuth Authentication
Authenticate using OAuth (Google).
Syntax:
nmbl loginExamples:
nmbl loginOpens a browser for Google authentication.
logout - Clear Tokens
Clear stored authentication tokens.
Syntax:
nmbl logoutExamples:
nmbl logoutRemoves all stored authentication credentials.
whoami - Authentication Status
Display current authentication status.
Syntax:
nmbl whoamiExamples:
nmbl whoamiShows your current authentication method and user information.
Getting Help
For detailed examples of all commands:
nmbl help --with-examples