https://github.com/hatappo/agent-slash-sync
A CLI tool to convert and sync custom slash commands between Google Gemini and Anthropic Claude.
https://github.com/hatappo/agent-slash-sync
claude-code cli gemini-cli
Last synced: 5 months ago
JSON representation
A CLI tool to convert and sync custom slash commands between Google Gemini and Anthropic Claude.
- Host: GitHub
- URL: https://github.com/hatappo/agent-slash-sync
- Owner: hatappo
- Created: 2025-08-05T23:38:37.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-08-08T14:56:30.000Z (5 months ago)
- Last Synced: 2025-08-17T23:42:17.895Z (5 months ago)
- Topics: claude-code, cli, gemini-cli
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/agent-slash-sync
- Size: 330 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# agent-slash-sync
[](https://www.npmjs.com/package/agent-slash-sync)
[](https://opensource.org/licenses/MIT)
Bidirectionally convert and sync Custom Slash Commands between Claude Code and Gemini CLI with intuitive visual feedback.
## Installation
```bash
npm install -g agent-slash-sync
```
## Quick Start
```bash
# Convert Claude Code → Gemini CLI
agent-slash-sync -c c2g
# or use short form
assync -c c2g
# Convert Gemini CLI → Claude Code
agent-slash-sync -c g2c
# or use short form
assync -c g2c
# Preview changes without applying
agent-slash-sync -d -c c2g
# or use short form
assync -d -c c2g
```
## Screenshots
### Usage Example

### Conversion Example

## Features
- **Colorful Output** - Clear visual feedback with color-coded status indicators
- **Fast Conversion** - Efficiently sync commands between Claude Code and Gemini CLI
- **Bidirectional** - Convert in both directions (Claude ↔ Gemini)
- **Safe by Default** - Preview changes with dry-run mode before applying
- **Short Command** - Use `assync` instead of `agent-slash-sync`
- **Selective Sync** - Convert specific files or all commands at once
## Options
| Option | Description |
| --------------------------- | --------------------------------------------------------------- |
| `-c, --convert ` | **Required.** Conversion direction: `c2g` or `g2c` |
| `-f, --file ` | Convert specific file only (supports `.md`, `.toml` extensions) |
| `-d, --dry-run` | Preview changes without applying them |
| `-v, --verbose` | Show detailed debug information |
| `--claude-dir ` | Claude base directory (default: ~/.claude) |
| `--gemini-dir ` | Gemini base directory (default: ~/.gemini) |
| `--no-overwrite` | Skip existing files in target directory |
| `--sync-delete` | Delete orphaned files in target directory |
| `--remove-unsupported` | Remove fields not supported by target format |
## Examples
```bash
# Convert all commands with preview
assync -d -c c2g
# Convert specific file
assync -c g2c -f analyze-code
# Full sync with cleanup
assync -c c2g --sync-delete --remove-unsupported
# Use custom directories (base directories, /commands will be added automatically)
assync -c c2g --claude-dir ~/my-claude --gemini-dir ~/my-gemini
# Show verbose output for debugging
assync -c c2g -v
```
## File Locations
- **Claude Code**: `~/.claude/commands/*.md`
- **Gemini CLI**: `~/.gemini/commands/*.toml`
## Format Conversion
| Claude Code | Gemini CLI | Notes |
| ----------------------------------------- | ------------- | -------------------------------------------- |
| Markdown content | `prompt` | Main command content |
| Frontmatter `description` | `description` | Command description |
| `$ARGUMENTS` | `{{args}}` | Argument placeholder |
| `!command` | `!{command}` | Shell command syntax |
| `allowed-tools`, `argument-hint`, `model` | - | Claude-specific (use `--remove-unsupported`) |
## Status Indicators
- `[A]` Created (Green) - New files created in target directory
- `[M]` Modified (Yellow) - Existing files updated
- `[D]` Deleted (Red) - Files removed with `--sync-delete`
- `[-]` Skipped (Gray) - Files skipped with `--no-overwrite`
## Requirements
- Node.js >= 18.0.0
- npm or compatible package manager
## Development
```bash
# Install dependencies
npm install
# Build the project
npm run build
# Run tests
npm test
# Run tests with coverage
npm run test:coverage
# Lint and format code
npm run lint
npm run format
# Type check
npm run lint:tsc
# Development mode (watch)
npm run dev
```
### Publishing
```bash
# Check package contents
npm run release:dry
# Publish patch version (1.0.0 → 1.0.1)
npm run release:patch
# Publish minor version (1.0.0 → 1.1.0)
npm run release:minor
# Publish major version (1.0.0 → 2.0.0)
npm run release:major
```
## License
MIT