{"id":44027977,"url":"https://github.com/useblocks/x-as-code","last_synced_at":"2026-02-07T18:14:41.222Z","repository":{"id":333689280,"uuid":"1135532603","full_name":"useblocks/x-as-code","owner":"useblocks","description":"Showcase repository for x-as-code","archived":false,"fork":false,"pushed_at":"2026-01-30T09:13:26.000Z","size":17579,"stargazers_count":2,"open_issues_count":19,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-31T01:05:59.328Z","etag":null,"topics":["safety-critical","sphinx","sphinx-doc","sphinx-needs","useblocks","x-as-code"],"latest_commit_sha":null,"homepage":"https://x-as-code.useblocks.com/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/useblocks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-16T08:26:17.000Z","updated_at":"2026-01-30T09:13:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/useblocks/x-as-code","commit_stats":null,"previous_names":["useblocks/x-as-code"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/useblocks/x-as-code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/useblocks%2Fx-as-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/useblocks%2Fx-as-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/useblocks%2Fx-as-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/useblocks%2Fx-as-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/useblocks","download_url":"https://codeload.github.com/useblocks/x-as-code/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/useblocks%2Fx-as-code/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29203504,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T17:44:10.191Z","status":"ssl_error","status_checked_at":"2026-02-07T17:44:07.936Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["safety-critical","sphinx","sphinx-doc","sphinx-needs","useblocks","x-as-code"],"created_at":"2026-02-07T18:14:40.182Z","updated_at":"2026-02-07T18:14:41.217Z","avatar_url":"https://github.com/useblocks.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# X-as-Code: Everything as Code\n\nWebsite: http://x-as-code.useblocks.com/\n\n## Usage\n\n### Requirements\n\n- [Docker](https://www.docker.com/get-started/) installed\n- [Visual Studio Code](https://code.visualstudio.com/)\n\nOr use GitHub Codespaces and just run the devcontainer\n\nMake sure the ubCode environment variables are available as specified here: \n\n## Whats inside?\n\n### Devcontainer\n\n- ubcode\n- graphviz\n- CMake\n\n### Demo Sphinx \u0026 Sphinx-Needs Project\n\n### Demo C++ Project\n\nDemonstrating Codelinks \u0026 Test-Reports\n\n### Build Scripts\n\nThe project includes several build scripts to help you build different components:\n\n| Script | Purpose | Description |\n|--------|---------|-------------|\n| `./scripts/build.sh` | **Full build** | Builds documentation, C++ executable, and runs unit tests |\n| `./scripts/build_app.sh` | **C++ only** | Builds the C++ project and runs tests |\n| `./scripts/build_doc.sh` | **Docs only** | Builds the Sphinx + Sphinx-Needs documentation |\n| `./scripts/test_with_coverage.sh` | **Tests with coverage** | Builds C++ project, runs tests, and generates code coverage report |\n| `./scripts/clean.sh` | **Clean** | Removes all build artifacts |\n| `./scripts/run_http_server.sh` | **Server generated HTML files** | Opens a http server and servers the generated html files. With this method you can view the generated html files also when developing in Codespaces |\n\n\n#### Quick Start\n\nFor first-time setup or complete rebuild:\n\n```shell\n./scripts/build.sh\n```\n\n#### Targeted Builds\n\nBuild only the C++ application and tests:\n\n```shell\n./scripts/build_app.sh\n```\n\nBuild only the documentation:\n\n```shell\n./scripts/build_doc.sh\n```\n\nRun tests with code coverage:\n\n```shell\n./scripts/test_with_coverage.sh\n```\n\nThis will generate a coverage report in `src/build/coverage_html/index.html`.\n\nClean all build artifacts:\n\n```shell\n./scripts/clean.sh\n```\n\n\u003e **💡 Tip**: Use `./scripts/build.sh` for your first build, then use targeted scripts for faster incremental builds during development.\n\n#### Viewing created HTML pages\n\n```shell\n./scripts/run_http_server.sh\n```\n\n## Build with Codespaces\n\nGitHub Codespaces provides a cloud-based development environment that comes pre-configured with all the tools needed for this project.\n\n### Prerequisites\n\nBefore using Codespaces, you need to configure the required environment variables as Codespace secrets:\n\n1. **Navigate to your GitHub user settings**\n2. **Go to Settings → Code, planning, and automation → Codespaces**\n3. **Add the following Codespace user secrets** and assign them to the correct repository:\n   - `UBCODE_LICENSE_KEY`: Your ubCode license key\n   - `UBCODE_LICENSE_USER`: Your registered email address\n\nThis is also described here in more detail: https://docs.github.com/en/codespaces/managing-your-codespaces/managing-your-account-specific-secrets-for-github-codespaces\n\n\u003e **⚠️ Important**: These secrets are required for the ubCode extension to function properly. Without them, the extension is not working.\n\n### Getting Started with Codespaces\n\n1. **Open in Codespaces**\n   - Navigate to the GitHub repository\n   - Click the green **Code** button\n   - Select the **Codespaces** tab\n   - Click **Create codespace on main** (or any other branch you prefer)\n\n2. **Automatic Setup**\n   - The devcontainer will automatically install:\n     - Python environment with uv package manager\n     - Java (for PlantUML diagrams)\n     - Graphviz (for diagram generation)\n     - CMake (for C++ project builds)\n     - ubCode VS Code extension\n     - Python VS Code extension\n\n3. **First Build**\n   Once the codespace is ready, run the full build:\n   ```shell\n   ./scripts/build.sh\n   ```\n\n### What's Included in the Codespace\n\nThe devcontainer includes:\n- **Base Image**: Ubuntu 24.04.2 LTS\n- **Tools**: Git, curl, wget, and other essential CLI tools\n- **Development Environment**: Pre-configured VS Code with extensions\n- **Build Tools**: CMake, Graphviz, Java, uv for the complete toolchain\n\n### Working with the Project\n\nAfter the codespace starts:\n\n1. **Build the documentation**:\n   ```shell\n   ./scripts/build_doc.sh\n   ```\n\n2. **Build the C++ project**:\n   ```shell\n   ./scripts/build_app.sh\n   ```\n\n3. **View the documentation**:\n   - Open the generated HTML files using:\n   ```shell\n   \"$BROWSER\" docs/_build/html/index.html\n   ```\n\n4. **Clean build artifacts**:\n   ```shell\n   ./scripts/clean.sh\n   ```\n\n### Environment Variables\n\nThe following environment variables need to be available for the Codespace:\n\n- `UBCODE_LICENSE_KEY`: Your ubCode license key (from secrets)\n- `UBCODE_LICENSE_USER`: Your registered email (from secrets)\n\nPlease checkout [this page](https://docs.github.com/en/codespaces/managing-your-codespaces/managing-your-account-specific-secrets-for-github-codespaces#adding-a-secret) on how to add account specific secrets\n\nWith settings these variables the `ubcode.toml` file is not necessary anymore for the ubCode extension functionality.\n\n### Alternative: Manual Environment Setup\n\nIf you prefer to set environment variables manually in the CLI (for testing or local development):\n\n```shell\nexport UBCODE_LICENSE_KEY=\"your-license-key\"\nexport UBCODE_LICENSE_USER=\"your-email@example.com\"\n```\n\n### Customizing the Environment\n\nThe devcontainer configuration is defined in [.devcontainer/devcontainer.json](.devcontainer/devcontainer.json). You can modify:\n\n- **Additional tools**: Edit [`scripts/postCreateCommand.sh`](scripts/postCreateCommand.sh) to install more packages\n- **VS Code extensions**: Add extensions to the `customizations.vscode.extensions` array\n- **Environment variables**: Control installations by setting variables in the post-create script\n\n### Benefits of Using Codespaces\n\n- ✅ **Instant Setup**: No local dependencies required\n- ✅ **Consistent Environment**: Same setup across all team members\n- ✅ **Pre-configured Tools**: All necessary tools installed automatically\n- ✅ **Cloud Resources**: Use GitHub's cloud infrastructure for builds\n- ✅ **Persistent Storage**: Your work is automatically saved\n- ✅ **Secure Secrets**: License keys managed through GitHub secrets\n\n### Troubleshooting\n\nIf you encounter issues:\n\n1. **Check environment variables**: Verify that `UBCODE_LICENSE_KEY` and `UBCODE_LICENSE_USER` are set:\n   ```shell\n   echo $UBCODE_LICENSE_KEY\n   echo $UBCODE_LICENSE_USER\n   ```\n\n2. **Verify secrets**: Ensure the repository secrets are properly configured in GitHub\n\n3. **Restart the codespace**: Sometimes a fresh start resolves configuration issues\n\n4. **Check the post-create logs**: View the terminal output during setup\n\n5. **Rebuild container**: Use Command Palette → \"Codespaces: Rebuild Container\"\n\n\u003e **💡 Tip**: Codespaces is perfect for quick contributions, testing, or when you don't want to set up the development environment locally. The automated secret management ensures a seamless experience.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuseblocks%2Fx-as-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuseblocks%2Fx-as-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuseblocks%2Fx-as-code/lists"}