Skip to content

Commit d3868a3

Browse files
committed
docs: update README and CLI documentation for clarity and completeness
- Enhance README with a comprehensive documentation section, including links to language reference, CLI reference, SDK guide, tutorials, error reference, migration guide, contributing guide, architecture, and specification. - Improve CLI_REFERENCE.md with detailed installation instructions, global options, command descriptions, and examples for `ctst build`, `ctst plan`, and `ctst run`. - Revise CTST_LANG.md to clarify syntax and design philosophy, and expand on the quick start guide with a complete example. - Update SDK_GUIDE.md to provide a clearer overview of the SDK, installation instructions, and a quick start example for using the ContainerBuilder.
1 parent ac3c0ef commit d3868a3

21 files changed

Lines changed: 6240 additions & 186 deletions

README.md

Lines changed: 64 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,41 @@ The `ctst` command is the single entry point for all container operations:
143143
| `--offline` | Block all outbound network access (build and run) |
144144
| `--state-file <path>` | Custom path to the state index file |
145145

146-
See [docs/CLI_REFERENCE.md](docs/CLI_REFERENCE.md) for detailed usage and examples.
146+
See [docs/CLI_REFERENCE.md](docs/CLI_REFERENCE.md) for the complete CLI manual with output formats, exit codes, and troubleshooting.
147+
148+
---
149+
150+
## Documentation
151+
152+
| Document | Description |
153+
|---|---|
154+
| [`.ctst` Language Reference](docs/CTST_LANG.md) | Complete language specification — all keywords, types, syntax, protocols, and examples |
155+
| [CLI Reference](docs/CLI_REFERENCE.md) | Full `ctst` command manual — every flag, output format, exit code, troubleshooting |
156+
| [SDK Guide](docs/SDK_GUIDE.md) | Rust SDK API reference — `ContainerBuilder`, `GraphResolver`, `EventListener`, types, errors |
157+
| [Tutorials](docs/TUTORIALS.md) | 9 step-by-step tutorials from Hello World to SDK integration |
158+
| [Error Reference](docs/ERRORS.md) | Catalog of all error codes (parse, runtime, image, state) with causes and resolutions |
159+
| [Migration from Docker](docs/MIGRATION_FROM_DOCKER.md) | Docker Compose to `.ctst` conversion guide with side-by-side examples |
160+
| [Contributing Guide](docs/CONTRIBUTING.md) | Development setup, coding standards, how to add commands/keywords/backends |
161+
| [Architecture](ARCHITECTURE.md) | Crate dependency DAG, layer responsibilities, design decisions |
162+
| [Specification](docs/SPEC.md) | Technical specification — vision, engine design, security model |
163+
164+
### Examples
165+
166+
The `examples/` directory contains ready-to-use `.ctst` composition files and Rust SDK examples:
167+
168+
| Example | What it demonstrates |
169+
|---|---|
170+
| [`hello_world.ctst`](examples/hello_world.ctst) | Minimal single container |
171+
| [`nginx_static.ctst`](examples/nginx_static.ctst) | Web server with volume mount and port exposure |
172+
| [`full_stack.ctst`](examples/full_stack.ctst) | API + PostgreSQL + Redis + worker with `CONNECT` auto-wiring |
173+
| [`microservices.ctst`](examples/microservices.ctst) | 5+ services with complex dependency graph |
174+
| [`offline_deployment.ctst`](examples/offline_deployment.ctst) | Air-gapped deployment with `tar://` sources |
175+
| [`secrets_example.ctst`](examples/secrets_example.ctst) | Secret injection patterns |
176+
| [`healthcheck_example.ctst`](examples/healthcheck_example.ctst) | Health checks and restart policies |
177+
| [`templates/`](examples/templates/) | Reusable templates (PostgreSQL, Redis, nginx) |
178+
| [`sdk_lifecycle.rs`](examples/sdk_lifecycle.rs) | Container lifecycle via Rust SDK |
179+
| [`sdk_composition.rs`](examples/sdk_composition.rs) | Loading `.ctst` files via SDK |
180+
| [`sdk_monitoring.rs`](examples/sdk_monitoring.rs) | Event monitoring via SDK |
147181

148182
---
149183

@@ -286,33 +320,47 @@ cargo check --workspace
286320

287321
```
288322
Containust/
289-
├── Cargo.toml # Workspace manifest
290-
├── crates/ # All library and binary crates
291-
│ ├── containust-common/ # Shared types, errors, constants
292-
│ ├── containust-core/ # Linux isolation primitives
293-
│ ├── containust-image/ # Image/layer management
294-
│ ├── containust-runtime/ # Container lifecycle
295-
│ ├── containust-compose/ # .ctst parser + dependency graph
296-
│ ├── containust-ebpf/ # eBPF observability
297-
│ ├── containust-sdk/ # Public Rust SDK
298-
│ ├── containust-tui/ # Terminal dashboard
299-
│ └── containust-cli/ # ctst binary
300-
├── docs/ # Specification, language ref, SDK guide
301-
├── tests/integration/ # Integration tests
302-
└── examples/ # Example .ctst files and SDK usage
323+
├── Cargo.toml # Workspace manifest
324+
├── crates/ # All library and binary crates
325+
│ ├── containust-common/ # Shared types, errors, constants
326+
│ ├── containust-core/ # Linux isolation primitives
327+
│ ├── containust-image/ # Image/layer management
328+
│ ├── containust-runtime/ # Container lifecycle
329+
│ ├── containust-compose/ # .ctst parser + dependency graph
330+
│ ├── containust-ebpf/ # eBPF observability
331+
│ ├── containust-sdk/ # Public Rust SDK
332+
│ ├── containust-tui/ # Terminal dashboard
333+
│ └── containust-cli/ # ctst binary
334+
├── docs/ # Documentation
335+
│ ├── CTST_LANG.md # .ctst language reference
336+
│ ├── CLI_REFERENCE.md # CLI manual
337+
│ ├── SDK_GUIDE.md # Rust SDK guide
338+
│ ├── TUTORIALS.md # Step-by-step tutorials
339+
│ ├── ERRORS.md # Error code reference
340+
│ ├── CONTRIBUTING.md # Contributor guide
341+
│ ├── MIGRATION_FROM_DOCKER.md # Docker Compose migration
342+
│ └── SPEC.md # Technical specification
343+
├── examples/ # Example files
344+
│ ├── templates/ # Reusable .ctst templates
345+
│ ├── *.ctst # Composition examples
346+
│ └── *.rs # Rust SDK examples
347+
├── tests/integration/ # Integration tests
348+
└── ARCHITECTURE.md # Crate architecture
303349
```
304350

305351
---
306352

307353
## Contributing
308354

309-
Contributions are welcome. Please read the [ARCHITECTURE.md](ARCHITECTURE.md) and the [Cursor rules](.cursor/rules/) before submitting code.
355+
Contributions are welcome. Please read the [Contributing Guide](docs/CONTRIBUTING.md) before submitting code.
310356

311357
1. Fork the repository
312358
2. Create a feature branch (`git checkout -b feat/my-feature`)
313359
3. Ensure `cargo test --workspace`, `cargo clippy --workspace -- -D warnings`, and `cargo fmt --all --check` pass
314360
4. Submit a pull request
315361

362+
See also: [ARCHITECTURE.md](ARCHITECTURE.md) | [Error Reference](docs/ERRORS.md) | [Cursor rules](.cursor/rules/)
363+
316364
---
317365

318366
## License

0 commit comments

Comments
 (0)