Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 111 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# 🚀 Syncable IaC CLI

> Automatically generate optimized Docker, Kubernetes, and cloud infrastructure configurations by analyzing your codebase.
> Automatically generate optimized Docker, Kubernetes, and cloud infrastructure configurations by analyzing your codebase.

[![Rust](https://img.shields.io/badge/rust-%23000000.svg?style=for-the-badge&logo=rust&logoColor=white)](https://www.rust-lang.org/)
Expand All @@ -8,12 +9,20 @@

**Syncable IaC CLI** analyzes your project and automatically generates production-ready infrastructure configurations. Supporting **260+ technologies** across 5 major language ecosystems, it understands your stack and creates optimized IaC files tailored to your specific needs.

## ⚡ Quick Start
[![Crates.io Downloads](https://img.shields.io/crates/d/syncable-cli)](https://crates.io/crates/syncable-cli)

**Syncable IaC CLI** analyzes your project and automatically generates production-ready infrastructure configurations. Supporting **260+ technologies** across 5 major language ecosystems, it understands your stack and creates optimized IaC files tailored to your specific needs.

## ⚡ Quick Start

```bash
# Install
# Install
cargo install syncable-cli

# Analyze any project

# Analyze any project
sync-ctl analyze /path/to/your/project

Expand All @@ -22,9 +31,12 @@ sync-ctl vulnerabilities

# Run security analysis
sync-ctl security

# Force update check (clears cache)
sync-ctl --clear-update-cache analyze .
```

That's it! The CLI will detect your languages, frameworks, dependencies, and provide detailed insights about your project structure.
That's it! The CLI will detect your languages, frameworks, dependencies, and provide detailed insights about your project structure. The tool includes smart update notifications to keep you on the latest version.

## 🎯 What It Does

Expand Down Expand Up @@ -76,6 +88,12 @@ $ sync-ctl analyze ./my-express-app
- **Service mapping** - Traces dependencies between containers
- **Network topology** - Visualizes service communication

### 🔄 Smart Update System
- **Intelligent caching** - Checks every 2 hours when no update available
- **Immediate notifications** - Shows updates instantly when available
- **Clear instructions** - Provides multiple update methods with step-by-step guidance
- **Zero-maintenance** - Automatically keeps you informed of new releases

## 🛠️ Installation

### Via Cargo (Recommended)
Expand All @@ -92,6 +110,19 @@ cargo install --path .

## 📖 Usage Guide

### Basic Commands
cargo install syncable-cli
```

### From Source
```bash
git clone https://github.com/syncable-dev/syncable-cli.git
cd syncable-cli
cargo install --path .
```

## 📖 Usage Guide

### Basic Commands

```bash
Expand All @@ -118,8 +149,33 @@ Choose the output format that works best for you:
- **Summary** - Brief overview for CI/CD
- **JSON** - Machine-readable format

### Advanced Configuration
# Analyze with different display formats
sync-ctl analyze # Matrix view (default)
sync-ctl analyze --display detailed # Detailed view
sync-ctl analyze --json # JSON output

# Security & vulnerability checks
sync-ctl security # Comprehensive security analysis
sync-ctl vulnerabilities # Dependency vulnerability scan

# Dependency analysis
sync-ctl dependencies --licenses # Show license information
sync-ctl dependencies --vulnerabilities # Check for known CVEs
```

### Display Modes

Choose the output format that works best for you:

- **Matrix** (default) - Compact dashboard view
- **Detailed** - Comprehensive vertical layout
- **Summary** - Brief overview for CI/CD
- **JSON** - Machine-readable format

### Advanced Configuration

Create `.syncable.toml` in your project root:
Create `.syncable.toml` in your project root:

```toml
Expand Down Expand Up @@ -172,31 +228,85 @@ check_secrets = true
- CI/CD pipeline generation
- Real-time monitoring setup

[security]
fail_on_high_severity = true
check_secrets = true
```

## 🌟 Technology Coverage

<details>
<summary><b>View Supported Technologies (260+)</b></summary>

### By Language

- **JavaScript/TypeScript** (46) - React, Vue, Angular, Next.js, Express, Nest.js, and more
- **Python** (76) - Django, Flask, FastAPI, NumPy, TensorFlow, PyTorch, and more
- **Java/JVM** (98) - Spring Boot, Micronaut, Hibernate, Kafka, Elasticsearch, and more
- **Go** (21) - Gin, Echo, Fiber, gRPC, Kubernetes client, and more
- **Rust** (20) - Actix-web, Axum, Rocket, Tokio, SeaORM, and more

### Package Managers
- npm, yarn, pnpm, bun (JavaScript)
- pip, poetry, pipenv, conda (Python)
- Maven, Gradle (Java)
- Cargo (Rust)
- Go modules (Go)

</details>

## 🚀 Roadmap

### ✅ Phase 1: Analysis Engine (Complete)
- Project analysis and technology detection
- Vulnerability scanning
- Basic security analysis

### 🔄 Phase 2: AI-Powered Generation (In Progress)
- Smart Dockerfile generation
- Intelligent Docker Compose creation
- Cloud-optimized configurations

### 📅 Future Phases
- Kubernetes manifests & Helm charts
- Terraform modules for AWS/GCP/Azure
- CI/CD pipeline generation
- Real-time monitoring setup

## 🤝 Contributing

We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

```bash
# Run tests
cargo test

# Check code quality
cargo clippy
# Check code quality
cargo clippy

# Format code
cargo fmt
```
```

## 📄 License

MIT License - see [LICENSE](LICENSE) for details.
MIT License - see [LICENSE](LICENSE) for details.

## 🙏 Acknowledgments

Built with Rust 🦀 and powered by the open-source community.
Built with Rust 🦀 and powered by the open-source community.

---

**Need help?** Check our [documentation](https://github.com/syncable-dev/syncable-cli/wiki) or [open an issue](https://github.com/syncable-dev/syncable-cli/issues).

[![Star on GitHub](https://img.shields.io/github/stars/syncable-dev/syncable-cli?style=social)](https://github.com/syncable-dev/syncable-cli)
**Need help?** Check our [documentation](https://github.com/syncable-dev/syncable-cli/wiki) or [open an issue](https://github.com/syncable-dev/syncable-cli/issues).

[![Star on GitHub](https://img.shields.io/github/stars/syncable-dev/syncable-cli?style=social)](https://github.com/syncable-dev/syncable-cli)
12 changes: 6 additions & 6 deletions src/analyzer/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ impl ContentLine {
}

/// Box drawer that pre-calculates optimal dimensions
struct BoxDrawer {
pub struct BoxDrawer {
title: String,
lines: Vec<ContentLine>,
min_width: usize,
max_width: usize,
}

impl BoxDrawer {
fn new(title: &str) -> Self {
pub fn new(title: &str) -> Self {
Self {
title: title.to_string(),
lines: Vec::new(),
Expand All @@ -65,15 +65,15 @@ impl BoxDrawer {
}
}

fn add_line(&mut self, label: &str, value: &str, label_colored: bool) {
pub fn add_line(&mut self, label: &str, value: &str, label_colored: bool) {
self.lines.push(ContentLine::new(label, value, label_colored));
}

fn add_value_only(&mut self, value: &str) {
pub fn add_value_only(&mut self, value: &str) {
self.lines.push(ContentLine::new("", value, false));
}

fn add_separator(&mut self) {
pub fn add_separator(&mut self) {
self.lines.push(ContentLine::separator());
}

Expand Down Expand Up @@ -130,7 +130,7 @@ impl BoxDrawer {
}

/// Draw the complete box
fn draw(&self) -> String {
pub fn draw(&self) -> String {
let box_width = self.calculate_optimal_width();
let content_width = box_width - 4; // Available space for content

Expand Down
Loading