
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
@factorialco/shadowdog
Advanced tools
Shadowdog is a Node.js package for generating artifacts as derivative processes of files in your project. Whether you need to generate static assets, precompiled resources, or any other transformations, Shadowdog makes it easy and powerful with its supercharged feature set.
Install Shadowdog via npm:
npm install shadowdog --save-dev
Shadowdog uses a configuration file (shadowdog.json) to define workflows for generating artifacts. Here’s an example:
{
"$schema": "https://raw.githubusercontent.com/factorialco/shadowdog/refs/heads/main/schema.json",
"plugins": [],
"watchers": [
{
"files": ["example.txt"],
"commands": [
{
"artifacts": [
{
"output": "example.output.txt"
}
],
"command": "cp example.txt example.output.txt"
}
]
}
]
}
$schema: Provides schema validation for the configuration.plugins: An array of plugin names to extend Shadowdog's functionality.watchers: Defines file watchers that trigger artifact generation commands.
files: An array of file paths or glob patterns to watch.commands: Commands to execute when changes are detected.
artifacts: Specifies the output files generated by the command.command: The shell command to run.Shadowdog provides a variety of commands to simplify your workflows:
npx shadowdog
npx shadowdog --watch
Enhance Shadowdog with these powerful plugins:
shadowdog-local-cache
Implements a local caching mechanism to speed up repeated artifact generation.
Environment variables:
SHADOWDOG_DISABLE_LOCAL_CACHE: When true, disables local cache completelySHADOWDOG_LOCAL_CACHE_READ: When set, overrides the plugin's read cache configuration (true/false)SHADOWDOG_LOCAL_CACHE_WRITE: When set, overrides the plugin's write cache configuration (true/false)SHADOWDOG_LOCAL_CACHE_PATH: When set, overrides the plugin's cache directory pathshadowdog-remote-aws-s3-cache
Enables remote caching with AWS S3 for distributed workflows.
Environment variables:
SHADOWDOG_DISABLE_REMOTE_CACHE: When true, disables remote cache completelySHADOWDOG_REMOTE_CACHE_READ: When set, overrides the plugin's read cache configuration (true/false)SHADOWDOG_REMOTE_CACHE_WRITE: When set, overrides the plugin's write cache configuration (true/false)SHADOWDOG_REMOTE_CACHE_EXTRA: When set, adds extra information to the cache key in S3AWS_PROFILE: AWS profile to use for authentication (optional)AWS_ACCESS_KEY_ID: AWS access key ID (required if AWS_PROFILE not set)AWS_SECRET_ACCESS_KEY: AWS secret access key (required if AWS_PROFILE not set)AWS_REGION: AWS region (required if AWS_PROFILE not set)shadowdog-tag
Adds tagging capabilities to filter specific commands.
Environment variables:
SHADOWDOG_TAG: When set, only runs commands with matching tagshadowdog-lock
Generates a shadowdog-lock.json file that tracks artifact metadata and dependencies for reproducible builds.
The lock file includes:
Features:
src/*.ts automaticallyshadowdog-git
Handles git rebases and merges smoothly pausing the watcher and resuming it after the rebase is done.
Internal configuration:
.git/rebase-merge to detect rebase stateshadowdog-socket
Provides an external communication channel for interacting with Shadowdog.
No configurable environment variables. Uses socket events:
CHANGED_FILE: Emitted when a file changesERROR: Emitted on errorsINITIALIZED: Emitted on startupCLEAR: Emitted on cleanupshadowdog-tree
Generate a dependency tree structure between commands to run different commands that depend on each other.
No configurable environment variables. Uses internal dependency graph algorithm.
shadowdog-rake
Optimize multiple bundle exec rake commands into a single command.
No configurable environment variables. Automatically detects and combines rake tasks.
shadowdog-mcp
Provides a Model Context Protocol (MCP) server for external tools (like Cursor AI) to interact with Shadowdog programmatically.
Environment variables:
SHADOWDOG_MCP_PORT: HTTP port for MCP server (default: 8473)SHADOWDOG_MCP_HOST: HTTP host for MCP server (default: localhost)Available MCP Tools:
pause-shadowdog: Pauses shadowdog in watch mode to prevent artifact generation during code changes (properly integrated with daemon)resume-shadowdog: Resumes shadowdog after being paused (properly integrated with daemon)get-artifacts: Retrieves information about all artifacts, including status, last update time, and associated filescompute-artifact: Generates a specific artifact using the same task runner and middleware as the daemonget-shadowdog-status: Gets the current status of shadowdog including daemon availability and configuration summaryConnection: HTTP endpoint at http://localhost:8473/mcp (configurable via environment variables)
Cursor Integration: To connect with Cursor, add this to your MCP configuration:
{
"mcpServers": {
"shadowdog": {
"url": "http://localhost:8473/mcp"
}
}
}
For detailed Cursor MCP setup instructions, see: Cursor MCP Installation Guide
To use a plugin, add it to the plugins section of your shadowdog.json configuration file. For example:
Update your configuration:
{
...
"plugins": [
{
"name": "shadowdog-local-cache",
},
{
"name" : "shadowdog-tree"
}
]
...
}
Take into account that the order of plugins is important. The plugins will be executed in the order they are defined in the configuration file.
Shadowdog includes a built-in Model Context Protocol (MCP) server that allows AI tools like Cursor to interact with your build system programmatically. The MCP server starts automatically when you run Shadowdog in watch mode.
Add the MCP plugin to your configuration:
{
"plugins": [
{
"name": "shadowdog-mcp"
}
]
}
Start in watch mode (MCP server starts automatically):
npx shadowdog --watch
Configure Cursor: Add this to your Cursor MCP configuration:
{
"mcpServers": {
"shadowdog": {
"url": "http://localhost:8473/mcp"
}
}
}
Once connected, you can use these tools in Cursor:
pause-shadowdog - Pause artifact generation during code changes (properly integrated with daemon)resume-shadowdog - Resume artifact generation after changes (properly integrated with daemon)get-artifacts - Query artifact status and informationcompute-artifact - Generate specific artifacts on demand using the same task runner as the daemonget-shadowdog-status - Check shadowdog's current state and daemon availabilitySHADOWDOG_MCP_PORT=9000 to use a different portSHADOWDOG_MCP_HOST=0.0.0.0 to allow external connectionsFor detailed Cursor MCP setup instructions, see: Cursor MCP Installation Guide
Shadowdog uses a sophisticated caching system to determine when artifacts need to be regenerated. Understanding how cache keys are computed is crucial for optimizing your workflows.
Cache identifiers are generated using the computeCache function, which creates deterministic hashes based on:
src/*.ts are expanded before hashingShadowdog is open source and available under the MIT License.
If you encounter any issues, have questions, or want to suggest features, please open an issue or join the discussions.
Enjoy artifact generation, supercharged! 🐾
FAQs
Unknown package
The npm package @factorialco/shadowdog receives a total of 70 weekly downloads. As such, @factorialco/shadowdog popularity was classified as not popular.
We found that @factorialco/shadowdog demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers 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
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.