This repository contains Solar Code, a command-line AI workflow tool powered by Upstage Solar Pro2 that connects to your tools, understands your code and accelerates your workflows.
Solar Code is based on the excellent Gemini CLI architecture, enhanced to work with Upstage's Solar Pro2 model for Korean developers and organizations.
π Quick Installation
Install Solar Code globally with a single command:
Verify the installation:
π Prerequisites
- Node.js 20 or higher
- npm (comes with Node.js)
- Upstage API Key (Get yours here)
π» Installation Options
Global Installation (Recommended)
# Clone the repository git clone https://github.com/serithemage/solar-code.git cd solar-code # Install globally make install # Verify installation solar --version
Development Installation
# Clone and setup for development git clone https://github.com/serithemage/solar-code.git cd solar-code # Setup development environment make dev # Install with symlink for development make install-dev
Manual Installation
# Install dependencies and build npm ci npm run build npm run bundle # Install globally npm install -g .
π§ Configuration
API Key Setup
Set your Upstage API key:
# Option 1: Environment variable export UPSTAGE_API_KEY="your_api_key_here" # Option 2: .env file echo "UPSTAGE_API_KEY=your_api_key_here" > .env
Debug Logging
Solar Code provides enhanced debug logging for troubleshooting and development:
# Enable debug mode solar --debug # Save debug output to file DEBUG=true solar --debug 2>&1 | tee solar-debug.log # Filter only Solar API logs DEBUG=true solar --debug 2>&1 | grep -E '(π|π|π)' | tee solar-api-debug.log # Auto-timestamped logs DEBUG=true solar --debug 2>&1 | tee "solar-debug-$(date '+%Y%m%d-%H%M%S').log"
Debug logs include:
- π Solar API requests/responses with timing
- π Streaming API operations
- π Authentication and configuration details
- Performance metrics and usage statistics
β¨ Features
With Solar Code you can:
- Query and edit large codebases with Solar Pro2's advanced language understanding.
- Generate new applications and code with Korean-optimized AI assistance.
- Automate operational tasks like querying pull requests and handling complex rebases.
- Integrate with development workflows using Solar Pro2's powerful code analysis capabilities.
- Use tools and MCP servers to connect new capabilities and extend functionality.
- Leverage Solar Pro2's multilingual support for Korean and English development contexts.
π― Usage
Once installed, start Solar Code:
On first run, set up authentication:
# In Solar CLI, type: /auth # Select "Solar API Key" from the authentication options # Your UPSTAGE_API_KEY will be automatically detected
Verify configuration - you should see "solar-pro2" in the status line.
π οΈ Make Commands
Solar Code includes a comprehensive Makefile for easy development and deployment:
Installation Commands
make install # Build and install Solar Code globally make uninstall # Remove Solar Code from system make install-dev # Install with symlink for development make uninstall-dev # Remove development symlink
Development Commands
make dev # Setup development environment make deps # Install npm dependencies make build # Build the Solar Code CLI make build-all # Build with sandbox support make start # Start in development mode make debug # Start in debug mode
Quality Assurance
make test # Run all tests make lint # Run ESLint checks make lint-fix # Fix linting issues automatically make format # Format code with Prettier make preflight # Run complete quality check pipeline
Utilities
make clean # Remove build artifacts and caches make check # Verify Solar Code installation make help # Show all available commands make solar-retro # Display Solar Code retro logo
Quick Workflows
# Fresh install make clean && make install # Development setup make dev && make install-dev # Quality check before commit make preflight
π Examples
Once Solar Code is running, you can start interacting with Solar Pro2 from your shell.
You can start a project from a new directory:
cd new-project/ solar > Write me a Discord bot that answers questions using a FAQ.md file I will provide
Or work with an existing project:
git clone https://github.com/your-org/your-project cd your-project solar > Give me a summary of all of the changes that went in yesterday
You can also ask in Korean:
> μ΄ μ½λλ² μ΄μ€μ μ£Όμ μν€ν μ²λ₯Ό μ€λͺ ν΄μ£ΌμΈμ > μ±λ₯ μ΅μ νν μ μλ λΆλΆμ μ°Ύμμ£ΌμΈμ
Next steps
- Learn how to contribute to Solar Code development.
- Review the Development Tasks for implementation details.
- Explore the available CLI Commands.
- If you encounter any issues, review the troubleshooting guide.
- For comprehensive documentation, see the full documentation.
- Take a look at some popular tasks for more inspiration.
- Check out the Solar Code PRD for project details.
Troubleshooting
Head over to the troubleshooting guide if you're having issues.
Common Issues:
- API Key Issues: Ensure your
UPSTAGE_API_KEYis set correctly - Authentication Problems: Run
/authcommand and select "Solar API Key" - Debug Information: Use
solar --debugfor detailed logging - Credit Issues: Check your Upstage console at https://console.upstage.ai/billing
Debug Log Analysis: Solar Code provides comprehensive debug logs to help diagnose issues. See the Debug Logging Guide for detailed instructions on collecting and analyzing logs.
GitHub Integration
Solar Code is designed to integrate with GitHub workflows, with GitHub Actions support planned for future releases:
- Pull Request Reviews: AI-powered code review with Solar Pro2's advanced analysis.
- Issue Triage: Automated issue labeling and categorization.
- Korean Language Support: Native Korean language support for Korean development teams.
- Custom Workflows: Extensible workflow automation with Solar Pro2 intelligence.
GitHub Actions integration is coming soon. Stay tuned for updates!
Popular tasks
Explore a new codebase
Start by cding into an existing or newly-cloned repository and running Solar Code.
> Describe the main pieces of this system's architecture.
> μ΄ μμ€ν
μ μ£Όμ μν€ν
μ² κ΅¬μ± μμλ₯Ό μ€λͺ
ν΄μ£ΌμΈμ.
> What security mechanisms are in place?
> μ΄λ€ 보μ λ©μ»€λμ¦μ΄ μ μ©λμ΄ μλμ?
> Provide a step-by-step dev onboarding doc for developers new to the codebase.
> μλ‘μ΄ κ°λ°μλ₯Ό μν λ¨κ³λ³ μ¨λ³΄λ© λ¬Έμλ₯Ό μμ±ν΄μ£ΌμΈμ.
> Summarize this codebase and highlight the most interesting patterns or techniques I could learn from.
> μ΄ μ½λλ² μ΄μ€λ₯Ό μμ½νκ³ λ°°μΈ μ μλ ν₯λ―Έλ‘μ΄ ν¨ν΄μ΄λ κΈ°λ²μ κ°μ‘°ν΄μ£ΌμΈμ.
> Identify potential areas for improvement or refactoring in this codebase.
> μ΄ μ½λλ² μ΄μ€μμ κ°μ μ΄λ 리ν©ν λ§μ΄ νμν μ μ¬μ μμμ μλ³ν΄μ£ΌμΈμ.
> Which parts of this codebase might be challenging to scale or debug?
> μ΄ μ½λλ² μ΄μ€μμ νμ₯μ±μ΄λ λλ²κΉ
μ΄ μ΄λ €μΈ μ μλ λΆλΆμ μ΄λμΈκ°μ?
> Generate a README section for the [module name] module explaining what it does and how to use it.
> [λͺ¨λλͺ
] λͺ¨λμ΄ λ¬΄μμ νλμ§μ μ¬μ© λ°©λ²μ μ€λͺ
νλ README μΉμ
μ μμ±ν΄μ£ΌμΈμ.
Work with your existing code
> Implement a first draft for GitHub issue #123.
> GitHub μ΄μ #123μ λν μ΄κΈ° ꡬνμ μμ±ν΄μ£ΌμΈμ.
> Help me migrate this codebase to the latest version of Java. Start with a plan.
> μ΄ μ½λλ² μ΄μ€λ₯Ό μ΅μ Java λ²μ μΌλ‘ λ§μ΄κ·Έλ μ΄μ
νλ κ²μ λμμ£ΌμΈμ. κ³νλΆν° μΈμμ£ΌμΈμ.
Automate your workflows
Use MCP servers to integrate your local system tools with your enterprise collaboration suite.
> Make me a slide deck showing the git history from the last 7 days, grouped by feature and team member.
> Make a full-screen web app for a wall display to show our most interacted-with GitHub issues.
Interact with your system
> Convert all the images in this directory to png, and rename them to use dates from the exif data.
> Organize my PDF invoices by month of expenditure.
Uninstall
Head over to the Uninstall guide for uninstallation instructions.
Development Status
Solar Code is currently in active development. This project is based on the Gemini CLI architecture and is being adapted to work with Upstage's Solar Pro2 model.
Current Status
- β Architecture analysis complete
- β Development roadmap defined
- β Phase 1: Model integration and authentication (Complete)
- β Enhanced debug logging and monitoring
- β ASCII art display and branding
- π Testing and quality improvements in progress
- β³ Phase 2-5: Advanced features coming soon
Recent Updates
- Enhanced Debug Logging: Comprehensive API request/response monitoring with performance metrics
- Authentication Integration: Full Solar Pro2 API authentication with Korean error messages
- Improved Troubleshooting: Advanced debug log collection and analysis tools
- ASCII Art Fixes: Consistent branding and display across all terminal sizes
For detailed development progress, see Development Tasks.
Contributing
We welcome contributions to Solar Code! Please see our Contributing Guide for details on:
- Setting up the development environment
- Understanding the codebase architecture
- Submitting pull requests
- Development workflow and testing
Security
Please see our security disclosure process for reporting security issues.
