Thank you for your interest in contributing to the Cold Email CLI! This document provides guidelines and information for contributors.
- Bun (recommended for 2x performance) or Node.js 18+
- TypeScript knowledge
- React knowledge for UI components
- API keys for the platforms you want to test
# Clone the repository
git clone https://github.com/your-username/smartlead-cli-ink.git
cd smartlead-cli-ink
# Install dependencies
bun install
# Run in development mode
bun run dev
# Run type checking
bun run type-check
# Run linting
bun run lintsrc/
βββ cli.ts # Main CLI entry point
βββ core/ # Core functionality
β βββ index.ts # Shell rendering and command execution
β βββ module-selector.ts # Platform discovery and loading
β βββ utils/ # Shared utilities
βββ modules/ # Platform-specific modules
βββ types/ # TypeScript definitions and schemas
βββ components/ # Shared React components
Each platform follows a consistent structure:
src/modules/[platform]/
βββ index.ts # Platform configuration
βββ api.ts # Complete API client
βββ ascii.ts # Branded ASCII art
βββ shell.tsx # Interactive shell UI
βββ commands/ # Command implementations
β βββ campaigns.ts # Campaign management
β βββ contacts.ts # Contact/lead management
β βββ accounts.ts # Email account management
β βββ templates.ts # Template management
β βββ analytics.ts # Analytics & reporting
βββ mcp/ # MCP integration
β βββ [platform]-mcp.json
βββ types.ts # Platform-specific types (if needed)
mkdir -p src/modules/[platform]/{commands,mcp}Create a comprehensive API client:
import axios, { type AxiosInstance } from "axios";
export class PlatformAPI {
private client: AxiosInstance;
private baseURL = "https://api.platform.com/v1";
constructor(apiKey?: string) {
this.client = axios.create({
baseURL: this.baseURL,
headers: {
Authorization: `Bearer ${apiKey || process.env.PLATFORM_API_KEY}`,
"Content-Type": "application/json",
"User-Agent": "CEC-Platform/2.0.0",
},
});
}
// Implement all API methods...
}Create branded ASCII art with the platform's theme:
export const platformAscii = `
Your ASCII art here...
`;
export const platformBanner = `
Your banner here...
`;Implement command categories:
- campaigns.ts - Campaign management
- contacts.ts - Contact/lead management
- accounts.ts - Email account management
- templates.ts - Template management
- analytics.ts - Analytics & reporting
Create React Ink component with:
- Welcome screen with ASCII art
- Category navigation (1-6 keys)
- Command listing by category
- ESC navigation
- Branded theming
Define the platform:
export default {
name: "Platform Name",
description: "Platform description",
version: "2.0.0",
totalCommands: allCommands.length,
categories: [
{
name: "π Category Name",
description: "Category description",
commands: commandCount,
},
],
api,
commands: allCommands,
} as Platform;Create comprehensive MCP server configuration for AI assistant integration.
- Add to
src/core/module-selector.ts - Add shell import to
src/core/index.ts - Add theme to
src/core/utils/theme.ts - Add package script to
package.json - Update README.md
Choose colors that represent the platform's brand:
- Primary: Main brand color
- Secondary: Complementary color
- Accent: Highlight color
- Keep it recognizable and branded
- Use consistent character density
- Test at different terminal sizes
- Maintain professional appearance
{
name: "category:action",
description: "π Clear description with emoji",
usage: "category:action --required [--optional]",
category: "π Category Name",
handler: async (args) => {
// Implementation
},
}- Consistent naming: Use
category:actionformat - Clear descriptions: Include emoji and clear purpose
- Comprehensive usage: Show all options
- Error handling: Validate required arguments
- Output formatting: Use consistent JSON output
- Aliases: Create short aliases for common commands
# Test specific platform
bun run src/cli.ts [platform]
# Test specific command
bun run src/cli.ts [platform] [command] --args
# Test type safety
bun run type-check- TypeScript compiles without errors
- All commands work as expected
- Shell navigation is smooth
- ASCII art displays correctly
- Theme colors are consistent
- MCP configuration is complete
- Documentation is updated
- Use strict TypeScript settings
- Prefer
typeoverinterfacefor unions - Use Zod for runtime validation
- Import types with
typekeyword
# Auto-format code
bun run format
# Check linting
bun run lint- Files: kebab-case (
email-accounts.ts) - Variables: camelCase (
emailAccount) - Constants: UPPER_CASE (
API_BASE_URL) - Types: PascalCase (
EmailAccount)
When reporting bugs, include:
- Platform and command affected
- Expected vs actual behavior
- Steps to reproduce
- Environment details (OS, Bun/Node version)
- Error messages and stack traces
- Describe the use case clearly
- Explain the expected benefit
- Consider impact on existing functionality
- Provide implementation suggestions if possible
When adding features:
- Update command counts
- Add new platform information
- Update examples and usage
- Maintain accurate statistics
- Add JSDoc comments for public APIs
- Include usage examples
- Document complex logic
- Maintain type definitions
- Update version in
package.json - Update CHANGELOG.md
- Run full test suite
- Update documentation
- Create release notes
- Tag release
- Complete endpoint coverage
- Accurate parameter documentation
- Usage examples
- Proper error handling
- Version compatibility
- Discord: Join our community
- Issues: GitHub Issues for bugs and features
- Discussions: GitHub Discussions for questions
- All PRs require review
- Focus on code quality and consistency
- Test thoroughly before requesting review
- Be responsive to feedback
Contributors will be recognized in:
- README.md contributors section
- Release notes for significant contributions
- Special mention in Discord community
Thank you for contributing to Cold Email CLI! Together we're building the most comprehensive cold email automation suite available. πβ¨