Skip to content

feat: add optional AI Agent / LLM tool generation to CLI scaffolding#85

Open
vivekgupta4Git wants to merge 2 commits into
sunilksamanta:masterfrom
vivekgupta4Git:feature/generate-ai-tools
Open

feat: add optional AI Agent / LLM tool generation to CLI scaffolding#85
vivekgupta4Git wants to merge 2 commits into
sunilksamanta:masterfrom
vivekgupta4Git:feature/generate-ai-tools

Conversation

@vivekgupta4Git

Copy link
Copy Markdown

This PR adds AI Agent / LLM Tool support to the calmapi module generation CLI.

As AI frameworks like LangChain, LangGraph, and Vercel AI SDK become more popular, backend frameworks also need to support AI integrations easily.

With this feature, developers can optionally generate standalone AI tool files (*.tool.js) while creating a new CRUD module.

The generated tool includes:

  • Tool descriptions
  • Input data schemas

It also safely connects AI tool executions to existing CalmController handlers while following authentication rules using AuthController.checkLogin.

Key Changes

  • Interactive CLI Prompt: Added a native readline check (askQuestion) asking the user: “Do you want to generate an AI tool file for this module? (y/N)”.

  • Standalone Tool Template: Created sample.tools.js in the resource module templates. It generates a completely clean, isolated [module-name].tool.js file when opted in.

  • Zero Architectural Overhead: If the user declines the tool layer during generation, the project remains 100% clean and pristine (no tool file is generated, and standard templates are unchanged).

  • Documentation Alignment: Updated README.md and package.json description structures to reflect the updated framework capabilities.

@sunilksamanta

Copy link
Copy Markdown
Owner

Hey @vivekgupta4Git
This is awesome man! I really loved it, I haven't tested yet, but reviewed the code. Will merge soon. Thanks for this 👍🏼

@vivekgupta4Git

Copy link
Copy Markdown
Author

@sunilksamanta thanks for the kind words. I have one question. Currently, the CLI only exposes the module generation command. But after adding the agentic tool file support, I’m thinking of exposing more generation commands so older repositories that don’t already have generated agentic files can also benefit.

For example:

"calmapi -g tool moduleName"

("-g" would act as a shortcut generation command.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants