Skip to content

Napi

Software architecture tooling for the AI age

Install

$git clone https://github.com/nanoapi-io/napi

Install command taken from the project's README or registry entry. Always review code before running it.

napi - Better Software Architecture for the AI Age

napi is a fully offline CLI that analyzes your codebase's architecture -- dependencies, complexity, and structure -- then lets you visualize and refactor it, all without sending your code anywhere.

It generates dependency manifests from your source code, stores them locally, and serves an interactive graph visualizer directly from the CLI.

Features

  • 🔍 Dependency Analysis: Map every file, symbol, and dependency in your codebase automatically.
  • 🚨 Audit: Detect files and symbols that exceed complexity, size, or coupling thresholds.
  • 📊 Interactive Visualizer: Explore your architecture through Cytoscape.js graphs served locally in your browser.
  • 📝 Symbol Extraction: Extract specific functions, classes, or symbols into standalone files for refactoring.
  • 🏷️ AI Labeling (optional): Use OpenAI, Google, or Anthropic models to auto-label dependencies.
  • ⚙️ CI/CD Ready: Integrates into any pipeline -- generate manifests on every push and track architecture over time.
  • 🔒 Fully Offline: No accounts, no servers, no data leaves your machine.

Supported Languages

Language Status
Python ✅ Supported
C# ✅ Supported
C ✅ Supported
Java ✅ Supported
C++ 🚧 In Progress
PHP 🚧 In Progress
JS/TS 🚧 In Progress

Installation

Unix (macOS, Linux)

curl -fsSL https://raw.githubusercontent.com/nanoapi-io/napi/refs/heads/main/install_scripts/install.sh | bash

Or download a binary directly from GitHub Releases.

Windows

Use WSL to run napi. Native Windows support is in progress.

Quick Start

# 1. Initialize your project (creates .napirc)
napi init

# 2. Generate a dependency manifest
napi generate

# 3. Open the visualizer in your browser
napi view

That's it. Your manifest is saved locally in .napi/manifests/ and the visualizer opens at http://localhost:3000.

CLI Commands

napi init

Interactive setup that creates a .napirc configuration file in your project root.

Prompts you for:

  • Language -- Python, C#, C, or Java
  • Include/exclude patterns -- which files to analyze
  • Output directory -- where extracted symbols are written
  • AI labeling (optional) -- provider and concurrency settings
napi init

napi generate

Analyzes your codebase and generates a dependency manifest. The manifest captures every file, symbol, dependency, and metric (lines, complexity, coupling).

Manifests are saved as JSON files in .napi/manifests/ with the naming pattern {timestamp}-{commitSha}.json.

# Interactive (prompts for branch/commit if not in git)
napi generate

# Non-interactive (for CI)
napi generate --branch main --commit-sha abc1234 --commit-sha-date 2026-01-01T00:00:00Z

Options:

  • --branch -- Git branch name (auto-detected if omitted)
  • --commit-sha -- Git commit hash (auto-detected if omitted)
  • --commit-sha-date -- Commit date in ISO 8601 format (auto-detected if omitted)
  • --labelingApiKey -- API key for AI labeling (overrides global config)

napi view

Starts a local web server and opens an interactive dependency visualizer in your browser.

napi view
napi view --port 8080

Similar plugs

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface

An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here…