Contributing to StackAI CLI
Table of Contents
Prerequisites
Required Tools
Tool
Version
Installation
Recommended Tools
Tool
Purpose
Installation
Quick Start
Using Cargo Aliases
Quality Checks
Testing
CI Commands
Development
Documentation
Dependencies
Building for Production
Local Development Workflow
Method 1: cargo run (Recommended)
cargo run (Recommended)Method 2: Build and Run Binary
Method 3: Install Locally
Fast Iteration with Bacon
Testing Strategy
Unit Tests
Documentation Tests
Using cargo-nextest (3x Faster)
Integration Testing for CLI Commands
Code Quality Checks
Full CI Check (What the Pre-commit Hook Runs)
Individual Checks
Safe Testing (Isolated Environment)
Use XDG_CONFIG_HOME for Isolation
Test Script
Testing Docker-Dependent Commands
Adding a New Command
1. Define in cli.rs
cli.rs2. Create Implementation
3. Export in mod.rs
4. Wire Up Dispatch
5. Add Tests
6. Test Locally
Pull Request Workflow
Branch Naming
Commit Messages
Before Pushing
PR Checklist
Debugging Tips
Enable Debug Logging
Debug Output in Code
VS Code Debugging
Build Performance
Linker (Linux)
Linker (macOS)
Reduce Debug Info
Incremental Compilation
Common Issues
"Docker daemon not running"
"Permission denied" for Docker
Clippy Warnings
Test Failures
Pre-commit Hook Failures
Build Cache Issues
Project Structure
Getting Help
Last updated
Was this helpful?

