Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
"isRoot": true,
"tools": {
"csharpier": {
"version": "1.0.1",
"version": "1.2.6",
"commands": [
"csharpier"
],
"rollForward": false
},
"dotnet-outdated-tool": {
"version": "4.6.8",
"version": "4.7.1",
"commands": [
"dotnet-outdated"
],
"rollForward": false
},
"husky": {
"version": "0.7.2",
"version": "0.9.1",
"commands": [
"husky"
],
Expand Down
File renamed without changes.
10 changes: 10 additions & 0 deletions .devcontainer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Ignore local-only devcontainer overrides.
devcontainer.local.json
docker-compose.local.yml

# Ignore temporary shell artifacts.
*.tmp

# logs
*.post-create.log
*.post-start.log
51 changes: 51 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Base .NET development image.
FROM mcr.microsoft.com/devcontainers/dotnet:10.0

# Install common developer utilities.
RUN apt-get update && apt-get install -y \
bat \
curl \
fd-find \
fzf \
git \
git-lfs \
jq \
less \
ripgrep \
tree \
unzip \
vim \
wget \
zip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Create a symbolic link for fd-find to be accessible as 'fd'.
RUN ln -s "$(which fdfind)" /usr/local/bin/fd

# Enable Git LFS support.
RUN git lfs install

# Configure PowerShell profile directory.
RUN mkdir -p /home/vscode/.config/powershell

# Copy custom PowerShell profile into the container.
COPY .devcontainer/dotfiles/powershell-profile.ps1 /home/vscode/.config/powershell/Microsoft.PowerShell_profile.ps1

# Ensure NuGet config directory exists and is owned by vscode.
RUN mkdir -p /home/vscode/.nuget/NuGet \
&& chown -R vscode:vscode /home/vscode/.nuget

# Pre-create volume mount points with correct ownership so post-create.sh
# can write into them without requiring chown at runtime.
RUN mkdir -p \
/home/vscode/.claude \
/home/vscode/.claude-runtime/plugins \
/home/vscode/.claude-runtime/marketplaces \
/home/vscode/.claude-runtime/cache \
&& chown -R vscode:vscode \
/home/vscode/.claude \
/home/vscode/.claude-runtime

# Ensure vscode user owns their home directory.
RUN chown -R vscode:vscode /home/vscode
156 changes: 156 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
{
// Display name shown in VS Code.
"name": "${localWorkspaceFolderBasename}",
// Use Docker Compose instead of directly building/running containers.
"dockerComposeFile": [
"docker-compose.yml",
"docker-compose.local.yml"
],
// Main service name from docker-compose.yml.
"service": "devcontainer",
// Folder inside the container where the workspace is mounted.
"workspaceFolder": "/workspace",
// Features installed into the container.
"features": {
// Enhanced git diff pager with syntax highlighting and side-by-side diffs.
"ghcr.io/devcontainer-community/devcontainer-features/delta:1": {},
// Terminal UI for git operations (commits, branches, staging, rebasing, etc.).
"ghcr.io/devcontainer-community/devcontainer-features/lazygit:1": {},
// Installs the Prettier formatter for JavaScript, TypeScript, JSON, Markdown, YAML, etc.
"ghcr.io/devcontainers-community/npm-features/prettier:1": {},
// Installs the Claude Code CLI / agent tooling inside the container.
"ghcr.io/devcontainers-extra/features/claude-code:2": {},
// GitHub Copilot CLI integration for shell assistance and AI-powered command suggestions.
"ghcr.io/devcontainers/features/copilot-cli:1": {},
// Installs Node.js runtime, npm, and related tooling.
"ghcr.io/devcontainers/features/node:2": {},
// Installs PowerShell for cross-platform scripting and shell usage.
"ghcr.io/devcontainers/features/powershell:2": {},
// Installs Python plus common tooling such as pip.
"ghcr.io/devcontainers/features/python:1": {},
// Installs OpenCode AI coding agent tooling.
"ghcr.io/jsburckhardt/devcontainer-features/opencode:1": {},
// Smarter directory navigation with usage-based jumping (`z`, `zi`, etc.).
"ghcr.io/jsburckhardt/devcontainer-features/zoxide:1": {},
// Installs CSharpier code formatter for consistent C# formatting.
"ghcr.io/nikiforovall/devcontainer-features/dotnet-csharpier:1": {},
// Installs Zsh shell and configures it for use in the container.
"ghcr.io/nils-geistmann/devcontainers-features/zsh:0": {},
// Installs Oh My Posh prompt theming engine for customizable shell prompts.
"ghcr.io/rosstaco/devcontainer-features/ohmyposh:1": {},
// dotnet SDKs for C# development
"ghcr.io/devcontainers/features/dotnet:2": {},
// GitHub CLI for interacting with GitHub repositories, issues, pull requests, and more directly from the terminal.
"ghcr.io/devcontainers/features/github-cli:1": {},
// Common utilities like curl, wget, git, and more for general development and scripting tasks.
"ghcr.io/devcontainers/features/common-utils:2": {},
// Mono runtime for running .NET Framework applications and tools that require Mono.
"ghcr.io/sliekens/devcontainer-features/mono:1": {}
},
// Environment variables inside the container.
"containerEnv": {
"CLAUDE_RUNTIME_DIR": "/home/vscode/.claude-runtime",
"DOTNET_CLI_TELEMETRY_OPTOUT": "1",
"DOTNET_NOLOGO": "1",
"ENABLE_LSP_TOOL": "1",
"GIT_CONFIG_GLOBAL": "/home/vscode/.config/git/config",
"NUGET_XMLDOC_MODE": "skip"
},
// VS Code customizations.
"customizations": {
"vscode": {
"extensions": [
// Anthropic Claude Code integration and agent tooling.
"anthropic.claude-code",
// CSharpier formatter integration for consistent C# formatting.
"csharpier.csharpier-vscode",
// Markdown linting and style enforcement.
"davidanson.vscode-markdownlint",
// Advanced Git visualization, blame, history, and repository insights.
"eamodio.gitlens",
// EditorConfig support for consistent cross-editor formatting rules.
"editorconfig.editorconfig",
// Prettier formatter integration for web and config files.
"esbenp.prettier-vscode",
// GitHub Copilot conversational AI assistant.
"github.copilot-chat",
// GitHub Actions workflow syntax support and validation.
"github.vscode-github-actions",
// Highlights and aggregates TODO, FIXME, HACK, NOTE comments.
"gruntfuggly.todo-tree",
// REST API testing directly inside VS Code using .http files.
"humao.rest-client",
// Docker and container tooling integration.
"ms-azuretools.vscode-docker",
// Primary .NET development toolkit and solution management.
"ms-dotnettools.csdevkit",
// C# language support, debugging, and IntelliSense.
"ms-dotnettools.csharp",
// Python language support and tooling.
"ms-python.python",
// Python language server with rich type analysis and IntelliSense.
"ms-python.vscode-pylance",
// PowerShell language support and integrated terminal tooling.
"ms-vscode.powershell",
// Alternating indentation colors for improved readability.
"oderwat.indent-rainbow",
// OpenCode AI agent integration.
"sst-dev.opencode",
// Spell checking for code comments, markdown, and documentation.
"streetsidesoftware.code-spell-checker",
// Quickly sort selected lines alphabetically.
"tyriar.sort-lines",
// Markdown authoring enhancements including shortcuts and TOC generation.
"yzhang.markdown-all-in-one"
],
"settings": {
// Preserve whitespace-only changes in diff view.
"diffEditor.ignoreTrimWhitespace": false,
// Suggest symbols from namespaces not yet imported.
"dotnet.completion.showCompletionItemsFromUnimportedNamespaces": true,
// Display bracket pair guide lines for nested scopes.
"editor.guides.bracketPairs": true,
// Enable inline AI/code completion suggestions.
"editor.inlineSuggest.enabled": true,
// Automatically format supported files on save.
"editor.formatOnSave": true,
// Ensure files end with a trailing newline.
"files.insertFinalNewline": true,
// Remove trailing whitespace during save operations.
"files.trimTrailingWhitespace": true,
// Disable automatic file encoding detection for consistency.
"files.autoGuessEncoding": false,
// UTF-8 without BOM is correct for a Linux container environment.
"files.encoding": "utf8",
// Use LF line endings for cross-platform consistency.
"files.eol": "\n",
// Automatically fetch remote git changes periodically.
"git.autofetch": true,
// "terminal.integrated.defaultProfile.linux": "bash" // default to bash
// "terminal.integrated.defaultProfile.linux": "zsh" // default to zsh
// Use PowerShell as the default integrated terminal shell.
"terminal.integrated.defaultProfile.linux": "pwsh"
}
}
},
// One-time setup after container creation.
//"postCreateCommand": "bash .devcontainer/post-create.sh > /tmp/post-create.log 2>&1 || (cat /tmp/post-create.log && exit 1)",
// "postCreateCommand": "bash .devcontainer/post-create.sh 2>&1 | tee /workspace/.devcontainer/post-create.log; exit ${PIPESTATUS[0]}", // Post Create debug; renders log
"postCreateCommand": "bash .devcontainer/post-create.sh",
// Runs whenever the container starts.
"postStartCommand": "bash .devcontainer/post-start.sh",
// Use non-root user.
"remoteUser": "vscode",
// Sync UID/GID when supported.
"updateRemoteUserUID": true,
// Mounts:
// - claude-data: named Docker volume for all Claude state (auth, plugins, marketplace cache, history).
// Keeps everything writable inside the container without host-path dependencies.
// - claude-runtime: separate named volume for volatile plugin/LSP runtime state.
// Kept separate so a claude-data wipe doesn't orphan running processes.
// - nuget-cache: persists NuGet packages across rebuilds (also declared in docker-compose.yml).
"mounts": [
"source=claude-data,target=/home/vscode/.claude,type=volume",
"source=claude-runtime,target=/home/vscode/.claude-runtime,type=volume"
]
}
24 changes: 24 additions & 0 deletions .devcontainer/docker-compose.local.example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Example local overrides for the devcontainer.
# Copy this file to docker-compose.local.yml and fill in the values below,
# or export the variables in your shell / .env file.
#
# docker-compose.local.yml is git-ignored — your personal paths never get committed.

services:
devcontainer:
volumes:
# Persist Claude authentication tokens from the host so you don't need to
# re-authenticate after every container rebuild.
- ${CLAUDE_DIR}/auth:/home/vscode/.claude/auth

# Share personal Claude skills/prompts from the host into the container.
- ${CLAUDE_DIR}/skills:/home/vscode/.claude/skills:ro

# SSH keys for git access (read-only).
- ${SSH_DIR}:/home/vscode/.ssh:ro

# Host git configuration.
# Configure on the host with:
# git config --global user.name "Your Name"
# git config --global user.email "you@example.com"
- ${GITCONFIG_PATH}:/home/vscode/.gitconfig:ro
26 changes: 26 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
services:
devcontainer:
build:
context: ..
dockerfile: .devcontainer/Dockerfile

volumes:
# Persist NuGet packages between rebuilds.
- nuget-cache:/home/vscode/.nuget/packages

# Mount the repository into the container.
- ..:/workspace:cached

working_dir: /workspace

init: true
stdin_open: true
tty: true

environment:
DOTNET_NOLOGO: "1"
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
NUGET_XMLDOC_MODE: "skip"

volumes:
nuget-cache:
40 changes: 40 additions & 0 deletions .devcontainer/dotfiles/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Top-most EditorConfig file.
root = true

# -----------------------------------------------------------------------------
# Global defaults
# -----------------------------------------------------------------------------
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

# -----------------------------------------------------------------------------
# C#
# -----------------------------------------------------------------------------
[*.cs]
indent_style = space
indent_size = 4

# -----------------------------------------------------------------------------
# JSON / YAML / Markdown
# -----------------------------------------------------------------------------
[*.{json,jsonc,yml,yaml,md}]
indent_style = space
indent_size = 2

# -----------------------------------------------------------------------------
# PowerShell
# -----------------------------------------------------------------------------
[*.ps1]
indent_style = space
indent_size = 4

# -----------------------------------------------------------------------------
# Markdown
# Preserve trailing whitespace since it has semantic meaning
# (hard line breaks in CommonMark/GitHub Flavored Markdown).
# -----------------------------------------------------------------------------
[*.md]
trim_trailing_whitespace = false
4 changes: 4 additions & 0 deletions .devcontainer/dotfiles/opencode.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://opencode.ai/config.json",
"lsp": true
}
14 changes: 14 additions & 0 deletions .devcontainer/dotfiles/powershell-profile.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# PowerShell profile loaded inside the container.

# Configure Oh My Posh
oh-my-posh init pwsh | Invoke-Expression

# Better directory listings.
Set-Alias ll Get-ChildItem

# Common git shortcuts.
function gs { git status }
function gl { git log --oneline --graph --decorate -20 }

# Improve terminal experience.
$PSStyle.FileInfo.Directory = "`e[36m"
38 changes: 38 additions & 0 deletions .devcontainer/dotfiles/pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Pre-commit hook configuration.
# Install with: pre-commit install
# Run on all files: pre-commit run --all-files
# Update hook versions: pre-commit autoupdate
#
# See https://pre-commit.com for more information.

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
args: [--maxkb=512]

- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
args: [--ignore-words-list=fo]
types_or: [csharp, python, javascript, ts, markdown, shell, yaml, json]

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.44.0
hooks:
- id: markdownlint
args: [--disable, MD013]

- repo: local
hooks:
- id: csharpier
name: CSharpier
entry: dotnet csharpier
language: system
types: [csharp]
pass_filenames: false
Loading
Loading