@sylix/coworker
v1.5.0
Published
CoWorker by Sylix - AI-powered CLI coding assistant
Readme
CoWorker by Sylix
A powerful AI-powered CLI coding assistant that runs in your terminal.
Features
- Ask: Query your codebase with natural language questions
- Explain: Get clear explanations of any file's purpose and structure
- Edit: AI-assisted file editing with diff preview and confirmation
- Run: Execute tasks with intelligent command suggestions
- Config: Easy configuration management for your Sylix API credentials
Installation
Prerequisites
- Node.js 18 or higher
- npm or yarn
- Sylix API access
Install Dependencies
cd coworker
npm installBuild
npm run buildGlobal Installation (Optional)
To use coworker command anywhere:
npm linkConfiguration
Before using CoWorker, configure your Sylix API credentials:
coworker config initYou'll be prompted for:
- Base URL: Your Sylix API endpoint (default:
https://api.sylix.ai) - API Key: Your Sylix API key
- Default Model: Model to use (default:
sylix-4)
To view your current configuration:
coworker config showUsage
Ask a Question
Ask questions about your codebase with context awareness:
coworker ask "What does the authentication module do?"coworker ask "How can I optimize the database queries in this project?"Explain a File
Get detailed explanations of any file:
coworker explain src/api/sylix.tscoworker explain package.jsonEdit a File
AI-assisted editing with diff preview:
coworker edit src/utils/helper.ts "Add input validation to the parseConfig function"coworker edit app.js "Convert the callback-based function to use async/await"Run a Task
Execute tasks with command suggestions:
coworker run "Set up a new React component library"coworker run "Run all tests and show me the results"The assistant will suggest commands and ask for confirmation before executing them.
Project Structure
coworker/
├── src/
│ ├── cli.ts # Main CLI entry point
│ ├── api/
│ │ └── sylix.ts # Sylix API client
│ ├── context/
│ │ └── reader.ts # Context reader for codebase
│ ├── commands/
│ │ ├── ask.ts # Ask command implementation
│ │ ├── edit.ts # Edit command implementation
│ │ ├── explain.ts # Explain command implementation
│ │ ├── run.ts # Run command implementation
│ │ └── config.ts # Config commands
│ └── utils/
│ └── output.ts # Output formatting utilities
├── package.json
├── tsconfig.json
└── README.mdAPI Configuration
The configuration is stored at ~/.coworker/config.json:
{
"baseUrl": "https://api.sylix.ai",
"apiKey": "your-api-key",
"defaultModel": "sylix-4"
}Development
Run in Development Mode
npm run dev -- ask "What does this project do?"Build
npm run buildOutput Formatting
CoWorker provides beautifully formatted terminal output:
- Cyan - Branding and headers
- Green - Success messages
- Red - Errors
- Yellow - Warnings
- Code blocks - Syntax highlighted with line numbers
- Spinners - Loading indicators for async operations
Security
- API keys are stored locally in
~/.coworker/config.json - Never commit your config file to version control
- The config file path respects your home directory across platforms
License
MIT License - Copyright (c) Sylix
Support
For issues and feature requests, please visit the GitHub repository.
CoWorker by Sylix - Your AI pair programmer in the terminal.
