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
3 changes: 1 addition & 2 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ t = "test"
tr = "test --release"
r = "run"
rr = "run --release"
fmt = "fmt --all"
clippy = "clippy --all-targets --all-features"
# Note: cargo fmt and clippy aliases removed - were recursive and broke CI
72 changes: 72 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: CI

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
# Override target-cpu=native from .cargo/config.toml (breaks CI runners)
RUSTFLAGS: ""

jobs:
build:
name: Build & Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [stable]

steps:
- uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: clippy, rustfmt

- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-

- name: Check formatting
if: matrix.os == 'ubuntu-latest'
run: cargo fmt --all -- --check

- name: Build
run: cargo build --verbose

- name: Run tests
run: cargo test --verbose

- name: Clippy
if: matrix.os == 'ubuntu-latest'
run: cargo clippy -- -D warnings

# Security audit
security:
name: Security Audit
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: rustsec/audit-check@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
# Only fail on actual vulnerabilities, not unmaintained warnings
ignore: RUSTSEC-2020-0163,RUSTSEC-2024-0320,RUSTSEC-2025-0057,RUSTSEC-2025-0074,RUSTSEC-2025-0075,RUSTSEC-2025-0080,RUSTSEC-2025-0081,RUSTSEC-2025-0098,RUSTSEC-2025-0104,RUSTSEC-2025-0134
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,4 @@ syncable-ide-companion/*.vsix
syncable-ide-companion/node_modules/
syncable-ide-companion/dist/

syncable-cli.tape
syncable-cli-demo.gif
syncable-cli.tape
45 changes: 36 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ clap = { version = "4", features = ["derive", "env", "cargo"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_yaml = "0.9"
yaml-rust2 = "0.9" # YAML parsing with position tracking for dclint
toml = "0.9"
log = "0.4"
env_logger = "0.11"
Expand Down
43 changes: 21 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,20 @@
</p>

<p align="center">
<!-- Build & Quality -->
<a href="https://github.com/syncable-dev/syncable-cli/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/syncable-dev/syncable-cli/ci.yml?branch=main&style=flat-square&label=CI" alt="CI Status"></a>
<a href="https://crates.io/crates/syncable-cli"><img src="https://img.shields.io/crates/v/syncable-cli?style=flat-square&color=blue" alt="Crates.io"></a>
<a href="https://docs.rs/syncable-cli"><img src="https://img.shields.io/docsrs/syncable-cli?style=flat-square&label=docs.rs" alt="docs.rs"></a>
<br>
<!-- Downloads & Community -->
<a href="https://crates.io/crates/syncable-cli"><img src="https://img.shields.io/crates/d/syncable-cli?style=flat-square" alt="Downloads"></a>
<a href="https://github.com/syncable-dev/syncable-cli/stargazers"><img src="https://img.shields.io/github/stars/syncable-dev/syncable-cli?style=flat-square" alt="GitHub Stars"></a>
<a href="https://github.com/syncable-dev/syncable-cli/commits/main"><img src="https://img.shields.io/github/last-commit/syncable-dev/syncable-cli?style=flat-square" alt="Last Commit"></a>
<br>
<!-- Tech Stack -->
<a href="https://www.gnu.org/licenses/gpl-3.0"><img src="https://img.shields.io/badge/License-GPL%20v3-blue.svg?style=flat-square" alt="License"></a>
<a href="https://www.rust-lang.org/"><img src="https://img.shields.io/badge/Built%20with-Rust-orange?style=flat-square" alt="Rust"></a>
<a href="https://www.rust-lang.org/"><img src="https://img.shields.io/badge/Rust-1.85+-orange?style=flat-square&logo=rust" alt="Rust 1.85+"></a>
<a href="https://github.com/syncable-dev/syncable-cli"><img src="https://img.shields.io/badge/Platform-Linux%20%7C%20macOS%20%7C%20Windows-lightgrey?style=flat-square" alt="Platform"></a>
</p>

<p align="center">
Expand All @@ -33,25 +43,9 @@

**Stop copy-pasting Dockerfiles from Stack Overflow.** Syncable CLI is an AI-powered assistant that understands your codebase and generates production-ready infrastructure — Dockerfiles, Kubernetes manifests, Terraform configs, and CI/CD pipelines — tailored specifically to your project.

```bash
$ sync-ctl chat
🤖 Syncable Agent powered by Claude

You: Create a production Dockerfile for this project

Agent: I've analyzed your Express.js + TypeScript project. Here's an optimized
multi-stage Dockerfile with:
✓ Non-root user for security
✓ Layer caching for faster builds
✓ Health checks configured
✓ Production dependencies only

[Creates Dockerfile with VS Code diff view]

You: Now add Redis caching and create a docker-compose

Agent: I'll add Redis to your stack and create a compose file...
```
<p align="center">
<img src="syncable-cli-demo.gif" alt="Syncable CLI Demo" width="800" />
</p>

## ⚡ Quick Start

Expand Down Expand Up @@ -249,8 +243,13 @@ See [LICENSE](LICENSE) for the full license text.

The Dockerfile linting functionality (`src/analyzer/hadolint/`) is a Rust translation
of [Hadolint](https://github.com/hadolint/hadolint), originally written in Haskell by
Lukas Martinelli and contributors. See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)
for full attribution details.
Lukas Martinelli and contributors.

The Docker Compose linting functionality (`src/analyzer/dclint/`) is a Rust implementation
inspired by [docker-compose-linter](https://github.com/zavoloklom/docker-compose-linter)
by Sergey Suspended.

See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for full attribution details.

---

Expand Down
45 changes: 41 additions & 4 deletions THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,42 @@ https://www.gnu.org/licenses/gpl-3.0.en.html

---

## Docker Compose Linter

The Docker Compose linting functionality in `src/analyzer/dclint/` is a Rust
implementation inspired by the docker-compose-linter project.

**Original Project:** [docker-compose-linter](https://github.com/zavoloklom/docker-compose-linter)

**Original Author:** Sergey Suspended (zavoloklom)

**Original License:** MIT License

**Original Copyright:**
```
Copyright (c) 2024 Sergey Suspended
```

**What was implemented:**
- Docker Compose YAML validation logic
- Lint rule concepts (DCL001-DCL015 series)
- Service configuration validation patterns
- Best practices enforcement

**Modifications made:**
- Complete implementation in Rust (original was TypeScript)
- Integration with Syncable-CLI's agent and tool system
- Native async support for streaming output
- Adaptation to Rust error handling patterns
- Additional rules and improvements specific to Syncable's use cases

**License Notice:**
The original docker-compose-linter is licensed under MIT. Our Rust implementation
is original code inspired by the rule concepts and validation patterns from the
original project.

---

## ShellCheck (Rule Concepts)

Some shell-related lint rules are inspired by ShellCheck.
Expand All @@ -65,10 +101,11 @@ concepts and documentation.

## Acknowledgments

We are grateful to the open source community and the authors of Hadolint for
creating and maintaining excellent Dockerfile linting tools. This translation
to Rust allows native integration with Syncable-CLI while preserving the
valuable rule definitions and linting logic developed by the original authors.
We are grateful to the open source community and the authors of Hadolint and
docker-compose-linter for creating and maintaining excellent container configuration
linting tools. These Rust implementations allow native integration with Syncable-CLI
while preserving the valuable rule definitions and linting logic developed by the
original authors.

If you are the author of any software mentioned here and believe the attribution
is incorrect or incomplete, please open an issue at:
Expand Down
Loading
Loading