A lightning-fast CLI to browse Dataverse schema and analyze dependency impact before you break production.
[INSERT: 10-second terminal GIF showing
d365ai impact search account.tvs_cityin action]
Figure: Finding all uses of a field in 2 seconds
- Browse Schema β Explore entities, attributes, and relationships
- Search Entities β Find entities and fields instantly
- Export Schema β Export as JSON, Markdown, or CSV
- Delta Sync β 10-20x faster incremental updates (3-5s vs 60s)
- Multi-Environment β Manage connections to Dev, Test, Prod
- VS Code Extension β Tree view, search panel, Code Lens
- Dependency Detection β Find all uses of an entity or field
- Multi-Source Scanning:
- Dataverse API (relationships, workflows, business rules)
- JavaScript web resources
- C# plugin code (Azure DevOps integration)
- Field-Level Analysis β Search specific field usage (e.g.,
account.tvs_city) - Code Context β Shows line numbers and code snippets
- Visual Graphs β Interactive dependency visualization
- Impact Reports β Markdown/JSON reports for change review
- β Node.js 18.0+
- β
Dataverse environment URL (e.g.,
https://yourorg.crm.dynamics.com) - β Azure AD App Registration (for non-interactive login) OR use interactive device flow
# Clone and install locally
git clone https://github.com/AdventureAdept/d365-tools.git
cd d365-tools
npm install
npm linkd365ai env connectYou'll be prompted for:
- Organization URL
- Client name (friendly name for this connection)
- Interactive login via device code (or provide Client ID/Secret for service principal)
d365ai schema pull# Search for entities
d365ai search entity account
# Find field dependencies (prevents breaking changes!)
d365ai impact search account.tvs_city
# Analyze full impact before renaming
d365ai impact analyze account --full[INSERT: Screenshot of VS Code Tree View showing entity browser]
Figure: Browse Dataverse schema directly in VS Code
[INSERT: Screenshot of interactive dependency graph visualization]
Figure: Visual impact analysis before schema changes
[INSERT: GIF created with vhs showing delta sync speed]
Figure: Delta sync completes in 3 seconds (vs 60 seconds for full sync)
.
βββ π src
β βββ π api/ # Dataverse & Azure DevOps connectivity
β βββ π οΈ commands/ # CLI entry points (d365ai)
β βββ ποΈ schema/ # Schema management (browse, search, export)
β βββ π impact/ # Impact analysis (dependencies, graphs)
βββ π» vscode-extension/ # Tree view, WebView, Code Lens
βββ π docs/
β βββ tutorials/ # How-to guides
β βββ reference/ # CLI flags, API docs
β βββ explanation/ # Architecture, design decisions
βββ π§ͺ tests/ # Unit & Integration (Vitest)
| Sync Type | Time | API Calls |
|---|---|---|
| Full Sync | 60s | 500+ |
| Delta Sync | 3-5s | 10-20 |
How? Uses ETag headers and delta-token tracking to fetch only changed metadata since last sync.
β OS Keychain/Secret Store - Tokens encrypted using:
- Windows: Credential Manager
- macOS: Keychain
- Linux: libsecret (GNOME Keyring/KWallet)
Never stored in plain text!
- MSAL.js with device flow (interactive)
- Service Principal support (client credentials)
- Automatic token refresh (no manual re-auth)
Problem: Need to rename account.tvs_city to account.tvs_municipality
# 1. Find all usages first
d365ai impact search account.tvs_city --show-code
# 2. Review output (plugins, web resources, workflows)
# 3. Update code, test, then rename in DataverseWhy: Prevents 5 hidden dependencies from breaking production.
Problem: Is it safe to delete tvs_log entity?
# 1. Analyze full impact
d365ai impact analyze tvs_log --full
# 2. Review: Shows 3 plugins, 2 workflows, 1 view
# 3. Remove dependencies first, then deleteWhy: Prevents orphaned code and broken workflows.
Problem: Who's accessing account.creditlimit?
# Audit field usage with code context
d365ai impact search account.creditlimit --show-codeCheck: Validation, security roles, logging.
Problem: Need logical name for "city" field
# Search across all entities
d365ai search field city
# Or search in specific entity
d365ai search field city --entity accountWhy: Faster than opening D365 or XrmToolBox.
| Type | Content |
|---|---|
| π Tutorials | Connect to Dataverse β’ Analyze Impact β’ Before Renaming Field |
| π Reference | CLI Commands β’ API Reference |
| π‘ Explanation | Architecture β’ Delta Sync Design |
git clone https://github.com/AdventureAdept/d365-tools.git
cd d365-tools
npm installnpm link
d365ai --version # Test your local changesnpm testnpm run build- Fork the repository
- Create branch:
git checkout -b feature/your-feature - Make changes and test locally with
npm link - Run tests:
npm test - Submit PR with description of changes
- Use
npm linkto test CLI changes in real-time - Run
npm run watchfor auto-rebuild during development - Add tests for new features (Vitest)
- Update docs in the same PR as code changes
MIT License - see LICENSE for details.
- Built with Microsoft Dataverse Web API
- Uses MSAL.js for authentication
- VS Code Extension API
Questions?
- π Read the docs
- π Open an issue
- π¬ Discussions
Made with β€οΈ for Dynamics 365 developers