### Example rulesync.jsonc for gh mode Source: https://rulesync.dyoshikawa.com/guide/declarative-sources.html This configuration demonstrates how to specify sources, skills, agents, and scopes for the `gh` installation mode. It shows how to deploy the same source to different agents and scopes. ```jsonc { "targets": ["claudecode"], "features": ["rules"], "sources": [ // Default: agent=github-copilot, scope=project -> .agents/skills/git-commit/ { "source": "acme/skills", "skills": ["git-commit"] }, // Same source, deployed for Claude Code at user scope -> ~/.claude/skills/git-commit/ { "source": "acme/skills", "skills": ["git-commit"], "agent": "claude-code", "scope": "user", }, ], } ``` -------------------------------- ### Install Skills with Rulesync CLI Source: https://rulesync.dyoshikawa.com/guide/declarative-sources.html Demonstrates various ways to install skills using the rulesync CLI, including default installation, forcing updates, and strict CI modes. ```bash # Install skills using locked refs rulesync install # Force update to latest refs rulesync install --update # Strict CI mode — fail if lockfile doesn't cover all sources (missing locked skills are fetched) rulesync install --frozen # Install then generate rulesync install && rulesync generate # Skip source installation — just don't run install rulesync generate ``` -------------------------------- ### Install Rulesync with npm Source: https://rulesync.dyoshikawa.com/getting-started/installation.html Install the Rulesync CLI globally using npm. After installation, you can run `rulesync --version` or `rulesync --help`. ```bash npm install -g rulesync # And then rulesync --version rulesync --help ``` -------------------------------- ### Install Official Skill using Fetch Source: https://rulesync.dyoshikawa.com/guide/official-skills.html Use the 'rulesync fetch' command for a one-time installation of an official skill. This command downloads and installs the specified skill and its features. ```bash rulesync fetch dyoshikawa/rulesync --features skills ``` -------------------------------- ### Manual Install Rulesync (Linux x64) Source: https://rulesync.dyoshikawa.com/getting-started/installation.html Manually install the Rulesync binary for Linux x64 by downloading it, making it executable, and moving it to /usr/local/bin. ```bash curl -L https://github.com/dyoshikawa/rulesync/releases/latest/download/rulesync-linux-x64 -o rulesync && \ chmod +x rulesync && \ sudo mv rulesync /usr/local/bin/ ``` -------------------------------- ### Manual Install Rulesync (Linux ARM64) Source: https://rulesync.dyoshikawa.com/getting-started/installation.html Manually install the Rulesync binary for Linux ARM64 by downloading it, making it executable, and moving it to /usr/local/bin. ```bash curl -L https://github.com/dyoshikawa/rulesync/releases/latest/download/rulesync-linux-arm64 -o rulesync && \ chmod +x rulesync && \ sudo mv rulesync /usr/local/bin/ ``` -------------------------------- ### Install Rulesync to Custom Directory Source: https://rulesync.dyoshikawa.com/getting-started/installation.html Install Rulesync to a custom directory by setting the RULESYNC_HOME environment variable before running the install script. ```bash RULESYNC_HOME=~/.local curl -fsSL https://github.com/dyoshikawa/rulesync/releases/latest/download/install.sh | bash ``` -------------------------------- ### Install Specific Rulesync Version Source: https://rulesync.dyoshikawa.com/getting-started/installation.html Install a specific version of Rulesync using the quick install script by specifying the version number. ```bash curl -fsSL https://github.com/dyoshikawa/rulesync/releases/latest/download/install.sh | bash -s -- v6.4.0 ``` -------------------------------- ### Start Rulesync MCP Server Source: https://rulesync.dyoshikawa.com/reference/mcp-server.html Starts an MCP server using stdio transport for AI agent communication. ```bash rulesync mcp ``` -------------------------------- ### Install Rulesync with Homebrew Source: https://rulesync.dyoshikawa.com/getting-started/installation.html Tap the Rulesync Homebrew repository and install the rulesync package. This installs a prebuilt binary for macOS and Linux. ```bash brew tap dyoshikawa/rulesync https://github.com/dyoshikawa/rulesync brew install rulesync # And then rulesync --version ``` -------------------------------- ### Manual Install Rulesync (Windows x64 with curl) Source: https://rulesync.dyoshikawa.com/getting-started/installation.html Manually install the Rulesync binary for Windows x64 using curl, if available, by downloading it and moving it to a specified bin path. ```bash curl -L https://github.com/dyoshikawa/rulesync/releases/latest/download/rulesync-windows-x64.exe -o rulesync.exe && \ mv rulesync.exe /path/to/your/bin/ ``` -------------------------------- ### Initialize New Rulesync Project Source: https://rulesync.dyoshikawa.com/getting-started/quick-start.html Installs rulesync globally, creates project directories, sample rules, and configuration files. It also fetches recommended official skills. ```bash npm install -g rulesync rulesync init rulesync fetch dyoshikawa/rulesync --features skills ``` -------------------------------- ### Initialize New Project Source: https://rulesync.dyoshikawa.com/reference/cli-commands.html Use this command to initialize a new Rulesync project, setting up an organized rules structure. This is the recommended starting point for new projects. ```bash rulesync init ``` -------------------------------- ### Prompt Examples for Simulated Features Source: https://rulesync.dyoshikawa.com/guide/simulated-features.html Examples of how to use simulated commands, subagents, and skills in prompts. The `s/` prefix is used as a shorthand for `simulate/` when executing simulated commands. ```txt # Execute simulated commands. By the way, `s/` stands for `simulate/`. s/your-command # Execute simulated subagents Call your-subagent to achieve something. # Use simulated skills Use the skill your-skill to achieve something. ``` -------------------------------- ### Manual Install Rulesync (Windows x64) Source: https://rulesync.dyoshikawa.com/getting-started/installation.html Manually install the Rulesync binary for Windows x64 by downloading the executable and moving it to the system32 directory. ```powershell Invoke-WebRequest -Uri "https://github.com/dyoshikawa/rulesync/releases/latest/download/rulesync-windows-x64.exe" -OutFile "rulesync.exe"; \ Move-Item rulesync.exe C:\Windows\System32\ ``` -------------------------------- ### Comprehensive Rulesync Configuration Options Source: https://rulesync.dyoshikawa.com/guide/configuration.html A detailed `rulesync.jsonc` example demonstrating all available configuration options, including targets, features, output roots, deletion, verbosity, and advanced settings. ```jsonc // rulesync.jsonc { "$schema": "https://github.com/dyoshikawa/rulesync/releases/latest/download/config-schema.json", // List of tools to generate configurations for. You can specify "*" to generate all tools. "targets": ["cursor", "claudecode", "opencode", "codexcli"], // Features to generate. You can specify "*" to generate all features. "features": ["rules", "ignore", "mcp", "commands", "subagents", "hooks"], // Output root directories to generate files into. // Basically, you can specify `["."]` only. // However, for example, if your project is a monorepo and you have to launch the AI agent at each package directory, you can specify multiple output roots. "outputRoots": [""], // Delete existing files before generating "delete": true, // Verbose output "verbose": false, // Silent mode - suppress all output (except errors) "silent": false, // Advanced options "global": false, // Generate for global(user scope) configuration files "simulateCommands": false, // Generate simulated commands "simulateSubagents": false, // Generate simulated subagents "simulateSkills": false, // Generate simulated skills // Naming for command files flattened for tools without subdirectory // command support (e.g. Cursor): "basename" (default) keeps only the // filename, so `pj/test.md` and `ops/test.md` collide and the last one // wins; "path" joins the directory segments into the filename // (`pj/test.md` -> `pj-test.md`), which reduces collisions but cannot // rule them out (a literal `pj-test.md` also maps to `pj-test.md`); the // collision warning still applies. // Tools that support subdirectories (e.g. Claude Code) are unaffected. // Note: switching from "basename" to "path" renames the generated files // (e.g. `test.md` -> `pj-test.md`); run `rulesync generate` with // `delete: true` (or `--delete`) once after switching, otherwise the // stale old flat-named files remain alongside the new ones. "flattenedCommandNaming": "basename", // When true (default), `rulesync gitignore` only emits entries for the // tools listed in `targets`. Set to false to emit entries for all supported // tools regardless of `targets`. // // Note: Entries for `agentsmd` (AGENTS.md and related paths) are always // appended even when `gitignoreTargetsOnly` is true and `agentsmd` is // absent from `targets`. AGENTS.md is a de facto standard read by many AI // tools regardless of the target set, so its gitignore entries are emitted // unconditionally to prevent accidental commits of generated rule files. "gitignoreTargetsOnly": true, // Declarative skill sources — installed via 'rulesync install' // See the "Declarative Skill Sources" section for details. // "sources": [ // { "source": "owner/repo" }, // { "source": "org/repo", "skills": ["specific-skill"] }, // ], } ``` -------------------------------- ### Quick Install Rulesync (Linux/macOS) Source: https://rulesync.dyoshikawa.com/getting-started/installation.html Download and install the Rulesync single binary for Linux or macOS without requiring sudo. This script uses Bun's single-file executable bundler. ```bash curl -fsSL https://github.com/dyoshikawa/rulesync/releases/latest/download/install.sh | bash ``` -------------------------------- ### Manual Install Rulesync (macOS Intel) Source: https://rulesync.dyoshikawa.com/getting-started/installation.html Manually install the Rulesync binary for macOS on Intel processors by downloading it, making it executable, and moving it to /usr/local/bin. ```bash curl -L https://github.com/dyoshikawa/rulesync/releases/latest/download/rulesync-darwin-x64 -o rulesync && \ chmod +x rulesync && \ sudo mv rulesync /usr/local/bin/ ``` -------------------------------- ### Install Skills and Dependencies Source: https://rulesync.dyoshikawa.com/reference/cli-commands.html Installs skills from declarative sources defined in `rulesync.jsonc`. Use `--update` to force re-resolution of all source references, ignoring the lockfile. Use `--frozen` to fail if the lockfile is missing or out of sync, fetching missing skills using locked references. ```bash rulesync install ``` ```bash rulesync install --update ``` ```bash rulesync install --frozen ``` ```bash rulesync install && rulesync generate ``` -------------------------------- ### Manual Install Rulesync (macOS Apple Silicon) Source: https://rulesync.dyoshikawa.com/getting-started/installation.html Manually install the Rulesync binary for macOS on Apple Silicon by downloading it, making it executable, and moving it to /usr/local/bin. ```bash curl -L https://github.com/dyoshikawa/rulesync/releases/latest/download/rulesync-darwin-arm64 -o rulesync && \ chmod +x rulesync && \ sudo mv rulesync /usr/local/bin/ ``` -------------------------------- ### Example Rulesync Ignore File Source: https://rulesync.dyoshikawa.com/reference/file-formats.html This is an example of a `.rulesync/.aiignore` or `.rulesyncignore` file. It specifies files and directories to be ignored by Rulesync. ```ignore tmp/ credentials/ ``` -------------------------------- ### Rulesync Lockfile Example Source: https://rulesync.dyoshikawa.com/guide/declarative-sources.html An example of the rulesync.lock file, which records resolved commit SHAs and integrity hashes for reproducible builds. ```json { "lockfileVersion": 1, "sources": { "owner/skill-repo": { "requestedRef": "main", "resolvedRef": "abc123def456...", "resolvedAt": "2025-01-15T12:00:00.000Z", "skills": { "my-skill": { "integrity": "sha256-abcdef..." }, "another-skill": { "integrity": "sha256-123456..." } } } } } ``` -------------------------------- ### MCP Server Configuration for Qwen Source: https://rulesync.dyoshikawa.com/reference/file-formats.html Example of MCP server configuration in `.qwen/settings.json` using stdio transport and environment variables for API keys. ```json { "mcpServers": { "pal": { "type": "stdio", "command": "uvx", "args": [ "--from", "git+https://github.com/BeehiveInnovations/pal-mcp-server.git", "pal-mcp-server" ], "envVars": ["OPENAI_API_KEY", "OPENROUTER_API_KEY", "GEMINI_API_KEY"] } } } ``` -------------------------------- ### Configure Declarative Skill Sources Source: https://rulesync.dyoshikawa.com/guide/declarative-sources.html Add a `sources` array to your `rulesync.jsonc` to declare external skill repositories. This allows `rulesync install` to fetch skills automatically. ```jsonc { "$schema": "https://github.com/dyoshikawa/rulesync/releases/latest/download/config-schema.json", "targets": ["copilot", "claudecode"], "features": ["rules", "skills"], "sources": [ // Fetch all skills from a GitHub repository (default transport) { "source": "owner/repo" }, // Fetch only specific skills by name { "source": "anthropics/skills", "skills": ["skill-creator"] }, // With ref pinning and subdirectory path (same syntax as fetch command) { "source": "owner/repo@v1.0.0:path/to/skills" }, // Git transport — works with any git remote (Azure DevOps, Bitbucket, etc.) { "source": "https://dev.azure.com/org/project/_git/repo", "transport": "git", "ref": "main", "path": "exports/skills", }, // Git transport with a local repository { "source": "file:///path/to/local/repo", "transport": "git" }, // Git transport against a single-skill repo whose SKILL.md is at the root { "source": "https://github.com/feature-sliced/skills", "transport": "git", "path": ".", }, // npm transport (EXPERIMENTAL) — fetch a package from an npm-compatible // registry (npmjs.org, JFrog Artifactory, Sonatype Nexus, Verdaccio, ...) { "source": "@acme/skill-package", "transport": "npm", "registry": "https://acme.jfrog.io/artifactory/api/npm/npm-local/", "tokenEnv": "ACME_REGISTRY_TOKEN", }, ], } ``` -------------------------------- ### Using Rulesync Programmatic API Functions Source: https://rulesync.dyoshikawa.com/api/programmatic-api.html Demonstrates the usage of generate, importFromTool, and convertFromTool functions from the Rulesync library. Includes examples for generating configurations, importing existing tool configurations, and converting configurations between AI tools. ```typescript import { convertFromTool, generate, importFromTool } from "rulesync"; // Generate configurations const result = await generate({ targets: ["claudecode", "cursor"], features: ["rules", "mcp"], }); console.log(`Generated ${result.rulesCount} rules, ${result.mcpCount} MCP configs`); // Import existing tool configurations into .rulesync/ const importResult = await importFromTool({ target: "claudecode", features: ["rules", "commands"], }); console.log(`Imported ${importResult.rulesCount} rules`); // Convert configurations between AI tools without writing intermediate .rulesync/ files try { const convertResult = await convertFromTool({ from: "claudecode", to: ["cursor", "copilot"], features: ["rules"], }); console.log(`Converted ${convertResult.rulesCount} rule file(s)`); } catch (error) { // Thrown when `from` is empty, `to` is empty, `to` includes `from`, // a source file cannot be parsed, or write fails. console.error("convert failed:", error); } ``` -------------------------------- ### Example Rulesync Hooks Configuration Source: https://rulesync.dyoshikawa.com/reference/file-formats.html This JSON configuration demonstrates how to set up various hooks for different lifecycle events and tools. It includes shared hooks and tool-specific overrides for Cursor, Claude Code, OpenCode, and Copilot. ```json { "version": 1, "hooks": { "sessionStart": [{ "type": "command", "command": ".rulesync/hooks/session-start.sh" }], "preToolUse": [{ "matcher": "Bash", "command": ".rulesync/hooks/confirm.sh" }], "postToolUse": [{ "matcher": "Write|Edit", "command": ".rulesync/hooks/format.sh" }], "stop": [{ "command": ".rulesync/hooks/audit.sh" }] }, "cursor": { "hooks": { "afterFileEdit": [{ "command": ".cursor/hooks/format.sh" }] } }, "claudecode": { "hooks": { "notification": [ { "matcher": "permission_prompt", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/notify.sh" } ] } }, "opencode": { "hooks": { "afterShellExecution": [{ "command": ".rulesync/hooks/post-shell.sh" }] } }, "copilot": { "hooks": { "afterError": [{ "command": ".rulesync/hooks/report-error.sh" }] } } } ``` -------------------------------- ### Subagent Configuration Example Source: https://rulesync.dyoshikawa.com/reference/file-formats.html Defines a subagent's behavior, including its name, targets, description, and specific parameters for different AI models and tools. Use this to configure custom agents. ```yaml --- name: planner # subagent name targets: ["*"] # * = all, or specific tools description: >- # subagent description This is the general-purpose planner. The user asks the agent to plan to suggest a specification, implement a new feature, refactor the codebase, or fix a bug. This agent can be called by the user explicitly only. claudecode: # for claudecode-specific parameters model: inherit # opus, sonnet, haiku, fable, a full model id, or inherit (default) tools: ["Read", "Write"] # (optional) allowed tools (string or list) disallowedTools: ["Bash"] # (optional) tools to remove (string or list) permissionMode: default # (optional) default | acceptEdits | bypassPermissions | plan maxTurns: 20 # (optional) maximum agentic turns skills: ["skill-creator"] # (optional) Agent Skills to utilize (string or list) color: cyan # (optional) UI color (e.g. red, blue, green, cyan, ...) memory: project # (optional) user | project | local effort: high # (optional) low | medium | high | xhigh | max isolation: worktree # (optional) run the subagent in an isolated git worktree background: false # (optional) run the subagent in the background initialPrompt: "Start by reading the spec." # (optional) seed prompt for the subagent mcpServers: {} # (optional) MCP server config (passed through verbatim) hooks: {} # (optional) hook config (passed through verbatim) copilot: # for GitHub Copilot specific parameters tools: # Listed tools are emitted verbatim; omit `tools` entirely to grant the agent # all tools. `agent/runSubagent` is opt-in — add it explicitly only when this # subagent needs to orchestrate other subagents. - web/fetch - agent/runSubagent opencode: # for OpenCode-specific parameters mode: subagent # (optional, defaults to "subagent") OpenCode agent mode model: anthropic/claude-sonnet-4-20250514 temperature: 0.1 tools: write: false edit: false bash: false permission: bash: "git diff": allow kilo: # for Kilo-specific parameters mode: all # (optional, defaults to "all") use "subagent" for hidden/subagent-only agents cursor: # for Cursor-specific parameters (generated to .cursor/agents/*.md) model: inherit # (optional, defaults to "inherit") model id, or "inherit" to use the parent's model readonly: false # (optional, defaults to false) restrict the subagent to read-only tools is_background: false # (optional, defaults to false) run the subagent as a background agent junie: # for JetBrains Junie CLI specific parameters (generated to .junie/agents/*.md; also imported from .agents/*.md) tools: ["Read", "Grep", "Edit"] # allowed tools disallowedTools: ["Bash", "WebSearch"] # disallowed tools mcpServers: ["github"] # MCP servers the subagent may use model: sonnet # model id reasoningLevel: high # low | medium | high maxTurns: 20 # max agentic turns skills: ["kotlin", "writerside"] # Agent Skills to utilize allowPromptArgument: true # whether the subagent accepts a prompt argument takt: # takt specific parameters (optional; emitted under .takt/facets/personas/) name: "renamed-stem" # (optional) override the emitted filename stem (no path separators or "..") roo: # for Roo Code specific parameters (optional; aggregated into the root .roomodes file) slug: planner # (optional) custom mode slug (^[a-zA-Z0-9-]+$); defaults to the sanitized file name whenToUse: "When planning a task" # (optional) guidance for automated mode selection customInstructions: "Be concise." # (optional) extra behavioral guidelines roleDefinition: "You are the planner." # (optional) overrides the body as the mode's roleDefinition groups: # (optional, defaults to ["read", "edit", "command", "mcp"]) tool access - read - ["edit", { fileRegex: "\\.md$", description: "Markdown files" }] --- You are the planner for any tasks. ``` -------------------------------- ### Configure MCP Server with Tool Enablement Source: https://rulesync.dyoshikawa.com/reference/file-formats.html Configure an MCP server, specifying its transport type, command, arguments, and explicitly enabling or disabling specific tools. This example shows enabling 'search_symbols' and 'find_references' while disabling 'rename_symbol' for the 'serena' server. ```json { "mcpServers": { "serena": { "type": "stdio", "command": "uvx", "args": ["--from", "git+https://github.com/oraios/serena", "serena", "start-mcp-server"], "enabledTools": ["search_symbols", "find_references"], "disabledTools": ["rename_symbol"] } } } ``` -------------------------------- ### Universal Placeholders in Rulesync Commands Source: https://rulesync.dyoshikawa.com/reference/command-syntax.html This example demonstrates the use of universal placeholders for arguments and shell expansion within a Rulesync command definition. It specifies the target tool as 'claudecode' and provides a description for the command. ```yaml --- targets: ["claudecode"] description: "Summarize git diff" --- Summarize the diff: !`git diff` Focus on $ARGUMENTS. ``` -------------------------------- ### NPM Transport Lockfile Example Source: https://rulesync.dyoshikawa.com/guide/declarative-sources.html An example of the rulesync-npm.lock.json file for experimental npm transport sources, which locks package versions and tarball integrity. ```json { "lockfileVersion": 1, "sources": { "@acme/skill-package": { "registry": "https://acme.jfrog.io/artifactory/api/npm/npm-local", "requestedVersion": "latest", "resolvedVersion": "1.2.3", "integrity": "sha512-...", "resolvedAt": "2026-01-15T12:00:00.000Z", "skills": { "my-skill": { "integrity": "sha256-abcdef..." } } } } } ``` -------------------------------- ### Initialize a Shared Rules Directory Source: https://rulesync.dyoshikawa.com/guide/separate-input-root.html Set up a new shared directory for your rules. This involves creating the directory, changing into it, and initializing rulesync within that directory. ```bash mkdir -p ~/.aiglobal cd ~/.aiglobal rulesync init ``` -------------------------------- ### Declare Official Skill in rulesync.jsonc Source: https://rulesync.dyoshikawa.com/guide/official-skills.html Declare official skills in your 'rulesync.jsonc' file for declarative installation. After adding the declaration, run 'rulesync install' to apply the changes. ```json # Or declare in rulesync.jsonc and run 'rulesync install' ``` -------------------------------- ### Codex OAuth Client ID Configuration Source: https://rulesync.dyoshikawa.com/reference/file-formats.html Example of Codex CLI configuration for OAuth, duplicating `clientId` to `client_id` for compatibility. ```toml [mcp_servers.slack.oauth] clientId = "1601185624273.8899143856786" client_id = "1601185624273.8899143856786" callbackPort = 3118 ``` -------------------------------- ### Reasonix Hooks Configuration Source: https://rulesync.dyoshikawa.com/reference/file-formats.html Example of a Reasonix hooks configuration file. Hooks are defined as flat arrays mapped to event names. ```json { "PreToolUse": [ { "match": "tool_name_regex", "command": "your_command --arg", "description": "Run this before a tool use.", "timeout": 30 } ], "PostToolUse": [ { "command": "another_command", "timeout": 60 } ] } ``` -------------------------------- ### Initialize Global Mode Files Source: https://rulesync.dyoshikawa.com/guide/global-mode.html Initializes the necessary files for global mode within the specified directory. This command should be run after creating the directory. ```bash cd ~/.aiglobal rulesync init ``` -------------------------------- ### Grok CLI Hooks Configuration Source: https://rulesync.dyoshikawa.com/reference/file-formats.html Example of a Grok CLI hooks configuration file. It uses a nested structure with matchers and hook arrays. ```json { "hooks": { "PreToolUse": [ { "matcher": "tool_name_regex", "hooks": [ { "type": "command", "command": "grok_command --arg", "timeout": 30000 } ] } ], "SessionStart": [ { "hooks": [ { "type": "command", "command": "grok_session_start_command", "timeout": 15000 } ] } ] } } ``` -------------------------------- ### Kiro Tool Settings Override Source: https://rulesync.dyoshikawa.com/reference/file-formats.html Example of Kiro-specific tool settings overrides for shell, AWS, and web_fetch. These settings are deep-merged per toolsSettings key. ```json { "permission": { "bash": { "git *": "allow" } }, "kiro": { "toolsSettings": { "shell": { "autoAllowReadonly": true }, "aws": { "allowedServices": ["s3"], "deniedServices": ["eks"] }, "web_fetch": { "trusted": [".*github\.com.*"] } } } } ``` -------------------------------- ### Configure Overview for Global Rules Source: https://rulesync.dyoshikawa.com/guide/global-mode.html Sets up the root overview file for global rules. This markdown file defines the project overview and is essential for rule generation in global mode. ```md --- root: true --- # The Project Overview ... ``` -------------------------------- ### Basic Rulesync Configuration with Schema Source: https://rulesync.dyoshikawa.com/guide/configuration.html Configure Rulesync by creating a `rulesync.jsonc` file. Add the `$schema` property for editor validation and autocompletion. ```jsonc // rulesync.jsonc { "$schema": "https://github.com/dyoshikawa/rulesync/releases/latest/download/config-schema.json", "targets": ["claudecode"], "features": ["rules"], } ``` -------------------------------- ### Convert Configurations Between Tools Source: https://rulesync.dyoshikawa.com/reference/cli-commands.html Convert configurations from a source tool to one or more target tools. This command skips the .rulesync/ directory and can specify which features to convert. ```bash rulesync convert --from cursor --to copilot,claudecode ``` ```bash rulesync convert --from cursor --to copilot,claudecode --features rules,mcp ``` -------------------------------- ### Configure Target Order for 'Last-Wins' Behavior Source: https://rulesync.dyoshikawa.com/guide/configuration.html When multiple targets write to the same output file, the last target in the array wins. This example shows 'opencode' winning because it appears last. ```jsonc { // opencode wins because it comes last "targets": ["agentsmd", "opencode"], "features": ["rules"], } ``` -------------------------------- ### Create Global Mode Directory Source: https://rulesync.dyoshikawa.com/guide/global-mode.html Creates a directory to store global mode configurations and rules. Use this command to set up the dedicated space for your global settings. ```bash mkdir -p ~/.aiglobal ``` -------------------------------- ### Import Existing Configurations Source: https://rulesync.dyoshikawa.com/reference/cli-commands.html Import existing configurations from specified targets into the default .rulesync/rules/ directory. Supports importing multiple features like rules, ignore, mcp, commands, subagents, and skills. ```bash rulesync import --targets claudecode --features rules,ignore,mcp,commands,subagents,skills ``` -------------------------------- ### Update rulesync CLI Source: https://rulesync.dyoshikawa.com/reference/cli-commands.html Updates the rulesync CLI to the latest version. Use `--check` to check for updates without installing, or `--force` to update even if already at the latest version. ```bash rulesync update ``` ```bash rulesync update --check ``` ```bash rulesync update --force ``` -------------------------------- ### Tool-Scoped Permissions in `.rulesync/permissions.jsonc` Source: https://rulesync.dyoshikawa.com/reference/file-formats.html This example shows how to define tool-specific permissions within the `rulesync.jsonc` configuration. The `claudecode.permission` block overrides the shared `bash` category permissions specifically for the Claude Code tool. ```jsonc { "permission": { "bash": { "git *": "allow", "*": "ask" }, }, "claudecode": { "permission": { // Replaces the shared `bash` category for Claude Code only. "bash": { "git *": "allow", "git push *": "deny", "*": "ask" }, }, }, } ``` -------------------------------- ### Import Existing AI Tool Configurations Source: https://rulesync.dyoshikawa.com/getting-started/quick-start.html Imports AI tool configurations from various sources into the .rulesync directory. Supports CLAUDE, Cursor, and Copilot configurations. ```bash rulesync import --targets claudecode rulesync import --targets cursor rulesync import --targets copilot rulesync import --targets claudecode --features rules,mcp,commands,subagents ``` -------------------------------- ### Reverse Target Order to Prioritize Earlier Target Source: https://rulesync.dyoshikawa.com/guide/configuration.html To ensure an earlier target's output is used when conflicts arise, reverse the order in the 'targets' array. This example makes 'agentsmd' win. ```jsonc { // agentsmd wins because it comes last "targets": ["opencode", "agentsmd"], "features": ["rules"], } ``` -------------------------------- ### Takt Configuration with Step Overrides and Provider Options Source: https://rulesync.dyoshikawa.com/reference/file-formats.html This JSON snippet illustrates Takt-specific permission configurations within a Rulesync permissions file. It includes step permission overrides for workflow steps and provider options for specific tools, demonstrating how to manage tool access and sandbox settings. ```json { "permission": { … }, "takt": { "step_permission_overrides": { "ai_review": "readonly" }, "provider_options": { "codex": { "network_access": true } } } } ``` -------------------------------- ### Qwen Tool-Scoped Permission Override Source: https://rulesync.dyoshikawa.com/reference/file-formats.html Use the `qwencode` key to override Qwen's autonomy and sandbox controls. This example shows how to set approval mode, folder trust, and auto mode hints. ```json { "permission": { "bash": { "*": "allow" } }, "qwencode": { "tools": { "approvalMode": "auto-edit" }, "security": { "folderTrust": { "enabled": true } }, "autoMode": { "hints": { "allow": ["Running tests"] }, "classifyAllShell": true } } } ```