Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md
AI Hero CLI
A fun set of experiments with AI and TypeScript.
Usage
No installation required! Run directly with npx:
npx ai-hero-cli@latestQuick Start
1. Setup
First, configure your AI provider:
npx ai-hero-cli@latest setupThis will guide you through setting up your preferred AI model (OpenAI, Anthropic, or Google).
2. Analyze Your tsconfig.json
npx ai-hero-cli@latest hows-my-tsconfigThis will analyze your tsconfig.json file and provide:
- Detailed recommendations for improvement
- A score for your current configuration
- Interactive Q&A session for follow-up questions
You can also specify a custom path:
npx ai-hero-cli@latest hows-my-tsconfig ./path/to/your/tsconfig.jsonWhat It Does
The AI Hero CLI analyzes your TypeScript configuration and provides expert recommendations based on:
- Best Practices: Suggests modern TypeScript patterns and settings
- Performance: Recommends optimizations for build times and runtime
- Type Safety: Identifies opportunities to catch more bugs at compile time
- Developer Experience: Suggests settings that improve IDE support and debugging
Key Recommendations Include
- Enabling
strict: truefor maximum type safety - Setting appropriate
targetandlibvalues - Configuring module resolution for your project type
- Removing redundant or deprecated options
- Adding useful flags like
noUnusedLocalsandnoUnusedParameters
Commands
ai-hero setup
Configure your AI provider and API keys.
ai-hero hows-my-tsconfig [path]
Analyze your TypeScript configuration file. Defaults to tsconfig.json in the current directory.
Supported AI Providers
- OpenAI (GPT-4, GPT-3.5-turbo)
- Anthropic (Claude)
- Google (Gemini)