c2roo 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. c2roo-1.0.0/.github/actions/setup/action.yml +18 -0
  2. c2roo-1.0.0/.github/workflows/ci.yml +56 -0
  3. c2roo-1.0.0/.github/workflows/release.yml +73 -0
  4. c2roo-1.0.0/.gitignore +11 -0
  5. c2roo-1.0.0/CHANGELOG.md +7 -0
  6. c2roo-1.0.0/PKG-INFO +8 -0
  7. c2roo-1.0.0/README.md +194 -0
  8. c2roo-1.0.0/docs/superpowers/plans/2026-04-12-c2roo-implementation.md +3489 -0
  9. c2roo-1.0.0/docs/superpowers/plans/2026-04-12-cicd-pipeline.md +737 -0
  10. c2roo-1.0.0/docs/superpowers/specs/2026-04-12-c2roo-design.md +351 -0
  11. c2roo-1.0.0/docs/superpowers/specs/2026-04-12-cicd-pipeline-design.md +290 -0
  12. c2roo-1.0.0/logo.svg +51 -0
  13. c2roo-1.0.0/pyproject.toml +79 -0
  14. c2roo-1.0.0/src/c2roo/__init__.py +1 -0
  15. c2roo-1.0.0/src/c2roo/cli.py +277 -0
  16. c2roo-1.0.0/src/c2roo/converter/__init__.py +0 -0
  17. c2roo-1.0.0/src/c2roo/converter/agent_converter.py +94 -0
  18. c2roo-1.0.0/src/c2roo/converter/command_converter.py +32 -0
  19. c2roo-1.0.0/src/c2roo/converter/hook_converter.py +43 -0
  20. c2roo-1.0.0/src/c2roo/converter/mcp_converter.py +39 -0
  21. c2roo-1.0.0/src/c2roo/converter/skill_converter.py +48 -0
  22. c2roo-1.0.0/src/c2roo/models/__init__.py +16 -0
  23. c2roo-1.0.0/src/c2roo/models/agent.py +11 -0
  24. c2roo-1.0.0/src/c2roo/models/command.py +10 -0
  25. c2roo-1.0.0/src/c2roo/models/hook.py +9 -0
  26. c2roo-1.0.0/src/c2roo/models/mcp.py +14 -0
  27. c2roo-1.0.0/src/c2roo/models/plugin.py +29 -0
  28. c2roo-1.0.0/src/c2roo/models/skill.py +18 -0
  29. c2roo-1.0.0/src/c2roo/parser/__init__.py +3 -0
  30. c2roo-1.0.0/src/c2roo/parser/agent_parser.py +36 -0
  31. c2roo-1.0.0/src/c2roo/parser/command_parser.py +22 -0
  32. c2roo-1.0.0/src/c2roo/parser/frontmatter.py +28 -0
  33. c2roo-1.0.0/src/c2roo/parser/hook_parser.py +29 -0
  34. c2roo-1.0.0/src/c2roo/parser/mcp_parser.py +28 -0
  35. c2roo-1.0.0/src/c2roo/parser/plugin_parser.py +62 -0
  36. c2roo-1.0.0/src/c2roo/parser/skill_parser.py +49 -0
  37. c2roo-1.0.0/src/c2roo/report.py +92 -0
  38. c2roo-1.0.0/src/c2roo/sources/__init__.py +0 -0
  39. c2roo-1.0.0/src/c2roo/sources/git_source.py +49 -0
  40. c2roo-1.0.0/src/c2roo/sources/local_source.py +15 -0
  41. c2roo-1.0.0/src/c2roo/sources/marketplace.py +134 -0
  42. c2roo-1.0.0/src/c2roo/writer/__init__.py +3 -0
  43. c2roo-1.0.0/src/c2roo/writer/roo_writer.py +130 -0
  44. c2roo-1.0.0/tests/fixtures/sample-plugin/.claude-plugin/plugin.json +9 -0
  45. c2roo-1.0.0/tests/fixtures/sample-plugin/.mcp.json +17 -0
  46. c2roo-1.0.0/tests/fixtures/sample-plugin/agents/code-reviewer.md +18 -0
  47. c2roo-1.0.0/tests/fixtures/sample-plugin/commands/commit.md +11 -0
  48. c2roo-1.0.0/tests/fixtures/sample-plugin/hooks/hooks.json +26 -0
  49. c2roo-1.0.0/tests/fixtures/sample-plugin/skills/pdf-processing/SKILL.md +18 -0
  50. c2roo-1.0.0/tests/fixtures/sample-plugin/skills/pdf-processing/scripts/extract.py +1 -0
  51. c2roo-1.0.0/tests/test_cli_convert.py +34 -0
  52. c2roo-1.0.0/tests/test_cli_install.py +24 -0
  53. c2roo-1.0.0/tests/test_converter/__init__.py +0 -0
  54. c2roo-1.0.0/tests/test_converter/test_agent_converter.py +67 -0
  55. c2roo-1.0.0/tests/test_converter/test_command_converter.py +25 -0
  56. c2roo-1.0.0/tests/test_converter/test_hook_converter.py +21 -0
  57. c2roo-1.0.0/tests/test_converter/test_mcp_converter.py +39 -0
  58. c2roo-1.0.0/tests/test_converter/test_skill_converter.py +38 -0
  59. c2roo-1.0.0/tests/test_e2e.py +79 -0
  60. c2roo-1.0.0/tests/test_models.py +123 -0
  61. c2roo-1.0.0/tests/test_parser/__init__.py +0 -0
  62. c2roo-1.0.0/tests/test_parser/test_agent_parser.py +18 -0
  63. c2roo-1.0.0/tests/test_parser/test_command_parser.py +16 -0
  64. c2roo-1.0.0/tests/test_parser/test_frontmatter.py +72 -0
  65. c2roo-1.0.0/tests/test_parser/test_hook_parser.py +27 -0
  66. c2roo-1.0.0/tests/test_parser/test_mcp_parser.py +25 -0
  67. c2roo-1.0.0/tests/test_parser/test_plugin_parser.py +34 -0
  68. c2roo-1.0.0/tests/test_parser/test_skill_parser.py +31 -0
  69. c2roo-1.0.0/tests/test_report.py +30 -0
  70. c2roo-1.0.0/tests/test_sources/__init__.py +0 -0
  71. c2roo-1.0.0/tests/test_sources/test_git_source.py +46 -0
  72. c2roo-1.0.0/tests/test_sources/test_local_source.py +22 -0
  73. c2roo-1.0.0/tests/test_sources/test_marketplace.py +78 -0
  74. c2roo-1.0.0/tests/test_writer.py +183 -0
  75. c2roo-1.0.0/uv.lock +958 -0
@@ -0,0 +1,18 @@
1
+ name: Setup c2roo
2
+ description: Checkout, install UV, and sync dependencies
3
+
4
+ runs:
5
+ using: composite
6
+ steps:
7
+ - name: Install UV
8
+ uses: astral-sh/setup-uv@v3
9
+ with:
10
+ enable-cache: true
11
+
12
+ - name: Set up Python
13
+ run: uv python install 3.12
14
+ shell: bash
15
+
16
+ - name: Sync dependencies
17
+ run: uv sync --all-extras --dev
18
+ shell: bash
@@ -0,0 +1,56 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ concurrency:
10
+ group: ci-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ jobs:
14
+ lint:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - uses: ./.github/actions/setup
19
+ - name: Ruff check
20
+ run: uv run ruff check .
21
+ - name: Ruff format check
22
+ run: uv run ruff format --check .
23
+
24
+ typecheck:
25
+ runs-on: ubuntu-latest
26
+ steps:
27
+ - uses: actions/checkout@v4
28
+ - uses: ./.github/actions/setup
29
+ - name: Mypy
30
+ run: uv run mypy src/c2roo
31
+
32
+ test:
33
+ runs-on: ubuntu-latest
34
+ steps:
35
+ - uses: actions/checkout@v4
36
+ - uses: ./.github/actions/setup
37
+ - name: Pytest
38
+ run: uv run pytest tests/ -v
39
+
40
+ build:
41
+ runs-on: ubuntu-latest
42
+ steps:
43
+ - uses: actions/checkout@v4
44
+ - uses: ./.github/actions/setup
45
+ - name: Build sdist and wheel
46
+ run: uv build
47
+ - name: Smoke test installed CLI
48
+ run: |
49
+ uv tool install --from "$(ls dist/*.whl)" c2roo
50
+ c2roo --help
51
+ - name: Upload build artifacts
52
+ uses: actions/upload-artifact@v4
53
+ with:
54
+ name: dist
55
+ path: dist/
56
+ retention-days: 7
@@ -0,0 +1,73 @@
1
+ name: Release
2
+
3
+ on:
4
+ workflow_run:
5
+ workflows: ["CI"]
6
+ types: [completed]
7
+ branches: [main]
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ release:
12
+ # Only run if the triggering CI workflow succeeded
13
+ if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
14
+ runs-on: ubuntu-latest
15
+ permissions:
16
+ contents: write
17
+ outputs:
18
+ released: ${{ steps.semrel.outputs.released }}
19
+ version: ${{ steps.semrel.outputs.version }}
20
+ tag: ${{ steps.semrel.outputs.tag }}
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+ with:
24
+ ref: main
25
+ fetch-depth: 0
26
+ token: ${{ secrets.GITHUB_TOKEN }}
27
+
28
+ - uses: ./.github/actions/setup
29
+
30
+ - name: Run semantic-release
31
+ id: semrel
32
+ env:
33
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34
+ run: |
35
+ set -e
36
+ # Determine next version without committing
37
+ CURRENT=$(uv run semantic-release version --print 2>/dev/null || true)
38
+ PREV=$(grep -E '^version = ' pyproject.toml | head -1 | cut -d'"' -f2)
39
+ echo "Current version in repo: $PREV"
40
+ echo "Next version from semantic-release: $CURRENT"
41
+ if [ -z "$CURRENT" ] || [ "$CURRENT" = "$PREV" ]; then
42
+ echo "No release needed."
43
+ echo "released=false" >> "$GITHUB_OUTPUT"
44
+ exit 0
45
+ fi
46
+ # Perform the release
47
+ uv run semantic-release version
48
+ echo "released=true" >> "$GITHUB_OUTPUT"
49
+ echo "version=$CURRENT" >> "$GITHUB_OUTPUT"
50
+ echo "tag=v$CURRENT" >> "$GITHUB_OUTPUT"
51
+
52
+ publish:
53
+ needs: release
54
+ if: ${{ needs.release.outputs.released == 'true' }}
55
+ runs-on: ubuntu-latest
56
+ environment:
57
+ name: pypi
58
+ url: https://pypi.org/project/c2roo/${{ needs.release.outputs.version }}
59
+ permissions:
60
+ id-token: write
61
+ contents: read
62
+ steps:
63
+ - uses: actions/checkout@v4
64
+ with:
65
+ ref: ${{ needs.release.outputs.tag }}
66
+
67
+ - uses: ./.github/actions/setup
68
+
69
+ - name: Build distribution
70
+ run: uv build
71
+
72
+ - name: Publish to PyPI via Trusted Publishing
73
+ run: uv publish --trusted-publishing always
c2roo-1.0.0/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ __pycache__/
2
+ *.pyc
3
+ .venv/
4
+ *.egg-info/
5
+ dist/
6
+ build/
7
+ .pytest_cache/
8
+ .coverage
9
+ .coverage.*
10
+ htmlcov/
11
+ .claude/
@@ -0,0 +1,7 @@
1
+ # CHANGELOG
2
+
3
+ <!-- version list -->
4
+
5
+ ## v1.0.0 (2026-04-12)
6
+
7
+ - Initial Release
c2roo-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,8 @@
1
+ Metadata-Version: 2.4
2
+ Name: c2roo
3
+ Version: 1.0.0
4
+ Summary: Convert Claude Code plugins to Roo Code format
5
+ Requires-Python: >=3.12
6
+ Requires-Dist: click>=8.1
7
+ Requires-Dist: pyyaml>=6.0
8
+ Requires-Dist: rich>=13.0
c2roo-1.0.0/README.md ADDED
@@ -0,0 +1,194 @@
1
+ <p align="center">
2
+ <img src="logo.svg" alt="c2roo logo" width="100"/>
3
+ </p>
4
+
5
+ <p align="center">
6
+ <strong>Convert Claude Code plugins to Roo Code format</strong>
7
+ </p>
8
+
9
+ <p align="center">
10
+ <img src="https://img.shields.io/badge/python-3.12+-3776AB?logo=python&logoColor=white" alt="Python 3.12+"/>
11
+ <img src="https://img.shields.io/badge/license-MIT-green" alt="MIT License"/>
12
+ <img src="https://img.shields.io/badge/tests-70%20passing-brightgreen" alt="Tests"/>
13
+ <img src="https://img.shields.io/badge/coverage-80%25-brightgreen" alt="Coverage 80%"/>
14
+ </p>
15
+
16
+ ---
17
+
18
+ ## Overview
19
+
20
+ **c2roo** is a CLI tool that converts [Claude Code](https://claude.ai/code) plugins into [Roo Code](https://roocode.com) format. It handles all plugin entity types — skills, commands, agents, hooks, and MCP servers — and can source plugins from marketplaces, git repos, or local directories.
21
+
22
+ Both tools follow the [Agent Skills](https://agentskills.io/) open standard, so skill conversion is near-lossless. Other entities require varying degrees of transformation.
23
+
24
+ ## Entity Mapping
25
+
26
+ | Claude Code | Roo Code | Fidelity | Notes |
27
+ |---|---|---|---|
28
+ | Skills | Skills | ~100% | Same Agent Skills format. Claude-specific fields stripped. |
29
+ | Commands | Slash Commands | ~90% | `allowed-tools` dropped. Body + dynamic context preserved. |
30
+ | Agents | Custom Modes + Rules | ~70% | Model pref lost. Tool granularity reduced. |
31
+ | Hooks | Guidance Rules | ~30% | Soft guidance only — Roo has no hook enforcement. |
32
+ | MCP Servers | MCP config | ~95% | Near-identical. `${CLAUDE_PLUGIN_ROOT}` resolved. |
33
+
34
+ ## Installation
35
+
36
+ ```bash
37
+ # With uv (recommended)
38
+ uv tool install c2roo
39
+
40
+ # Or from source
41
+ git clone https://github.com/bitton-yehonatan/c2roo.git
42
+ cd c2roo
43
+ uv sync
44
+ ```
45
+
46
+ ## Quick Start
47
+
48
+ ```bash
49
+ # Convert a local Claude Code plugin to your project
50
+ c2roo convert ./path/to/plugin --project
51
+
52
+ # Install a plugin from the marketplace
53
+ c2roo install superpowers --global
54
+
55
+ # Browse available plugins
56
+ c2roo marketplace browse
57
+
58
+ # Dry run — see what would be converted without writing files
59
+ c2roo convert ./path/to/plugin --project --dry-run
60
+ ```
61
+
62
+ ## CLI Reference
63
+
64
+ ### `c2roo convert`
65
+
66
+ Convert a plugin from a local path or git URL.
67
+
68
+ ```
69
+ Usage: c2roo convert [OPTIONS] SOURCE
70
+
71
+ Options:
72
+ --global Install to ~/.roo/ (global)
73
+ --project Install to .roo/ (project)
74
+ --dry-run Show what would be converted
75
+ --force Overwrite existing files
76
+ ```
77
+
78
+ You **must** specify `--global` or `--project`. Omitting both is an error.
79
+
80
+ ```bash
81
+ # From a local directory
82
+ c2roo convert ~/plugins/my-plugin --project --force
83
+
84
+ # From a git URL
85
+ c2roo convert https://github.com/org/plugin.git --global
86
+ ```
87
+
88
+ ### `c2roo install`
89
+
90
+ Install a plugin from a registered marketplace.
91
+
92
+ ```
93
+ Usage: c2roo install [OPTIONS] PLUGIN_NAME
94
+
95
+ Options:
96
+ --global Install to ~/.roo/ (global)
97
+ --project Install to .roo/ (project)
98
+ --source TEXT Which marketplace to search
99
+ --dry-run Show what would be converted
100
+ --force Overwrite existing files
101
+ ```
102
+
103
+ ```bash
104
+ # Install from any marketplace
105
+ c2roo install frontend-design --project
106
+
107
+ # Install from a specific marketplace
108
+ c2roo install react-native-best-practices --global --source callstack
109
+ ```
110
+
111
+ ### `c2roo marketplace`
112
+
113
+ Manage plugin marketplace sources.
114
+
115
+ ```bash
116
+ # List registered marketplaces
117
+ c2roo marketplace list
118
+
119
+ # Browse plugins from all marketplaces
120
+ c2roo marketplace browse
121
+
122
+ # Browse a specific marketplace
123
+ c2roo marketplace browse --source official
124
+
125
+ # Add a new marketplace (GitHub owner/repo format)
126
+ c2roo marketplace add expo/expo-plugins --name expo --description "Expo plugins"
127
+
128
+ # Remove a marketplace
129
+ c2roo marketplace remove expo
130
+ ```
131
+
132
+ **Default marketplaces** (pre-registered):
133
+ - `official` — `anthropics/claude-plugins-official`
134
+ - `community` — `anthropics/claude-plugins-community`
135
+
136
+ ## How Conversion Works
137
+
138
+ ### Skills (near 1:1)
139
+
140
+ Both tools follow the [Agent Skills](https://agentskills.io/) spec. c2roo copies the entire skill directory (SKILL.md + scripts/references/assets) and strips Claude-specific frontmatter fields (`disable-model-invocation`, `user-invocable`, `context`, `agent`).
141
+
142
+ ### Commands -> Slash Commands
143
+
144
+ Markdown files with YAML frontmatter transfer cleanly. The `allowed-tools` field is dropped (Roo doesn't support it). Dynamic context injection (`!`backtick``) works in both.
145
+
146
+ ### Agents -> Custom Modes + Rules
147
+
148
+ Each Claude Code agent produces two Roo outputs:
149
+
150
+ 1. **Custom Mode** in `.roomodes` — with slug, humanized name, role definition (first paragraph), and tool groups mapped from the agent's tool list
151
+ 2. **Rules file** in `.roo/rules-{slug}/` — full agent system prompt, plus a footer noting the original model preference and tool list
152
+
153
+ Tool mapping: `Read/Grep/Glob` -> `read`, `Write/Edit` -> `edit`, `Bash` -> `command`, `WebFetch/WebSearch` -> `mcp`.
154
+
155
+ ### Hooks -> Guidance Rules
156
+
157
+ Roo has no hook system. c2roo converts hooks into a descriptive markdown file (`.roo/rules/converted-hooks-guidance.md`) that explains the original behavior and suggests manual equivalents.
158
+
159
+ ### MCP Servers
160
+
161
+ Near-identical JSON format. `${CLAUDE_PLUGIN_ROOT}` references are resolved to the actual install path. Existing `.roo/mcp.json` is merged, not overwritten.
162
+
163
+ ## Output Locations
164
+
165
+ | Flag | Skills | Commands | Modes | Rules | MCP |
166
+ |---|---|---|---|---|---|
167
+ | `--project` | `.roo/skills/` | `.roo/commands/` | `.roomodes` | `.roo/rules*/` | `.roo/mcp.json` |
168
+ | `--global` | `~/.roo/skills/` | `~/.roo/commands/` | `~/.roomodes` | `~/.roo/rules*/` | `~/.roo/mcp.json` |
169
+
170
+ ## Development
171
+
172
+ ```bash
173
+ git clone https://github.com/bitton-yehonatan/c2roo.git
174
+ cd c2roo
175
+ uv sync
176
+
177
+ # Run tests (coverage runs automatically)
178
+ uv run pytest tests/ -v
179
+
180
+ # Run the CLI
181
+ uv run c2roo --help
182
+ ```
183
+
184
+ ## Contributing
185
+
186
+ 1. Fork the repo
187
+ 2. Create a feature branch
188
+ 3. Write tests for new functionality
189
+ 4. Ensure all 70+ tests pass
190
+ 5. Submit a PR
191
+
192
+ ## License
193
+
194
+ MIT