0.15.0 • Published 4 months ago

puzzle-ai v0.15.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Puzzle 🧩 - AI powered scaffolding

Puzzle showcase

A flexible CLI tool for code generation and scaffolding that integrates with aider-chat to help automate common development tasks.


🤔 Why to use this tool?

Large Language Models (LLMs) are powerful tools for code generation, but they require proper context to be effective. Without clear examples and relevant files, LLMs often make incorrect assumptions, leading to extensive code rewrites.

This tool solves these challenges by providing a structured framework for creating templates for common development tasks like endpoint generation, test creation, CRUD generation, documentation, etc..

With well-designed templates, software development can become a puzzle made up of individual pieces.


📋 Prerequisites

  • Node.js (v20+)
  • aider-chat (python -m pip install aider-install && aider-install) aider installation
  • git

💾 Installation

npm install -g puzzle-ai

cd /your/project/path

puzzle [aider args]

#example
puzzle --model sonnet --cache-prompts

✨ Features


🚀 Usage

Follow this guide to create your first template and start scaffolding

or check out the example project for a complete demonstration of puzzle templates and usage.


🎮 Commands and Parameters

CommandAliasesDescriptionArguments
puzzleRuns scaffolding.optional aider args, custom flags for setup.mjs
puzzle create-pieceLaunches an interactive wizard to create a new puzzle piece template.
puzzle initCreates and initializes the configuration file without running the main application.
puzzle-aiderFor JetBrains IDE Integration.optional aider args, custom flags for setup.mjs
puzzle-batchProcess multiple files with a single instruction. See Batch Mode.<pattern> --msg "instruction" Example: puzzle-batch "src/**/*.js" --msg "add JSDoc comments"

Note 1): Puzzle and Puzzle-aider commands also accept extra arguments that are passed directly to aider (see all arguments in aider --help). For example, puzzle-aider --architect or puzzle --model openrouter/anthropic/claude-3.5-sonnet.

Note 2): the puzzle/common setup will be also included automatically when you run puzzle-aider. See Shared Configuration for details.

puzzle command parameters

ParameterAliasesDescription
--chatEnables aider chat mode for interactive conversations with the LLM.
--history-HUses command history to re-run previous actions. Shows last 10 runs and allows reusing variables.
--no-update-checkSkips version and dependency update checks.
--help-hShows help information.
--version-vShows the version number.

⚙️ Configuration

Configuration file .puzzle.json is located in root of your repository

default config looks like this:

{
   "puzzleDir": "puzzle",
   "aiderArgs": {
      "no-auto-commit": true,
      "no-auto-lint": true
   }
}

aiderArgs will be passed to aider command, check aider --help for more

For example you can set model like this:

{
   "aiderArgs": {
      "model": "openrouter/anthropic/claude-3.5-sonnet",
   }
}

Or override the default config:

{
  "aiderArgs": {
    "no-auto-commit": null, // null values are ignored
    "auto-commit": true
  }
}

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

0.15.0

4 months ago

0.14.0

4 months ago

0.13.1

5 months ago

0.13.0

5 months ago

0.12.0

5 months ago

0.11.0

5 months ago

0.10.3

5 months ago

0.10.2

5 months ago

0.10.1

5 months ago

0.10.0

5 months ago

0.9.11

5 months ago

0.9.10

5 months ago

0.9.9

5 months ago

0.9.8

5 months ago

0.9.7

6 months ago

0.9.6

6 months ago

0.9.5

6 months ago

0.9.4

6 months ago

0.9.3

6 months ago

0.9.2

6 months ago

0.9.1

6 months ago

0.9.0

6 months ago

0.8.0

6 months ago

0.7.2

6 months ago

0.7.1

6 months ago

0.7.0

6 months ago

0.6.2

6 months ago

0.6.1

6 months ago

0.6.0

6 months ago

0.5.1

6 months ago

0.4.0

6 months ago

0.3.1

6 months ago

0.3.0

6 months ago

0.2.0

7 months ago

0.1.1

7 months ago

0.1.0

7 months ago

0.0.2

7 months ago

0.0.1

7 months ago