Skip to content

Commit 9c968d5

Browse files
authored
Merge pull request #240 from syncable-dev/develop
Develop
2 parents 5292f6b + d9b9310 commit 9c968d5

264 files changed

Lines changed: 18319 additions & 6718 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cargo/config.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ t = "test"
99
tr = "test --release"
1010
r = "run"
1111
rr = "run --release"
12-
fmt = "fmt --all"
13-
clippy = "clippy --all-targets --all-features"
12+
# Note: cargo fmt and clippy aliases removed - were recursive and broke CI

.github/workflows/ci.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUST_BACKTRACE: 1
12+
# Override target-cpu=native from .cargo/config.toml (breaks CI runners)
13+
RUSTFLAGS: ""
14+
15+
jobs:
16+
build:
17+
name: Build & Test
18+
runs-on: ${{ matrix.os }}
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
os: [ubuntu-latest, macos-latest, windows-latest]
23+
rust: [stable]
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- name: Install Rust toolchain
29+
uses: dtolnay/rust-toolchain@master
30+
with:
31+
toolchain: ${{ matrix.rust }}
32+
components: clippy, rustfmt
33+
34+
- name: Cache cargo registry
35+
uses: actions/cache@v4
36+
with:
37+
path: |
38+
~/.cargo/registry
39+
~/.cargo/git
40+
target
41+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
42+
restore-keys: |
43+
${{ runner.os }}-cargo-
44+
45+
- name: Check formatting
46+
if: matrix.os == 'ubuntu-latest'
47+
run: cargo fmt --all -- --check
48+
49+
- name: Build
50+
run: cargo build --verbose
51+
52+
- name: Run tests
53+
run: cargo test --verbose
54+
55+
- name: Clippy
56+
if: matrix.os == 'ubuntu-latest'
57+
run: cargo clippy -- -D warnings
58+
59+
# Security audit
60+
security:
61+
name: Security Audit
62+
runs-on: ubuntu-latest
63+
permissions:
64+
checks: write
65+
contents: read
66+
steps:
67+
- uses: actions/checkout@v4
68+
- uses: rustsec/audit-check@v2
69+
with:
70+
token: ${{ secrets.GITHUB_TOKEN }}
71+
# Only fail on actual vulnerabilities, not unmaintained warnings
72+
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

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,4 @@ syncable-ide-companion/*.vsix
3838
syncable-ide-companion/node_modules/
3939
syncable-ide-companion/dist/
4040

41-
syncable-cli.tape
42-
syncable-cli-demo.gif
41+
syncable-cli.tape

Cargo.lock

Lines changed: 36 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ clap = { version = "4", features = ["derive", "env", "cargo"] }
2525
serde = { version = "1", features = ["derive"] }
2626
serde_json = "1"
2727
serde_yaml = "0.9"
28+
yaml-rust2 = "0.9" # YAML parsing with position tracking for dclint
2829
toml = "0.9"
2930
log = "0.4"
3031
env_logger = "0.11"

README.md

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,20 @@
99
</p>
1010

1111
<p align="center">
12+
<!-- Build & Quality -->
13+
<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>
1214
<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>
15+
<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>
16+
<br>
17+
<!-- Downloads & Community -->
1318
<a href="https://crates.io/crates/syncable-cli"><img src="https://img.shields.io/crates/d/syncable-cli?style=flat-square" alt="Downloads"></a>
19+
<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>
20+
<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>
21+
<br>
22+
<!-- Tech Stack -->
1423
<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>
15-
<a href="https://www.rust-lang.org/"><img src="https://img.shields.io/badge/Built%20with-Rust-orange?style=flat-square" alt="Rust"></a>
24+
<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>
25+
<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>
1626
</p>
1727

1828
<p align="center">
@@ -33,25 +43,9 @@
3343

3444
**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.
3545

36-
```bash
37-
$ sync-ctl chat
38-
🤖 Syncable Agent powered by Claude
39-
40-
You: Create a production Dockerfile for this project
41-
42-
Agent: I've analyzed your Express.js + TypeScript project. Here's an optimized
43-
multi-stage Dockerfile with:
44-
✓ Non-root user for security
45-
✓ Layer caching for faster builds
46-
✓ Health checks configured
47-
✓ Production dependencies only
48-
49-
[Creates Dockerfile with VS Code diff view]
50-
51-
You: Now add Redis caching and create a docker-compose
52-
53-
Agent: I'll add Redis to your stack and create a compose file...
54-
```
46+
<p align="center">
47+
<img src="syncable-cli-demo.gif" alt="Syncable CLI Demo" width="800" />
48+
</p>
5549

5650
## ⚡ Quick Start
5751

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

250244
The Dockerfile linting functionality (`src/analyzer/hadolint/`) is a Rust translation
251245
of [Hadolint](https://github.com/hadolint/hadolint), originally written in Haskell by
252-
Lukas Martinelli and contributors. See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)
253-
for full attribution details.
246+
Lukas Martinelli and contributors.
247+
248+
The Docker Compose linting functionality (`src/analyzer/dclint/`) is a Rust implementation
249+
inspired by [docker-compose-linter](https://github.com/zavoloklom/docker-compose-linter)
250+
by Sergey Suspended.
251+
252+
See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for full attribution details.
254253

255254
---
256255

THIRD_PARTY_NOTICES.md

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,42 @@ https://www.gnu.org/licenses/gpl-3.0.en.html
4747

4848
---
4949

50+
## Docker Compose Linter
51+
52+
The Docker Compose linting functionality in `src/analyzer/dclint/` is a Rust
53+
implementation inspired by the docker-compose-linter project.
54+
55+
**Original Project:** [docker-compose-linter](https://github.com/zavoloklom/docker-compose-linter)
56+
57+
**Original Author:** Sergey Suspended (zavoloklom)
58+
59+
**Original License:** MIT License
60+
61+
**Original Copyright:**
62+
```
63+
Copyright (c) 2024 Sergey Suspended
64+
```
65+
66+
**What was implemented:**
67+
- Docker Compose YAML validation logic
68+
- Lint rule concepts (DCL001-DCL015 series)
69+
- Service configuration validation patterns
70+
- Best practices enforcement
71+
72+
**Modifications made:**
73+
- Complete implementation in Rust (original was TypeScript)
74+
- Integration with Syncable-CLI's agent and tool system
75+
- Native async support for streaming output
76+
- Adaptation to Rust error handling patterns
77+
- Additional rules and improvements specific to Syncable's use cases
78+
79+
**License Notice:**
80+
The original docker-compose-linter is licensed under MIT. Our Rust implementation
81+
is original code inspired by the rule concepts and validation patterns from the
82+
original project.
83+
84+
---
85+
5086
## ShellCheck (Rule Concepts)
5187

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

66102
## Acknowledgments
67103

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

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

0 commit comments

Comments
 (0)