@artinet/create-quick-agent v0.0.6
@artinet/create-quick-agent
A command-line interface (CLI) tool to quickly scaffold starter agent projects from a predefined set of templates. create-quick-agent streamlines the initial setup process, allowing you to get your new agent project up and running in minutes.
From the artinet project.
Features
- Interactive Setup: Guides you through selecting a template and naming your project.
- Variety of Templates: Choose from several starter agent templates to fit different needs.
- Automatic Project Scaffolding: Creates a new project directory, copies template files, and configures basic project settings.
- Dependency Management: Automatically installs necessary dependencies using
npm. - Customizable: Templates are designed to be a starting point for your custom agent development.
Prerequisites
- Node.js (version 22.x or higher recommended, check
package.jsonfor specific engine requirements) npm(comes with Node.js)
Installation & Usage
The easiest way to use create-quick-agent is with npx, which ensures you're always using the latest version:
npx @artinet/create-quick-agent@latestThis command will initiate an interactive session:
- Select a Template: You'll be prompted to choose from the available agent templates.
? Select template › - Use arrow-keys. Return to submit. ❯ basic coder orchestrator - Enter Project Name: You'll be asked to provide a name for your new project. This name will be used for the directory and in the project's
package.json.? Enter your project name › my-new-agent
Once you provide these inputs, create-quick-agent will:
- Create a new directory with your chosen project name.
- Copy the files from the selected template into this new directory.
- Update the
namefield in the new project'spackage.jsonto match your project name. - Run
npm installwithin the new project directory to install all necessary dependencies. - Finally, it will print out instructions on how to navigate into your new project and start developing.
Available Templates
create-quick-agent currently offers the following templates:
basic: A minimal agent template, perfect for understanding the core structure or for simple agent tasks.coder: A template pre-configured for developing agents with a focus on code generation, understanding, or manipulation tasks.orchestrator: A template designed for building orchestrator agents that can manage and coordinate multiple other agents or tasks.
How It Works
The create-quick-agent CLI tool performs the following steps internally:
- Initialization (
src/index.ts):- Displays a welcome banner (if
banner.tsis used). - Uses the
promptslibrary to interactively ask the user for:- The desired template (defined in
src/option.ts). - The name for the new project.
- The desired template (defined in
- Displays a welcome banner (if
- Project Creation (
src/create-project.ts&src/index.ts):- Directory Setup:
- Resolves the path for the new project directory based on the current working directory and the user-provided project name.
- Checks if the target directory already exists to prevent overwriting. If it does, an error is thrown.
- Creates the new project directory.
- Template Copying:
- The
copyFilesAndDirectoriesfunction (insrc/create-project.ts) recursively copies all files and subdirectories from the selected template's folder (e.g.,templates/basic/) into the newly created project directory.
- The
- Package Personalization:
- The
renamePackageJsonNamefunction (insrc/create-project.ts) reads thepackage.jsonfile from the copied template within the new project directory. - It then updates the
nameproperty in thispackage.jsonto match the project name provided by the user.
- The
- Directory Setup:
- Dependency Installation (
src/index.ts):- The script uses Node.js's
child_process.spawnto executenpm install(ornpm.cmdon Windows) within the new project directory. - The output of
npm installis streamed to the user's console (stdio: "inherit") so they can see the installation progress. - Error handling is in place to report if
npm installfails.
- The script uses Node.js's
- Completion:
- Once dependencies are installed, a success message is displayed along with instructions on how to
cdinto the new project directory and typically how to start a development server or run the agent.
- Once dependencies are installed, a success message is displayed along with instructions on how to
Contributing
Contributions are welcome! If you have ideas for new templates, features, or improvements, please feel free to:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes.
- Submit a pull request.
Please report any bugs or issues by creating an issue on the GitHub repository.
License
This project is licensed under the Apache License. See the LICENSE file for details.