Skip to content

Repository files navigation

lazydotnet

A terminal-based UI for managing .NET solutions and projects, inspired by lazygit.

lazydotnet provides an interactive, keyboard-driven interface for common .NET development tasks. Navigate your solution structure, build and run projects, manage NuGet packages, and run tests—all without leaving your terminal.

Test Details

lazydotnet.mp4

Important: This project does not include LSP (Language Server Protocol) functionality or debugging capabilities. It focuses on solution/project management and execution tasks.

Table of Contents

Requirements

Installation

dotnet tool install --global lazydotnet

To update to the latest version:

dotnet tool update --global lazydotnet

Optional Dependencies

For the NuGet package update features (checking for outdated packages and updating all packages), install dotnet-outdated:

dotnet tool install --global dotnet-outdated-tool

Nix (flake)

nix profile install github:ckob/lazydotnet
# or run one-shot
nix run github:ckob/lazydotnet

To add as a flake input in your NixOS or home-manager configuration:

# flake.nix
inputs.lazydotnet.url = "github:ckob/lazydotnet";
# home-manager module
home.packages = [
  inputs.lazydotnet.packages.${pkgs.stdenv.hostPlatform.system}.lazydotnet
];

See nix/README.md for full details including the dev shell, regenerating deps.json, and notes on runtime behaviour.

Usage

# Open current directory (auto-detects solution)
lazydotnet

# Open specific solution
lazydotnet MySolution.sln

# Open specific project
lazydotnet --project MyProject.csproj

# Open specific directory
lazydotnet /path/to/project

# Open with explicit solution file
lazydotnet -s MySolution.sln

Features

Solution Explorer

  • Hierarchical tree view of your solution structure
  • Navigate projects and nodes with vim-style keybindings (j/k) or arrow keys
  • Expand/collapse nodes and project groups
  • Visual indicators for running projects with [green](R)[/] marker
  • Supports .sln, .slnx, .slnf, and .csproj files

Project Management

  • Build individual projects or the entire solution (b / B)
  • Run projects with live log streaming (r)
  • Stop running project (s)
  • Edit project files in the editor (e)

Project References Tab

Project References Tab

  • View all project references for the selected project
  • Add new project references from a picker dialog (a)
  • Remove existing references with confirmation (d)
  • Jump to referenced projects in the explorer (Enter)
  • Open referenced projects in your editor (e)

NuGet Packages Tab

NuGet Packages Tab

  • View all NuGet packages with current and latest versions
  • Color-coded version indicators:
    • Green: Patch update available (safe)
    • Yellow: Minor update available (non-breaking)
    • Red: Major update available (potentially breaking)
  • Add new packages via search dialog (a)
  • Update individual packages to latest version (u)
  • Update all outdated packages with strategy selection (U)
    • Patch (Safe): Bug fixes only
    • Minor (Non-breaking): New features
    • Major (Breaking): Upgrade everything
  • Remove packages (d)
  • Version picker with available versions (Enter)

Tests Tab

Test Details

  • Automatic test discovery for all test providers (xUnit, NUnit, MSTest, etc.)
  • Dual protocol support: VSTest (legacy) and Microsoft Testing Platform (MTP)
  • Hierarchical test tree view (namespaces → classes → methods)
  • Run individual tests, test classes, or entire namespaces (r)
  • Filter tests by status (f): All, Running, Failed, or Passed
  • View test details including error messages, stack traces, and output (Enter)
  • Navigate to test source code (e)

Execution Tab

Execution Tab

  • Live log streaming from running projects
  • Auto-scroll to latest output (can be paused)
  • Navigate log history with j/k or arrow keys
  • Run the current project (r)
  • Stop the running project (s)
  • Clear execution logs (c)
  • Resume auto-scroll with Esc

Workspace Management

Workspace Selector

  • Switch between different solutions in the same directory
  • Solution picker dialog for directories with multiple .sln files
  • Support for solution filters (.slnf) and XML-based solutions (.slnx)

Editor Integration

  • Automatic in-editor detection: (Zed, VS Code, Cursor, etc)
  • Open project files, test files
  • Line number navigation for test failures

Global Features

Keybindings Help

  • Panel navigation: Tab / Shift+Tab or number keys 0-3
  • Reload current project/solution data (Ctrl+R)
  • Keybindings help (?) showing context-sensitive shortcuts
  • Build solution (Shift+B)
  • Stop all running projects (Shift+S)

Search

Search is available in some panels.

Key Action
/ Start search (when on searchable panel)
Enter Execute search and show matches
n Next match
N Previous match
Esc Exit search mode
  • Search is per-panel: switching panels preserves each panel's search state
  • Matches are highlighted

Keybindings

Global

Key Action
q Quit
? Show keybindings help
Tab Next panel
Shift+Tab Previous panel
0-3 Switch to panel (0=Details, 1=Workspace, 2=Explorer, 3=Log)
B Build solution
S Stop all running projects
Ctrl+R Reload

Explorer Panel

Key Action
j / Move down
k / Move up
Ctrl+D / PgDn Page down
Ctrl+U / PgUp Page up
h / Collapse node
l / Expand node
Enter / Space Toggle expand/collapse
e Edit in editor
b Build selected project(s)
r Run selected project(s)
s Stop selected project

Details Panel (Tabs)

Key Action
[ Previous tab
] Next tab

Project References Tab

Key Action
j / k Navigate references
a Add reference
d Remove selected reference
e Edit referenced project
Enter Select in explorer

NuGet Tab

Key Action
j / k Navigate packages
a Add package
u Update selected package
U Update all outdated packages
d Remove selected package
Enter Open version picker

Tests Tab

Key Action
j / k Navigate tests
h / l Collapse/expand
Space Toggle expand/collapse
f Cycle filter (All → Running → Failed → Passed)
r Run selected test(s)
e Edit test file
Enter View test details

Execution Tab

Key Action
j / k Navigate log lines
r Run project
s Stop project
c Clear logs
Esc Resume auto-scroll

Log Panel

Key Action
j / k Navigate log lines
Ctrl+D / PgDn Page down
Ctrl+U / PgUp Page up
v Toggle visual selection
y Yank (copy) selection to clipboard
Esc Resume auto-scroll

Configuration

lazydotnet supports a hierarchical configuration system. You can define settings globally, override them locally per-project, and override them via environment variables.

Initialization

To create a configuration file, use the built-in config command:

# Create global configuration
lazydotnet config --init-global

# Create local configuration (in current directory)
lazydotnet config --init-local

Configuration Paths

  • Global: Follows the XDG Base Directory Specification:
    • Linux/macOS: $XDG_CONFIG_HOME/lazydotnet/settings.json (defaults to ~/.config/lazydotnet/settings.json)
    • Windows: %APPDATA%\lazydotnet\settings.json
  • Local: .lazydotnet/settings.json in your current working directory.

Settings schema

The generated settings.json points to the remote JSON schema, providing instant auto-completion and validation in your editor.

These are the default settings:

{
  "$schema": "https://raw.githubusercontent.com/ckob/lazydotnet/main/docs/settings.schema.json",
  "DetailsPane": {
    "ReferencesTab": {
      "Enabled": true,
      "Position": 0
    },
    "NuGetsTab": {
      "Enabled": true,
      "Position": 1
    },
    "TestsTab": {
      "Enabled": true,
      "Position": 2
    },
    "ExecutionTab": {
      "Enabled": true,
      "Position": 3
    }
  },
  "Commands": {
    "Build": {
      "Arguments": "--verbosity minimal"
    },
    "Run": {
      "Arguments": ""
    }
  }
}

Commands.Build.Arguments and Commands.Run.Arguments are appended to the dotnet build and dotnet run commands respectively. For example, setting "Arguments": "--no-build" under Run starts projects without recompiling, provided the build output is up to date.

Environment Variables

Any setting in the configuration hierarchy can be overridden using environment variables prefixed with LAZYDOTNET_. Use underscores (_) to represent the JSON hierarchy.

For example, to configure the TestsTab via environment variables:

export LAZYDOTNET_DETAILSPANE_TESTSTAB_ENABLED=true
export LAZYDOTNET_DETAILSPANE_TESTSTAB_POSITION=0

Integrations

Neovim

A companion plugin is available for Neovim: lazydotnet.nvim

lazydotnet is not a replacement for a C# LSP. For full IDE features in Neovim, it is recommended to use it alongside an LSP provider plugin like easy-dotnet.nvim.

VS Code

lazydotnet is available as a published extension for Visual Studio Code and compatible editors.

lazydotnet is not a replacement for a C# LSP. For full IDE features in VS Code, it can be used alongside the official C# Dev Kit or an alternative like DotRush.

Zed Integration

lazydotnet is not a replacement for the Zed c# extension. It can complement it.

Add this task to your .zed/tasks.json:

[
  {
    "label": "lazydotnet",
    "command": "lazydotnet",
    "use_new_terminal": false,
    "allow_concurrent_runs": false,
    "reveal": "always",
    "reveal_target": "center",
    "hide": "always",
    "shell": {
      "program": "sh"
    }
  }
]

Then add a keybinding to your .zed/keymap.json. For example:

[
  {
    "context": "Workspace",
    "bindings": {
      "cmd-shift-d": [
        "task::Spawn",
        {
          "task_name": "lazydotnet",
          "reveal_target": "center"
        }
      ]
    }
  }
]

Now you can launch lazydotnet with Cmd+Shift+D from Zed.

For Vim mode users, you can use a more specific context like "context": "Editor && VimControl && !VimWaiting && !menu" and bind to space . . or any key combination you prefer.

Acknowledgments

Alternatives

  • easy-dotnet.nvim - A Neovim plugin for .NET development.
  • DotRush - A VS Code extension alternative to C# Dev Kit that works in all VS Code forks.

License

MIT License - See LICENSE for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

A TUI for managing dotnet solutions and projects

Topics

Resources

Stars

159 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages