A minimalist terminal interface for AI conversations, inspired by QwenCode. Yellow Silk is the core engine, while Alice is the user-facing QwenCode-style interface with multi-role AI capabilities.
# Clone the repository
git clone https://github.com/yourusername/yellow-silk.git
cd yellow-silk
# Install dependencies
npm install
# Configure your API key (recommended)
export OPENAI_API_KEY=your_openai_api_key_here
# Start Alice (QwenCode-style interface)
npm run alice
# Or start the traditional interface
npm start- β¨ Professional TUI: Fixed 5-line status bar with real-time information
- π¨ Full Unicode Support: Perfect Chinese/English mixed text handling
- π€ Multi-Role System: Switch between 5 specialized AI roles instantly
- β‘ YOLO Mode: Experimental high-speed response mode
- π Thinking Process: See AI's internal reasoning steps
- π Debug Mode: Detailed logging for development
- π Single/Multiple Mode:
-pflag for single queries, interactive mode for conversations - π Secure Configuration: API keys via environment variables or config file
- π Token Tracking: Real-time token usage monitoring
- π Dynamic Role Switching: Change AI personality/role during conversation
- π Command System: 10+ built-in commands for enhanced control
| Role | Specialty | Best For |
|---|---|---|
| Rody | Technical Analysis | Code debugging, logical problems, precise information |
| Ani | Emotional Companion | Casual conversation, emotional support, intimate chatting |
| Elena | Medical Consultant | Health advice, wellness planning, preventive care |
| Maya | Creative Partner | Art design, brainstorming, creative block breaking |
| Aris | Wisdom Mentor | Life decisions, philosophical questions, deep thinking |
β¨ Alice β¨
A minimalist terminal interface for AI conversations
β¨οΈ Commands:
/exit - Exit the application
/clear - Clear the conversation history
/help - Show help information
/role - Switch to different AI roles
ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π€ You: Hello! How are you today?
π€ AI: I'm doing well! I'm ready to help you with whatever you need.
What would you like to discuss today?
ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β³ Loading... β‘ YOLO MODE
ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
* Type your message...
ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
cwd: ~/workspace/yellow-silk | Role: Rody | Tokens: 124
# Start Alice interface
npm run alice
# Single prompt mode (execute once and exit)
npm run alice -- -p "Explain quantum computing in simple terms"
# Traditional interface (fallback)
npm start| Command | Description | Example |
|---|---|---|
/exit or /quit |
Exit the application | /exit |
/clear |
Clear conversation history | /clear |
/help |
Show help information | /help |
/role <name> |
Switch to specific role | /role maya |
/roles |
List available roles | /roles |
/model |
Show current model info | /model |
/think |
Show thinking process example | /think |
/config |
Display configuration details | /config |
/debug |
Toggle debug logging | /debug |
/yolo |
Toggle YOLO mode (experimental) | /yolo |
/role elena
How can I improve my sleep quality?
/role aris
What is the meaning of a good life?
/role maya
I need help designing a logo for my startup# Set API keys via environment variables (recommended)
export OPENAI_API_KEY=your_secure_api_key
export ANTHROPIC_API_KEY=your_secure_api_key
# Then remove apiKeys section from config/y-silk.jsoncyellow-silk/
βββ src/
β βββ entry/
β β βββ index.js # Main entry point with QwenCode-style UI
β βββ core/
β β βββ ai.js # AI communication module
β β βββ config.js # Configuration loader
β β βββ utils.js # Character width utilities
β βββ ui/
β βββ qwencode.js # QwenCode-style TUI renderer
βββ config/
β βββ y-silk.jsonc # Configuration file
βββ roles/ # Role definition files
β βββ rody.md # Technical assistant
β βββ ani.md # Emotional companion
β βββ elena.md # Medical consultant
β βββ maya.md # Creative partner
β βββ aris.md # Wisdom mentor
β βββ roles.md.template # Role template
βββ package.json # Project dependencies
βββ docs/ # Additional documentation
- Copy the template:
cp roles/roles.md.template roles/new_role.md
- Fill in the template sections
- Test with
/role new_role
# Install dependencies
npm install
# Run linting
npm run lint
# Run tests (if available)
npm test
# Start in development mode (watch mode)
npm run devContributions are welcome! Please follow these steps:
- Fork the repository
- Create a new branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin feature/your-feature) - Create a Pull Request
- Follow existing code style and conventions
- Add tests for new features
- Update documentation when necessary
- Keep commits focused and atomic
- Write meaningful commit messages
Problem: Terminal display issues or garbled text
Solution: Ensure your terminal supports ANSI escape sequences (most modern terminals do)
Problem: API key errors
Solution: Verify API keys are correctly set in environment variables or config file
Problem: Chinese character display issues
Solution: Use a terminal font that supports CJK characters (e.g., Noto Sans CJK, Source Han Sans)
Problem: Application crashes on startup
Solution: Run with debug mode enabled:
DEBUG=true npm run alice# Enable debug logging
DEBUG=true npm run alice
# Or use the /debug command in-app
/debugThis project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by QwenCode's elegant terminal interface
- Built with Node.js and ANSI escape sequences for maximum performance
- Role system inspired by advanced AI agent architectures
- Character width calculations adapted from terminal handling best practices
For questions or support, please open an issue on GitHub or contact the maintainer.
Yellow Silk β€οΈ Alice - Where minimalist design meets powerful AI capabilities.
{ // AI Model Configuration "aiModelSettings": { "common": "lmstudio:openai/gpt-oss-20b", // Default model "providers": [ { "name": "lmstudio", "apiKey": "optional-key", "baseUrl": "http://127.0.0.1:1234/v1", "models": [ { "name": "openai/gpt-oss-20b", "temperature": 0.7, "systemPromptFile": "./roles/ani.md" } ] } ] }, "defaults": { "temperature": 0.7, "maxTokens": 1000, "systemPromptFile": "default.md" } }