Skip to content

Repository files navigation

πŸ‚ Dependency Viewer

Search and add dependencies from 8+ registries β€” right inside VS Code.

Dependency Viewer Icon

✨ Find, copy, and paste dependencies without leaving your editor ✨

GitHub release License Languages Registries

GitHub stars GitHub forks GitHub watchers

GitHub code size GitHub repo size GitHub file count


πŸŽ₯ Demo

Demo


πŸ“– What is Dependency Viewer?

Dependency Viewer is a VS Code extension that lets you search for packages across multiple language registries and get properly formatted dependency strings β€” ready to paste into your project files.

No more opening browser tabs for Maven Central, npm, NuGet, RubyGems, or crates.io. Just pick your language, search, and copy.


✨ Features

  • πŸ” Search across 5 package registries β€” Maven Central, npm, NuGet, RubyGems, crates.io
  • 🌍 8 languages supported β€” Java, JavaScript, TypeScript, C#, Ruby, Rust, Kotlin, Groovy
  • πŸ“‹ One-click copy β€” formatted dependency string ready to paste
  • 🎨 Syntax highlighting β€” XML, JSON, Ruby, TOML with custom highlighter
  • ⚑ Instant search β€” debounced input for smooth UX
  • πŸ’Ύ State persistence β€” remembers your last search and results
  • 🎯 Keyboard shortcuts β€” Ctrl+K to focus search, Escape to close

πŸŽ₯ Demo Feature

Demo_Feature


πŸš€ Supported Languages & Registries

Language Registry Format
β˜• Java Maven Central <dependency>...</dependency> (XML)
πŸ’› JavaScript npm "package": "^version"
πŸ’™ TypeScript npm (@types) "@types/package": "^version"
πŸ”· C# NuGet Gallery <PackageReference Include="..." Version="..." />
πŸ’Ž Ruby RubyGems gem 'package', '~> version'
πŸ¦€ Rust crates.io package = "version"
🟣 Kotlin Maven Central implementation("group:artifact:version")
⭐ Groovy Maven Central implementation 'group:artifact:version'

πŸ“ Project Structure

dependency-viewer/
β”œβ”€β”€ πŸ“„ package.json              # VS Code extension manifest
β”œβ”€β”€ πŸ“„ route.json                # Registry API definitions
β”œβ”€β”€ πŸ“„ tsconfig.json             # TypeScript configuration
β”œβ”€β”€ πŸ“ res/                      # Icons and branding
β”‚   └── 🎨 facet-icon-big.png
β”œβ”€β”€ πŸ“ src/                      # Extension source code
β”‚   β”œβ”€β”€ πŸ“„ extension.ts          # Entry point & activation
β”‚   β”œβ”€β”€ πŸ“„ DependencyPanel.ts    # Webview panel management
β”‚   β”œβ”€β”€ πŸ“„ searchHandlers.ts     # Registry API handlers
β”‚   β”œβ”€β”€ πŸ“„ utils.ts              # Route loading utilities
β”‚   └── πŸ“ panel/                # Webview UI
β”‚       β”œβ”€β”€ πŸ“„ webview.html      # Panel structure
β”‚       β”œβ”€β”€ πŸ“„ styles.css        # All styles (CSS variables)
β”‚       └── πŸ“„ main.js           # Search logic & syntax highlighting
└── πŸ“ dist/                     # Build output
    β”œβ”€β”€ πŸ“„ extension.cjs
    β”œβ”€β”€ πŸ“„ route.json
    └── πŸ“ panel/

πŸ”§ How It Works

  1. Open β€” Click πŸ“¦ Dependency Viewer in the status bar
  2. Select β€” Choose a language from the dropdown
  3. Search β€” Type a package name (e.g., spring-boot, react, serde)
  4. Copy β€” Click "Copy to Clipboard" on any result
  5. Paste! β€” Paste directly into your pom.xml, package.json, Gemfile, etc.

Example: Generating a pom.xml

  • Click: Java β†’ Maven β†’ 4.0
  • Generated: ./pom.xml

Example: Searching for spring-boot in Java

  • Search: spring-boot
  • Result:
    • πŸ“¦ org.springframework.boot:spring-boot-starter-web
    • v3.2.0 | MAVEN CENTRAL
  <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
      <version>3.2.0</version>
  </dependency>
  • [πŸ“‹ Copy to Clipboard]

πŸ› οΈ Development

# Clone
git clone https://github.com/qewr1324/dependency-viewer.git

# Install dependencies
cd dependency-viewer
bun install

# Build
bun run build

# Run extension in VS Code
# Press F5 in VS Code

Adding a New Registry

1. Add to route.json:

{
	"NewLanguage": {
		"registry-name": {
			"name": "Registry Display Name",
			"searchUrl": "https://api.registry.com/search",
			"params": {
				"q": "${query}",
				"limit": "20"
			},
			"parseResponse": {
				"items": "results",
				"version": ["version"],
				"format": "{name}@{version}"
			}
		}
	}
}

2. Add search handler in searchHandlers.ts (if needed):

if (repoName === "registry-name") {
	return await searchCustomRegistry(query, config);
}

3. Add syntax highlighting in main.js (if needed):

function highlightCustomLang(code) {
	// Your custom highlighting logic
}

4. Done! The extension will pick it up automatically.

🎨 VS Code Integration

  • πŸ“Š Status Bar β€” Quick access button in the status bar
  • ⌨️ Keyboard Shortcuts β€” Ctrl+K to focus search, Escape to close
  • πŸ’Ύ State Persistence β€” Remembers your last language, query, and results

πŸ“ License

🀝 Contributing

GitHub issues GitHub pull requests GitHub closed issues GitHub closed PRs

GitHub contributors GitHub last commit GitHub commit activity GitHub top language

Contributions are welcome! Whether it's:

  • Adding new registries (PHP Packagist, Go modules, etc.)
  • Improving syntax highlighting
  • Adding more languages
  • Fixing bugs
  • Improving documentation

Check out CONTRIBUTING.md for guidelines.

Made with ❀️ for developers who hate switching to the browser.

Releases

Contributors

Languages