Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Or run without installing globally using npx:
```bash
npx sync-rules --help
# e.g.
npx sync-rules init
npx sync-rules --init
```

## Usage
Expand All @@ -42,10 +42,16 @@ The workflow involves initializing a configuration file, defining your projects
First, initialize the configuration file:

```bash
sync-rules init
sync-rules --init
```

This creates a sample `config.json`. By default, it is stored in your system's application data directory. You can specify a custom path using the `--config <path>` flag or the `SYNC_RULES_CONFIG` environment variable.
This creates a sample `config.json`. By default, it is stored in your system's application data directory. You can specify a custom path using the `--config <path>` flag or the `SYNC_RULES_CONFIG` environment variable. Use `--force` to overwrite an existing config file.

To show the resolved config and rules source paths:

```bash
sync-rules --paths
```

### 2\. Configure Projects and Rules

Expand Down Expand Up @@ -80,14 +86,15 @@ To synchronize the rules for all configured projects, run the default command:

```bash
sync-rules
# or
sync-rules sync
```

This reads the rules and writes `AGENTS.md` in each project. It also writes `CLAUDE.md` containing `@AGENTS.md` for Claude Code.

#### Options

- `--init`: Create a sample config file
- `--force` / `-f`: Overwrite existing config file (with `--init`)
- `--paths`: Print resolved config and rules source paths
- `--verbose` / `-v`: Show status messages (silent by default)
- `--dry-run` / `-n`: Preview changes without writing files
- `--porcelain`: Machine-readable TSV output (implies `--dry-run`)
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"dependencies": {
"@commander-js/extra-typings": "^14.0.0",
"commander": "^14.0.2",
"conf": "^15.0.2",
"env-paths": "^3.0.0",
"globby": "^16.1.0",
"zod": "^4.3.5"
Expand Down
115 changes: 115 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading