A CLI tool to generate workspace files for CodeCompanion.nvim ✨
uv pip install --system git+https://github.com/alexeykarnachev/py-codecompanion-workspace
cd my-project
ccw init .
ccw init my-new-project
For any project:
.cc/codecompanion.yaml
- Workspace configuration.cc/data/
- Internal cc files (e.gCONVENTIONS.md
)codecompanion-workspace.json
- Compiled configuration
For new Python projects:
- Basic Python project structure:
- Package directory with
__init__.py
andmain.py
- Tests directory with initial test
- Scripts directory with quality checks
- Package directory with
- Configuration files:
pyproject.toml
with modern tools setup- Type hints and quality checks configuration
- Version management
- Documentation:
- README.md with quick start guide
- CHANGELOG.md following Keep a Changelog format
- .gitignore with comprehensive Python patterns
- Git repository:
- Initialized with initial commit
- Using your Git configuration
# Initialize in current directory
ccw init .
# Create new project
ccw init my-project
# Force initialize in existing directory
ccw init my-project --force
# Use specific template
ccw init my-project --template default
# Update configuration after changes
ccw compile-config .cc/codecompanion.yaml
ccw --help
ccw init --help
ccw compile-config --help
The workspace configuration is stored in .cc/codecompanion.yaml
. Here's an example:
name: "my-project"
description: "Project description"
system_prompt: "Custom system prompt for LLM interactions"
ignore:
enabled: true
patterns:
default: ["*.lock", ".env"]
additional: ["custom.ignore"]
categories: ["default"]
groups:
- name: "Core"
description: "Core project files"
files:
- path: "{package_name}/**/*.py"
description: "Source files"
kind: "pattern"
- path: "tests/**/*.py"
description: "Test files"
kind: "pattern"
Key features:
- Pattern-based file discovery with
**/*
glob support - Customizable ignore patterns
- File grouping for better organization
- Custom system prompts per group
After modifying the config:
- Run
ccw compile-config .cc/codecompanion.yaml
- Use the generated
codecompanion-workspace.json
in Neovim