Skip to content

APPNEURAL-Plugins/cli-plugin-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

APPNEURAL AI Plugin

Package: @appneural/cli-plugin-ai

AI-first helpers for APPNEURAL CLI users. This plugin offers deterministic, mock AI commands that help you explain, clean, analyze, and scaffold code without relying on remote inference calls.

Project Overview

This plugin provides AI-powered features and integrations for the Appneural platform. It enables advanced automation, intelligent data processing, and seamless interaction with other plugins and services.

Benefits

  • Accelerate development with AI automation
  • Enhance user experience with intelligent features
  • Integrate easily with other Appneural plugins
  • Scalable and customizable for various use cases

Installation

npm add @appneural/cli-plugin-ai

Usage

appneural tools ai explain --code "function sum(a,b){ return a + b; }"

Commands (using anx tools)

Command Description
ai explain Explain code snippets with language, line count, and pattern clues
ai refactor Normalize spacing and indentation in a snippet
ai fix Detect missing brackets, loose equality, and other syntax issues
ai optimize Highlight loops, nested conditionals, and long functions to optimize
ai snippet Generate small JS/TS snippets for a task description
ai tests Scaffold basic tests for a function in Jest or other frameworks
ai interfaces Infer a TypeScript interface from sample JSON
ai perf Surface loop counts and large arrays to improve performance
ai stacktrace Summarize a Node.js stack trace with the top frame
ai find-bug Point out loose equality and unused variables
ai suggest-fix Match an error message to likely fixes
ai comments Annotate code lines with inline comments
ai architecture Recommend folder layouts for REST APIs or frontend apps
ai controller Scaffold an Express-style controller for a resource
ai service Build a service class with list/get/create stubs

Example Usage

# Explain code
appneural tools ai explain --code "function sum(a,b){ return a + b; }"

# Refactor code
appneural tools ai refactor --code "function sum(a,b){return a+b;}"

# Fix code
appneural tools ai fix --code "function sum(a,b){return a+b;"

# Optimize code
appneural tools ai optimize --code "for(let i=0;i<arr.length;i++){...}"

# Generate snippet
appneural tools ai snippet --task "fetch data from API"

# Scaffold tests
appneural tools ai tests --function "sum"

# Infer interface
appneural tools ai interfaces --json '{"name":"John","age":30}'

# Performance hints
appneural tools ai perf --code "for(let i=0;i<10000;i++){...}"

# Summarize stacktrace
appneural tools ai stacktrace --trace "Error: ..."

# Find bugs
appneural tools ai find-bug --code "if(a==b){...}"

# Suggest fix
appneural tools ai suggest-fix --error "ReferenceError: x is not defined"

# Annotate comments
appneural tools ai comments --code "function sum(a,b){ return a + b; }"

# Recommend architecture
appneural tools ai architecture --type "REST API"

# Scaffold controller
appneural tools ai controller --resource "user"

# Build service class
appneural tools ai service --resource "user"

For more details, see the documentation or contact the maintainer.

About

Developer AI toolkit for code explanation, refactoring, debugging, testing and automation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors