JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q12710F
  • License MIT

A Next.js package for AI-powered file analysis

Package Exports

  • kernel-pilot
  • kernel-pilot/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (kernel-pilot) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Kernal Pilot

A Next.js package that provides AI-powered file analysis capabilities.

Installation

npm install kernal-pilot

Usage

  1. Start the analysis server:
npx kernal-pilot start
  1. In your Next.js application:
import { analyzeFile, FileAnalyzer } from 'kernal-pilot';

// Using the React component
function MyComponent() {
  const handleAnalysisComplete = (result) => {
    console.log('Analysis result:', result);
  };

  return <FileAnalyzer onAnalysisComplete={handleAnalysisComplete} />;
}

// Or using the function directly
async function analyzeMyFile() {
  try {
    const result = await analyzeFile({
      filePath: '/path/to/file',
      prompt: 'Your analysis prompt'
    });
    console.log('Analysis result:', result);
  } catch (error) {
    console.error('Analysis failed:', error);
  }
}

API

analyzeFile(options)

Analyzes a file using AI.

Parameters:

  • options.filePath: Path to the file to analyze
  • options.prompt: Prompt for the AI analysis

Returns: Promise with analysis results

FileAnalyzer Component

React component for file analysis.

Props:

  • onAnalysisComplete: Callback function called with analysis results