
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
create-sparc
Advanced tools
Transform your development workflow with SPARC methodology, AI-driven code generation, and AI-powered assistance
create-sparc
is a powerful agentic toolkit that changes how you build software by integrating the structured SPARC methodology, AI-driven code generation (AIGI), and advanced AI assistance through Roo Code and Model Context Protocol (MCP) capabilities. This comprehensive platform enables AI agents to securely connect with external services like databases, APIs, and cloud resources, allowing developers to create modular, secure, and maintainable applications with unprecedented efficiency while seamlessly bridging the gap between AI and real-world systems.
You don't need to install this package directly. Use npx to run it:
npx create-sparc init
The SPARC methodology (Specification, Pseudocode, Architecture, Refinement, Completion) breaks down complex development tasks into manageable phases, each handled by specialized AI assistants. This approach ensures:
To fully leverage the SPARC methodology, you'll need the Roo Code extension for Visual Studio Code. This powerful extension provides:
You can install the Roo Code extension from the VS Code Marketplace.
MCP (Model-Context Protocol) is a powerful bridge between your applications and external services that enables AI-assisted interactions with databases, APIs, and cloud resources. With MCP integration in create-sparc, you can:
MCP allows your AI assistants to directly interact with external services like Supabase, OpenAI, GitHub, AWS, and Firebase through a standardized protocol. This means your Roo Code assistant can:
MCP prioritizes security through:
The MCP Wizard makes setup simple:
You can create a new project in two ways:
# Create a full project with a specific name
npx create-sparc init my-project
# Create only .roo and .roomodes files in the current directory
npx create-sparc init
You can also use the shorthand version:
npx create-sparc my-project
If you want to create a project focused on AI-driven code generation with specialized components:
# Create a new AIGI project with a specific name
npx create-sparc aigi init my-project
# Initialize AIGI files in the current directory
npx create-sparc aigi init
The AIGI project provides specialized components for prompt engineering, code quality assessment, and iterative refinement of AI-generated code.
If you want to create a lightweight framework for custom Roo modes without the full SPARC structure:
# Create a new minimal Roo mode framework with a specific name
npx create-sparc minimal init my-project
# Initialize minimal Roo mode files in the current directory
npx create-sparc minimal init
The minimal Roo mode framework provides just the essential files and structure needed to get started with Roo mode development, making it ideal for developers who want to create their own custom modes.
If you're running the CLI directly with Node (instead of using npx), use the following format:
# When running with Node directly
node bin/index.js init my-project
node bin/index.js aigi init my-project
node bin/index.js minimal init my-project
# IMPORTANT: Do not include 'create-sparc' in the command when running with Node
# Incorrect: node bin/index.js create-sparc init
# Correct: node bin/index.js init
The create-sparc
prefix is only used when running through npx, as it's the package name.
Options for init command:
--template <name>
- Template to use (default: "default")--skip-install
- Skip dependency installation--use-npm
- Use npm as package manager--use-yarn
- Use yarn as package manager--use-pnpm
- Use pnpm as package manager--no-git
- Skip git initialization--typescript
- Use TypeScript--no-symlink
- Disable symlink creationOptions for aigi command:
-f, --force
- Allow initialization in non-empty directories--skip-install
- Skip dependency installation--use-npm
- Use npm as package manager--use-yarn
- Use yarn as package manager--use-pnpm
- Use pnpm as package manager--no-git
- Skip git initialization--typescript
- Use TypeScript--no-symlink
- Disable symlink creationOptions for minimal command:
-f, --force
- Allow initialization in non-empty directories--skip-install
- Skip dependency installation--use-npm
- Use npm as package manager--use-yarn
- Use yarn as package manager--use-pnpm
- Use pnpm as package manager--no-git
- Skip git initialization--typescript
- Use TypeScript--no-symlink
- Disable symlink creationIf you want to add SPARC methodology to an existing project, you can run:
# Navigate to your project directory
cd my-existing-project
# Initialize SPARC files (.roo and .roomodes) without creating project structure
npx create-sparc init
# Or if running with Node directly
node path/to/bin/index.js init
This will only create the necessary SPARC files in your current directory without modifying your existing project structure.
npx create-sparc add component --name MyComponent
Options:
--name <name>
- Component name--type <type>
- Component type (default: "component")--path <path>
- Custom path for componentnpx create-sparc help
To get help for a specific command:
# Get help for the init command
npx create-sparc help init
# Get help for the minimal command
npx create-sparc help minimal
# Get help for the aigi command
npx create-sparc help aigi
SPARC stands for:
This methodology provides a structured approach to software development, ensuring high-quality, maintainable code. SPARC enables you to deconstruct large, intricate projects into manageable subtasks, each delegated to a specialized mode.
The SPARC methodology is fully integrated with Roo Code through the Boomerang task concept. This integration empowers you to build complex, production-ready, secure, and scalable applications by leveraging specialized AI assistants for different phases of development.
By using advanced reasoning models such as Claude 3.7 Sonnet, GPT-4o, and DeepSeek for analytical tasks, alongside instructive models for coding, DevOps, testing, and implementation, you create a robust, automated, and secure workflow.
When you initialize a project with npx create-sparc init
, the following specialized modes become available in your Roo Code environment:
Each mode operates within its own isolated context, ensuring focused and efficient task management while adhering to best practicesβavoiding hard-coded environment variables, maintaining files under 500 lines, and ensuring a modular, extensible design.
The MCP (Model Context Protocol) Wizard is a powerful feature that simplifies the configuration and management of external service integrations in your SPARC projects.
The MCP Wizard is a configuration system that enables seamless integration between your SPARC projects and external services like databases, AI models, cloud providers, and more. It provides:
The MCP Configuration Wizard consists of the following components:
The MCP Wizard manages two main configuration files:
MCP Configuration File (.roo/mcp.json
): Contains server configurations, including command, arguments, and permission scopes.
Roomodes File (.roomodes
): Contains roomode definitions for MCP servers, enabling AI assistants to interact with the servers.
Example MCP configuration:
{
"mcpServers": {
"supabase": {
"command": "npx",
"args": [
"-y",
"@supabase/mcp-server-supabase@latest",
"--access-token",
"${env:SUPABASE_ACCESS_TOKEN}"
],
"alwaysAllow": [
"list_tables",
"execute_sql"
]
}
}
}
The MCP.json file follows this schema:
{
"mcpServers": {
"[server-id]": {
"command": "string",
"args": ["string"],
"alwaysAllow": ["string"],
"env": {
"ENV_VAR": "value"
}
}
}
}
MCP integration roomodes follow this structure:
{
"slug": "mcp-[server-id]",
"name": "Server Name Integration",
"model": "claude-3-7-sonnet-20250219",
"roleDefinition": "You are a specialized assistant...",
"customInstructions": "Server-specific instructions...",
"groups": ["read", "edit", "mcp"],
"source": "project"
}
You can configure MCP servers using the interactive wizard:
npx create-sparc configure-mcp
This will guide you through the process of:
npx create-sparc configure-mcp
npx create-sparc configure-mcp
npx create-sparc configure-mcp
The MCP Wizard provides several command-line options:
# Start the interactive wizard
npx create-sparc configure-mcp
# List configured MCP servers
npx create-sparc configure-mcp --list
# Discover available MCP servers
npx create-sparc configure-mcp --discover
# Add a specific MCP server
npx create-sparc configure-mcp --add <server-id>
# Update a configured MCP server
npx create-sparc configure-mcp --update <server-id>
# Remove a configured MCP server
npx create-sparc configure-mcp --remove <server-id>
# Validate current MCP configuration
npx create-sparc configure-mcp --validate
# Create a backup of current configuration
npx create-sparc configure-mcp --backup
# Perform security audit on MCP configuration
npx create-sparc configure-mcp --security-audit
# Automatically fix security issues
npx create-sparc configure-mcp --security-audit --auto-fix
# Validate environment variable references
npx create-sparc configure-mcp --validate-env
For more advanced use cases, you can customize the MCP configuration:
# Use a custom registry URL
npx create-sparc configure-mcp --registry https://your-custom-registry.com/api
# Specify custom paths for configuration files
npx create-sparc configure-mcp --config-path custom/path/mcp.json --roomodes-path custom/path/roomodes
# Run in non-interactive mode (for CI/CD pipelines)
npx create-sparc configure-mcp --add supabase --no-interactive
The MCP Wizard includes comprehensive security features:
Secure Credential Management
Permission Scoping
Security Auditing
Configuration Protection
Warning System
The MCP Wizard integrates with the MCP Registry API to discover and retrieve information about available MCP servers. The Registry Client provides:
Available MCP servers include:
supabase
- Supabase database serveropenai
- OpenAI AI operations servergithub
- GitHub repository operations serveraws
- AWS cloud operations serverfirebase
- Firebase app development serverEach server includes:
For testing purposes, a mock implementation of the Registry Client is available, which simulates all Registry API endpoints without requiring an actual registry server.
Version Control: Add .roo/mcp.json
to version control but exclude any files containing actual secrets.
Environment Variables: Use a .env
file for local development (added to .gitignore
) and proper environment variable management for production.
Regular Updates: Periodically check for updates to MCP servers and update your configurations.
Permission Auditing: Regularly review the permissions granted to each server and remove any that are no longer needed.
Documentation: Document the MCP servers used in your project and their configuration requirements for team members.
Secure Storage of Environment Variables:
.env
files (but don't commit them to version control)Follow the principle of least privilege: Grant only the permissions that are necessary
Use specific package versions: Avoid using "latest" to prevent supply chain attacks
When you run npx create-sparc init
without a project name, it creates two essential SPARC files:
The .roo
directory contains configuration files, rules, and templates that define how the SPARC methodology is applied to your project. It includes:
The .roomodes
file defines the different modes that can be used with the SPARC methodology in your project. These modes help structure the development process according to the SPARC phases (Specification, Pseudocode, Architecture, Refinement, Completion).
These files are essential for using the SPARC methodology in your project and provide the foundation for structured, efficient development.
The AIGI framework provides specialized components for AI-driven code generation, focusing on prompt engineering, code quality assessment, and iterative refinement. This framework is designed for developers who want to leverage AI to generate high-quality code with sophisticated prompt engineering and evaluation.
The AIGI framework includes specialized components for AI-driven code generation:
.roo/ # Configuration and rules
βββ README.md # Overview and usage instructions
βββ code/ # Code generation rules
βββ critic/ # Code quality assessment
βββ final-assembly/ # Integration of generated components
βββ mcp/ # MCP server configuration
βββ memory-manager/ # Context preservation
βββ orchestrator/ # Workflow coordination
βββ prompt-generator/ # Prompt engineering
βββ reflection/ # Iterative improvement
βββ rules/ # General rules
βββ scorer/ # Quality scoring
βββ tdd/ # Test-driven development
.roomodes # Custom mode definitions
You can create a new AIGI framework using the following command:
# Create a new AIGI framework with a specific name
npx create-sparc aigi init my-project
# Initialize AIGI files in the current directory
npx create-sparc aigi init
Consider using the AIGI framework when:
The minimal Roo mode framework provides a lightweight foundation for creating custom Roo modes without the full SPARC project structure. This is ideal for developers who want to focus specifically on creating and customizing Roo modes.
The minimal framework includes only the essential files and structure needed to get started with Roo mode development:
.roo/ # Configuration and rules
βββ README.md # Overview and usage instructions
βββ mcp.json # MCP server configuration
βββ rules/ # General rules
β βββ general_guidelines.md
β βββ tool_usage_guidelines.md
β βββ orchestration_template.md
βββ rules-code/ # Code-specific rules
βββ code_guidelines.md
.roomodes # Custom mode definitions
You can create a new minimal Roo mode framework using the following command:
# Create a new minimal Roo mode framework with a specific name
npx create-sparc minimal init my-project
# Initialize minimal Roo mode files in the current directory
npx create-sparc minimal init
The minimal framework is designed to be easily extended:
.roomodes
file to add custom modes with specific roles and capabilities.roo/mcp.json
file to connect to external servicesConsider using the minimal framework when:
npx create-sparc init
in your project directorynpx create-sparc aigi init
in your project directorynpx create-sparc minimal init
in your project directory.roomodes
file in your project root can override global settings for your specific project needs.Here's a quick example of how to use SPARC methodology with Roo Code for a new project:
Initialize a new SPARC project:
mkdir my-sparc-project
cd my-sparc-project
npx create-sparc init
Open the project in VS Code with Roo Code extension installed
Start with the SPARC Orchestrator mode:
Follow the guided workflow:
Review and integrate the results:
Here's how to use the AIGI framework for AI-driven code generation:
Initialize a new AIGI project:
mkdir my-aigi-project
cd my-aigi-project
npx create-sparc aigi init
Open the project in VS Code with Roo Code extension installed
Start with the AIGI Orchestrator mode:
Follow the AIGI workflow:
Review and refine the results:
Here's how to create and use a minimal Roo mode framework:
Initialize a new minimal framework:
mkdir my-minimal-project
cd my-minimal-project
npx create-sparc minimal init
Open the project in VS Code with Roo Code extension installed
Customize your modes:
.roomodes
file to define your custom modes.roo/rules
directory.roo/mcp.json
Use your custom modes:
These workflows dramatically reduce development time while ensuring high-quality, maintainable code tailored to your specific needs.
Contributions to create-sparc
are welcome! Whether you're fixing bugs, improving documentation, or proposing new features, your help is appreciated.
git checkout -b feature/amazing-feature
)git commit -m 'Add some amazing feature'
)git push origin feature/amazing-feature
)MIT
Created by Reuven Cohen - Agentic Engineer / aiCTO / Vibe Coach
For questions or support, please open an issue on the GitHub repository.
FAQs
NPX package to scaffold new projects with SPARC methodology structure
The npm package create-sparc receives a total of 46 weekly downloads. As such, create-sparc popularity was classified as not popular.
We found that create-sparc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.