This is a demo React application showcasing opencode custom commands for streamlined development workflows.
This project includes 20+ custom commands that demonstrate real-world development scenarios. You can execute these commands in two ways:
# List all available commands
opencode custom --list
# Execute a specific command
opencode custom setup
opencode custom dev
opencode custom lintSimply type the command in your opencode chat session:
/custom-setup
/custom-dev
/custom-lint
/custom-setup- Complete project setup guide/custom-dev- Start development workflow
/custom-lint- Run all quality checks/custom-fix- Auto-fix code issues/custom-analyze- Project health metrics
/custom-test- Run tests with options/custom-coverage- Generate coverage reports
/custom-component- Generate React components/custom-hook- Generate custom hooks
/custom-build- Production build process/custom-docker- Containerization guide/custom-deploy- Deployment workflows
/custom-debug- Debug common issues/custom-refactor- Refactoring guidelines
/custom-commit- Conventional commits/custom-pr- Pull request preparation/custom-review- Code review checklist
/custom-update- Update dependencies/custom-onboard- New team member guide
Custom commands provide several benefits:
- Consistency: Everyone on the team follows the same processes
- Documentation: Commands serve as living documentation
- Efficiency: Complex workflows become single commands
- Onboarding: New team members learn workflows faster
- Best Practices: Enforce coding standards and conventions
- Start with setup:
/custom-setup - Begin development:
/custom-dev - Check code quality:
/custom-lint - Generate a component:
/custom-component Button - Prepare for deployment:
/custom-build
Commands are defined in:
CUSTOM_COMMANDS.md- Main development commands.opencode/project-commands.md- Project-specific workflows
- Framework: React 18 + TypeScript
- Build Tool: Vite
- Testing: Vitest + React Testing Library
- Linting: ESLint + Prettier
- Styling: CSS Modules
- Deployment: Docker + Static hosting
Each custom command includes:
- Step-by-step instructions
- Best practices
- Troubleshooting tips
- Next steps guidance
- Real command examples
To add new custom commands:
- Add them to
CUSTOM_COMMANDS.mdor.opencode/project-commands.md - Use the format:
```/custom-name Description - Include detailed instructions and examples
- Test the command with
opencode custom name --dry-run
<!-- Code block style -->
```/custom-name Brief description
Detailed instructions here...
Multiple lines supported...Detailed instructions here... Multiple lines supported...
## 🔗 Related Links
- [opencode Documentation](https://opencode.ai)
- [Custom Commands Guide](./docs/custom-commands.md)
- [React Documentation](https://react.dev)
- [TypeScript Documentation](https://typescriptlang.org)
---
**Happy coding with custom commands! 🎉**