npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kite-copilot/cli

v1.0.2

Published

Kite CLI - Analyze frontend codebases and map API calls

Downloads

316

Readme

@kite/cli

Command-line tool for analyzing frontend codebases to discover API mappings. The CLI uses Claude AI to analyze your frontend code, identify routes, API calls, and generate mappings that connect your frontend to the Kite backend.

Prerequisites

Claude CLI

The Kite CLI requires Claude CLI to be installed for code analysis:

npm install -g @anthropic-ai/claude-cli

Verify installation:

claude --version

Node.js

Requires Node.js 18.0.0 or higher.

Installation

From npm (when published)

npm install -g @kite/cli

From source

cd agent/cli-npm
npm install
npm run build

Then run with:

node dist/index.js <command>

Or create a global link:

npm link
kite <command>

Commands

kite login

Authenticate with the Kite backend.

kite login [--backend-url <url>]

Options:

| Option | Description | |--------|-------------| | --backend-url <url> | Kite backend URL (default: https://api.kite.com) |

Environment Variables:

| Variable | Description | |----------|-------------| | KITE_BACKEND_URL | Override default backend URL |

Example:

# Login to production
kite login

# Login to local development server
kite login --backend-url http://localhost:5002

When prompted, enter your API token from the Kite dashboard.

kite logout

Clear stored credentials.

kite logout

kite status

Show current login status.

kite status

kite map

Analyze a frontend codebase to discover API mappings.

kite map <path> [options]

Arguments:

| Argument | Description | |----------|-------------| | <path> | Path to the frontend codebase directory |

Options:

| Option | Description | |--------|-------------| | -o, --output <file> | Output JSON file path (default: kite-mappings.json) | | -u, --upload | Upload mappings to Kite backend after analysis | | -q, --quiet | Suppress terminal visualization output | | -v, --verbose | Show verbose debug output | | --timeout <seconds> | Analysis timeout in seconds (default: 300) | | --no-output-file | Don't generate output JSON file |

Examples:

# Analyze and save to default file
kite map ./my-frontend-app

# Analyze with custom output file
kite map ./my-frontend-app -o custom-mappings.json

# Analyze and upload to backend
kite map ./my-frontend-app --upload

# Quiet mode - just generate the file
kite map ./my-frontend-app --quiet

# Verbose mode for debugging
kite map ./my-frontend-app --verbose

# Increase timeout for large codebases
kite map ./my-frontend-app --timeout 600

Configuration

Credentials are stored in ~/.kite/config.json:

{
  "token": "your-api-token",
  "org_id": "organization-uuid",
  "api_config_id": "config-uuid",
  "email": "[email protected]",
  "org_name": "Your Organization",
  "backend_url": "https://api.kite.com"
}

Output Format

The kite map command generates a JSON file with the following structure:

{
  "version": "1.0",
  "generated_at": "2024-01-15T10:30:00Z",
  "codebase_path": "/path/to/frontend",
  "routes": [
    {
      "route_name": "customers",
      "file_path": "pages/customers.tsx",
      "component_name": "CustomersPage"
    }
  ],
  "api_calls": [
    {
      "endpoint": "/api/customers",
      "method": "GET",
      "component_file": "pages/customers.tsx",
      "action_form_type": null
    }
  ],
  "mappings": [
    {
      "tool_name": "customers",
      "api_endpoint": "/api/customers",
      "navigation_page": "customers",
      "action_form_type": "addCustomer",
      "frontend_component": "CustomersPage",
      "frontend_file_path": "pages/customers.tsx"
    }
  ]
}

Workflow

First-time Setup

  1. Install the CLI and Claude CLI
  2. Get your API token from the Kite dashboard
  3. Login: kite login
  4. Verify: kite status

Analyzing a Codebase

  1. Navigate to your project or provide the path
  2. Run: kite map ./your-frontend --upload
  3. Review the generated mappings
  4. Mappings are now available in the Kite backend

Local Development

For local development without Supabase:

# 1. Seed local test data
python agent/app/scripts/seed_local_dev.py

# 2. Start the backend
cd agent && python server.py

# 3. Login to local backend
kite login --backend-url http://localhost:5002

# 4. Map your codebase
kite map ./your-frontend --upload

Troubleshooting

Claude CLI not found

Error: Claude CLI not found

Solution: Install Claude CLI:

npm install -g @anthropic-ai/claude-cli

Analysis timeout

Error: Analysis timed out after 300 seconds

Solution: Increase the timeout:

kite map ./large-codebase --timeout 600

Authentication failed

Error: Invalid token

Solution: Re-run login:

kite logout
kite login

Not logged in

Error: Not logged in. Run 'kite login' first.

Solution: Login before uploading:

kite login
kite map ./frontend --upload

Path is not a frontend project

Error: Directory doesn't appear to be a frontend project

Solution: Ensure your path contains one of:

  • package.json
  • tsconfig.json
  • src/ directory
  • app/ directory
  • components/ directory
  • pages/ directory

Development

Building

npm run build

Development mode

npm run dev

Running from source

node dist/index.js map ./test-frontend

License

MIT