New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

cracked-dev-cli

Package Overview
Dependencies
Maintainers
0
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cracked-dev-cli

AI-powered CLI tool for software development

latest
Source
npmnpm
Version
1.2.19
Version published
Maintainers
0
Created
Source

Cracked Dev CLI

An AI agent CLI tool for performing operations on local projects through natural language. This tool enables developers to make codebase changes, add features, and fix issues using natural language commands.

⚠️ Security Warning: Make sure crkdrc.json is included in your .gitignore file to prevent accidentally committing your API keys. The file contains sensitive information that should never be pushed to version control.

Features

  • Natural language interaction with your codebase
  • Support for multiple AI models (e.g., GPT-4, GPT-3.5-turbo)
  • Custom instruction support for project-specific guidelines
  • Automated code modifications following best practices
  • Built with TypeScript for type safety

Getting Started

Prerequisites

  • Node.js >= 16
  • Yarn

Installation

# Clone the repository
git clone https://github.com/yourusername/cracked-dev-cli.git

# Install dependencies
cd cracked-dev-cli
yarn install

Setting Up Your Environment

  • Copy the example environment file:
cp .env.example .env
  • Edit the .env file with your OpenRouter API key and other configurations:
OPENROUTER_API_KEY=your_api_key_here
APP_URL=your_app_url
APP_NAME=your_app_name
  • Initialize the CLI configuration:
# Initialize with API key from command line
yarn dev:cli crkd --init --openRouterApiKey your_api_key_here

# Or initialize using API key from .env
yarn dev:cli crkd --init

This will create a crkdrc.json configuration file with your settings. The OpenRouter API key will be taken from the command line argument if provided, otherwise it will use the key from your .env file.

CLI Usage

Available Flags

  • --init: Initialize a default crkdrc.json configuration file
  • --openRouterApiKey: Provide OpenRouter API key during initialization (optional, can use .env instead)
  • -r, --root: Root path of the codebase (default: current directory)
  • --instructions-path: Path to custom instructions file
  • --instructions: Raw custom instructions string
  • -m, --model: AI model to use (default: gpt-4)
  • -p, --provider: LLM provider to use
  • -s, --stream: Stream the AI response
  • -d, --debug: Enable debug mode
  • -o, --options: LLM options in key=value format
  • -i, --interactive: Enable interactive mode
  • --auto-scaler: Enable model auto-scaling based on tries

Example Commands

Basic usage:

yarn dev:cli crkd --provider "open-router" --model "gpt-4" "Add error handling"

With custom instructions:

yarn dev:cli crkd --instructions "Follow clean code" --model "gpt-4" --options "temperature=0.7" "Create component"

Interactive mode:

yarn dev:cli crkd --interactive -m gpt-4 -p open-router

Auto-scaling mode:

yarn dev:cli crkd --auto-scaler --provider "open-router" --model "gpt-4" "Create component"

LLM Options

Customize model behavior using these options in format key=value,key2=value2:

  • temperature (0.0-2.0): Controls randomness
  • max_tokens (1+): Maximum tokens to generate
  • top_p (0.0-1.0): Controls diversity via nucleus sampling
  • frequency_penalty (-2.0-2.0): Penalize frequent tokens
  • presence_penalty (-2.0-2.0): Penalize repeated tokens
  • repetition_penalty (0.0-2.0): Reduce token repetition
  • top_k (0+): Limit token choices
  • min_p (0.0-1.0): Minimum probability threshold
  • top_a (0.0-1.0): Dynamic probability threshold
  • seed (integer): For deterministic outputs

Example:

yarn dev:cli crkd --options "temperature=0.7,max_tokens=2000,top_p=0.9"

Project Structure

cracked-dev-cli/
├── bin/                    # CLI entry point
├── src/
│   ├── commands/          # CLI commands
│   ├── config/            # Configuration
│   ├── constants/         # Shared constants
│   ├── middleware/        # CLI middleware
│   ├── services/          # Core services
│   │   ├── Calculator/    # Calculator service
│   │   ├── LLM/          # LLM service
│   │   └── LLMProviders/  # LLM provider implementations
│   └── utils/             # Utility functions
├── docs/                  # Documentation
└── tests/                 # Test files

Development

Start the TypeScript compiler in watch mode:

yarn dev

Testing

# Run tests
yarn test

# Type checking
yarn tsc

# Linting
yarn lint

# Format code
yarn format

Contributing

  • Fork the repository
  • Create your feature branch: git checkout -b feature/my-new-feature
  • Commit your changes: git commit -am 'Add some feature'
  • Push to the branch: git push origin feature/my-new-feature
  • Submit a pull request

License

MIT License - see the LICENSE file for details

Keywords

cli

FAQs

Package last updated on 09 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts