-
.taskmaster/config.jsonFile (Recommended - New Structure)- This JSON file stores most configuration settings, including AI model selections, parameters, logging levels, and project defaults.
- Location: This file is created in the
.taskmaster/directory when you run thetask-master models --setupinteractive setup or initialize a new project withtask-master init. - Migration: Existing projects with
.taskmasterconfigin the root will continue to work, but should be migrated to the new structure usingtask-master migrate. - Management: Use the
task-master models --setupcommand (ormodelsMCP tool) to interactively create and manage this file. You can also set specific models directly usingtask-master models --set-<role>=<model_id>, adding--ollamaor--openrouterflags for custom models. Manual editing is possible but not recommended unless you understand the structure. - Example Structure:
-
Legacy
.taskmasterconfigFile (Backward Compatibility)- For projects that haven’t migrated to the new structure yet.
- Location: Project root directory.
- Migration: Use
task-master migrateto move this to.taskmaster/config.json. - Deprecation: While still supported, you’ll see warnings encouraging migration to the new structure.
Environment Variables (.env file or MCP env block - For API Keys Only)
- Used exclusively for sensitive API keys and specific endpoint URLs.
- Location:
- For CLI usage: Create a
.envfile in your project root. - For MCP/Cursor usage: Configure keys in the
envsection of your.cursor/mcp.jsonfile.
- For CLI usage: Create a
- Required API Keys (Depending on configured providers):
ANTHROPIC_API_KEY: Your Anthropic API key.PERPLEXITY_API_KEY: Your Perplexity API key.OPENAI_API_KEY: Your OpenAI API key.GOOGLE_API_KEY: Your Google API key (also used for Vertex AI provider).MISTRAL_API_KEY: Your Mistral API key.AZURE_OPENAI_API_KEY: Your Azure OpenAI API key (also requiresAZURE_OPENAI_ENDPOINT).OPENROUTER_API_KEY: Your OpenRouter API key.XAI_API_KEY: Your X-AI API key.
- Optional Endpoint Overrides:
- Per-role
baseURLin.taskmasterconfig: You can add abaseURLproperty to any model role (main,research,fallback) to override the default API endpoint for that provider. If omitted, the provider’s standard endpoint is used. - Environment Variable Overrides (
<PROVIDER>_BASE_URL): For greater flexibility, especially with third-party services, you can set an environment variable likeOPENAI_BASE_URLorMISTRAL_BASE_URL. This will override anybaseURLset in the configuration file for that provider. This is the recommended way to connect to OpenAI-compatible APIs. AZURE_OPENAI_ENDPOINT: Required if using Azure OpenAI key (can also be set asbaseURLfor the Azure model role).OLLAMA_BASE_URL: Override the default Ollama API URL (Default:http://localhost:11434/api).VERTEX_PROJECT_ID: Your Google Cloud project ID for Vertex AI. Required when using the ‘vertex’ provider.VERTEX_LOCATION: Google Cloud region for Vertex AI (e.g., ‘us-central1’). Default is ‘us-central1’.GOOGLE_APPLICATION_CREDENTIALS: Path to service account credentials JSON file for Google Cloud auth (alternative to API key for Vertex AI).
- Per-role
- Optional Auto-Update Control:
TASKMASTER_SKIP_AUTO_UPDATE: Set to ‘1’ to disable automatic updates. Also automatically disabled in CI environments (whenCIenvironment variable is set).
main, research, fallback), maxTokens, temperature, logLevel, defaultSubtasks, defaultPriority, and projectName are managed in .taskmaster/config.json (or .taskmasterconfig for unmigrated projects), not environment variables.
Tagged Task Lists Configuration (v0.17+)
Taskmaster includes a tagged task lists system for multi-context task management.Global Tag Settings
defaultTag(string): Default tag context for new operations (default: “master”)
Git Integration
Task Master provides manual git integration through the--from-branch option:
- Manual Tag Creation: Use
task-master add-tag --from-branchto create a tag based on your current git branch name - User Control: No automatic tag switching - you control when and how tags are created
- Flexible Workflow: Supports any git workflow without imposing rigid branch-tag mappings
State Management File
Taskmaster uses.taskmaster/state.json to track tagged system runtime information:
currentTag: Currently active tag contextlastSwitched: Timestamp of last tag switchmigrationNoticeShown: Whether migration notice has been displayed
Example .env File (for API Keys)
Troubleshooting
Configuration Errors
- If Task Master reports errors about missing configuration or cannot find the config file, run
task-master models --setupin your project root to create or repair the file. - For new projects, config will be created at
.taskmaster/config.json. For legacy projects, you may want to usetask-master migrateto move to the new structure. - Ensure API keys are correctly placed in your
.envfile (for CLI) or.cursor/mcp.json(for MCP) and are valid for the providers selected in your config file.
If task-master init doesn’t respond:
Try running it with Node directly:
Provider-Specific Configuration
Google Vertex AI Configuration
Google Vertex AI is Google Cloud’s enterprise AI platform and requires specific configuration:-
Prerequisites:
- A Google Cloud account with Vertex AI API enabled
- Either a Google API key with Vertex AI permissions OR a service account with appropriate roles
- A Google Cloud project ID
-
Authentication Options:
- API Key: Set the
GOOGLE_API_KEYenvironment variable - Service Account: Set
GOOGLE_APPLICATION_CREDENTIALSto point to your service account JSON file
- API Key: Set the
-
Required Configuration:
- Set
VERTEX_PROJECT_IDto your Google Cloud project ID - Set
VERTEX_LOCATIONto your preferred Google Cloud region (default: us-central1)
- Set
-
Example Setup:
Or using service account:
-
In .taskmaster/config.json:
Azure OpenAI Configuration
Azure OpenAI provides enterprise-grade OpenAI models through Microsoft’s Azure cloud platform and requires specific configuration:-
Prerequisites:
- An Azure account with an active subscription
- Azure OpenAI service resource created in the Azure portal
- Azure OpenAI API key and endpoint URL
- Deployed models (e.g., gpt-4o, gpt-4o-mini, gpt-4.1, etc) in your Azure OpenAI resource
-
Authentication:
- Set the
AZURE_OPENAI_API_KEYenvironment variable with your Azure OpenAI API key - Configure the endpoint URL using one of the methods below
- Set the
-
Configuration Options:
Option 1: Using Global Azure Base URL (affects all Azure models)
Option 2: Using Per-Model Base URLs (recommended for flexibility)
-
Environment Variables:
-
Important Notes:
- Model Deployment Names: The
modelIdin your configuration should match the deployment name you created in Azure OpenAI Studio, not the underlying model name - Base URL Priority: Per-model
baseURLsettings override the globalazureBaseURLsetting - Endpoint Format: When using per-model
baseURL, use the full path including/openai/deployments
- Model Deployment Names: The
-
Troubleshooting:
“Resource not found” errors:
- Ensure your
baseURLincludes the full path:https://your-resource-name.openai.azure.com/openai/deployments - Verify that your deployment name in
modelIdexactly matches what’s configured in Azure OpenAI Studio - Check that your Azure OpenAI resource is in the correct region and properly deployed
- Verify your
AZURE_OPENAI_API_KEYis correct and has not expired - Ensure your Azure OpenAI resource has the necessary permissions
- Check that your subscription has not been suspended or reached quota limits
- Confirm the model is deployed in your Azure OpenAI resource
- Verify the deployment name matches your configuration exactly (case-sensitive)
- Ensure the model deployment is in a “Succeeded” state in Azure OpenAI Studio
- Ensure youre not getting rate limited by
maxTokensmaintain appropriate Tokens per Minute Rate Limit (TPM) in your deployment.
- Ensure your
