A powerful command-line interface for interacting with Twenty CRM instances. Built with Desktop Commander for seamless integration with Claude AI chat sessions.
This CLI tool was specifically designed to be used by Desktop Commander through terminal interactions with Claude AI. It enables direct CRM management from chat conversations, making it perfect for:
- Quick CRM data queries during conversations
- Automated CRM operations from AI workflows
- Real-time data access without switching applications
- Integration with AI-powered business processes
- Desktop Commander - AI-powered terminal automation
- Node.js - Runtime environment
- Twenty CRM REST API - Open-source CRM platform
- ๐ Direct API Integration - Connect to any Twenty CRM instance
- ๐ฅ People Management - List, view, and search contacts
- ๐ข Company Management - Manage company records
- ๐ Schema Exploration - View CRM structure and metadata
- ๐ฉบ Health Monitoring - Comprehensive system checks
- ๐ฎ Interactive Mode - Live CLI for exploration
- ๐ง Debug Tools - API response inspection
- Node.js 16+ installed
- Twenty CRM instance (self-hosted or cloud)
- API key from your Twenty CRM settings
# Clone the repository
git clone https://github.com/yourusername/twenty-crm-cli.git
cd twenty-crm-cli
# Install dependencies
npm install
# Configure your API key
node cli-tool.js setup# Test connection
node cli-tool.js health
# View your CRM schema
node quick-cli.js schema
# List companies
node cli-tool.js companies list
# Start interactive mode
node cli-tool.js interactive# Setup and testing
node cli-tool.js setup # Configure API key
node cli-tool.js test # Test connection
node cli-tool.js health # Full health check
# Data operations
node cli-tool.js people list # List contacts
node cli-tool.js companies list # List companies
node cli-tool.js people get <id> # Get specific person
# Schema and metadata
node quick-cli.js schema # View CRM structure
node cli-tool.js metadata # Detailed metadata
# Interactive mode
node cli-tool.js interactive # Start live CLI# Pagination and filtering
node cli-tool.js people list --limit=20
node cli-tool.js companies list --limit=15
# Debug API responses
node debug-api.js
# Create test data
node quick-cli.js create-test-dataOnce in interactive mode (node cli-tool.js interactive):
twenty> people 10 # List 10 people
twenty> companies 5 # List 5 companies
twenty> person <id> # Get person details
twenty> metadata # Show schema
twenty> test # Test connection
twenty> health # Health check
twenty> help # Show help
twenty> exit # Quit
The tool stores configuration in .twenty-config.json:
{
"apiKey": "your-api-key-here",
"baseUrl": "https://your-crm-instance.com/rest",
"instanceUrl": "https://your-crm-instance.com"
}- Go to your Twenty CRM instance (e.g.,
https://your-crm.company.com) - Navigate to Settings > API & Webhooks
- Create or copy your API key
- Run
node cli-tool.js setupand provide both your CRM URL and API key
This tool is optimized for Desktop Commander usage:
"List the companies in my CRM"
โ Desktop Commander runs: node cli-tool.js companies list
"Get details for person John Doe"
โ Desktop Commander runs: node cli-tool.js people get <id>
"Show me my CRM health status"
โ Desktop Commander runs: node cli-tool.js health
# Daily CRM health check
node cli-tool.js health > daily-report.txt
# Export company list
node cli-tool.js companies list --limit=100 > companies.txt
# Monitor CRM activity
while true; do
node cli-tool.js health
sleep 3600 # Check every hour
donetwenty-crm-cli/
โโโ cli-tool.js # Main CLI application
โโโ quick-cli.js # Quick commands (schema, test data)
โโโ debug-api.js # API debugging tool
โโโ package.json # Dependencies
โโโ .twenty-config.json # Configuration (auto-generated)
โโโ docs/ # Documentation
โ โโโ README.md # API documentation
โ โโโ rest-api-overview.md
โ โโโ authentication.md
โ โโโ core-endpoints.md
โ โโโ metadata-endpoints.md
โ โโโ webhooks.md
โ โโโ examples/ # Code examples
โโโ README.md # This file
- People - Individual contacts and leads
- Companies - Organizations and businesses
- Notes - Text notes and observations
- Tasks - To-do items and reminders
- Opportunities - Sales opportunities
- Activities - Meetings, calls, interactions
- Workflows - Automated processes
/rest/people- Manage contacts/rest/companies- Manage companies/rest/notes- Manage notes/rest/tasks- Manage tasks/rest/opportunities- Manage opportunities/rest/metadata/objects- Schema information
- Add command logic to
TwentyCLIclass incli-tool.js - Update the CLI parser in the
main()function - Add help text and examples
The tool uses the Twenty CRM REST API:
- Base URL:
https://your-instance.com/rest - Authentication: Bearer token
- Response format: JSON with nested data structure
# Test all functionality
node cli-tool.js health
# Debug API responses
node debug-api.js
# Test specific endpoints
node cli-tool.js test- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Twenty - The amazing open-source CRM platform
- Desktop Commander - AI-powered terminal automation that made this project possible
- Claude AI - For intelligent conversation-driven development
- Issues: GitHub Issues
- Twenty CRM Docs: https://twenty.com/developers
- Desktop Commander: https://desktopcommander.app/
Current version: 1.0.0
Built for seamless AI-driven CRM management through Desktop Commander.