{"id":37191899,"url":"https://github.com/c12s/cockpit","last_synced_at":"2026-01-14T22:14:15.960Z","repository":{"id":65854175,"uuid":"145000110","full_name":"c12s/cockpit","owner":"c12s","description":"Cockpit is CLI tool that communicate with project Constellations gateway.","archived":false,"fork":false,"pushed_at":"2024-08-03T11:55:46.000Z","size":15634,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-03T12:52:46.064Z","etag":null,"topics":["cli","command-line","edge-computing","golang","json","yaml"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/c12s.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2018-08-16T14:34:51.000Z","updated_at":"2024-08-03T11:55:50.000Z","dependencies_parsed_at":"2024-06-21T15:25:55.715Z","dependency_job_id":"65abf316-3245-43c4-bafb-6c473df236a3","html_url":"https://github.com/c12s/cockpit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/c12s/cockpit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c12s%2Fcockpit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c12s%2Fcockpit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c12s%2Fcockpit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c12s%2Fcockpit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c12s","download_url":"https://codeload.github.com/c12s/cockpit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c12s%2Fcockpit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28436268,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T21:32:52.117Z","status":"ssl_error","status_checked_at":"2026-01-14T21:32:33.442Z","response_time":107,"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":["cli","command-line","edge-computing","golang","json","yaml"],"created_at":"2026-01-14T22:14:15.184Z","updated_at":"2026-01-14T22:14:15.951Z","avatar_url":"https://github.com/c12s.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cockpit CLI Documentation\n\nCockpit CLI is a command-line interface (CLI) tool designed for managing various resources within the Cockpit project. This CLI facilitates user registration, node management, labeling, schema validation, configuration management, and more. The goal of this tool is to provide an easy-to-use and maintainable interface for interacting with the Cockpit project's resources.\n\n## Features\n\n- **User Management**: Register and login to the system.\n- **Node Management**: List, query, and claim nodes based on specific criteria.\n- **Label Management**: Add, update, and delete labels for nodes.\n- **Schema Management**: Create, retrieve, validate, and delete schemas.\n- **Configuration Management**: Manage both config groups and standalone configs, including placing, listing, and diffing configurations.\n\n## Table of Contents\n- [Getting Started](#getting-started)\n- [Command Reference](#command-reference)\n  - [User Management](#user-management)\n  - [Node Management](#node-management)\n  - [Relationship Management](#relationship-management)\n  - [Label Management](#label-management)\n  - [Schema Management](#schema-management)\n  - [Config Group Management](#config-group-management)\n  - [Standalone Config Management](#standalone-config-management)\n  - [Node Metrics Management](#node-metrics-management)\n- [Contributing](#contributing)\n- [License](#license)\n\n### Prerequisites\nEnsure you have the following installed:\n- [Go](https://golang.org/doc/install) (version 1.16 or higher)\n- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)\n- [Docker](https://docs.docker.com/get-docker/) (for running the complete environment)\n\nAdditionally, you need to clone and set up the tools repository from [https://github.com/c12s/tools](https://github.com/c12s/tools), which includes scripts to pull all other repositories and start Docker containers.\n\n### Installation\n1. Clone the tools repository:\n\n    ```sh\n    git clone https://github.com/c12s/tools.git\n    ```\n\n2. Navigate to the tools directory and follow the setup instructions in the README.md file of the tools repository to pull all necessary repositories and start Docker containers:\n\n    ```sh\n    cd tools\n    ./install.sh\n    ./start.sh\n    ```\n\n   or for Windows:\n\n    ```sh\n    ./start-windows.sh\n    ```\n\n3. Clone the cockpit repository in the same parent directory where the tools repository is located:\n\n    ```sh\n    cd ..\n    git clone https://github.com/bunjo01/cockpit.git\n    ```\n\n4. Navigate to the cockpit project directory:\n\n    ```sh\n    cd cockpit\n    ```\n\n5. Build the CLI:\n\n    ```sh\n    go build -o cockpit\n    ```\n\n6. Add the executable to your PATH:\n  - On Linux/macOS:\n\n    ```sh\n    export PATH=$PATH:$(pwd)\n    ```\n\n  - On Windows (Command Prompt):\n\n    ```sh\n    set PATH=%PATH%;%cd%\n    ```\n\n  - On Windows (PowerShell):\n\n    ```sh\n    $env:PATH += \";$PWD\"\n    ```\n\n## Command Reference\n\n### User Management\n\n#### Register\nRegister a new user.\n- **Command**: cockpit register\n- **Options**:\n  - --email: Email address of the user.\n  - --name: Name of the user.\n  - --org: Organization of the user.\n  - --surname: Surname of the user.\n  - --username: Username of the user.\n- **Example**:\n\n    ```sh\n    cockpit register --email 'user@gmail.com' --name 'name' --org 'c12s' --surname 'surname' --username 'user'\n    ```\n\n#### Login\nLogin with an existing user.\n- **Command**: cockpit login\n- **Options**:\n  - --username: Username of the user.\n- **Example**:\n\n    ```sh\n    cockpit login --username 'user'\n    ```\n\n### Node Management\n\n#### List Nodes\nList all nodes.\n- **Command**: cockpit list nodes\n- **Options**:\n  - --query: Query to filter nodes.\n- **Example**:\n\n    ```sh\n    cockpit list nodes\n    cockpit list nodes --query 'memory-totalGB \u003e 2'\n    ```\n\n#### Claim Nodes\nClaim nodes based on specific criteria.\n- **Command**: cockpit claim nodes\n- **Options**:\n  - --org: Organization.\n  - --query: Query to filter nodes.\n- **Example**:\n\n    ```sh\n    cockpit claim nodes --org 'c12s' --query 'memory-totalGB \u003e 2'\n    ```\n\n#### List Allocated Nodes\nList nodes allocated to an organization.\n- **Command**: cockpit list nodes allocated\n- **Options**:\n  - --org: Organization.\n  - --query: Query to filter nodes.\n- **Example**:\n\n    ```sh\n    cockpit list nodes allocated --org 'c12s'\n    cockpit list nodes allocated --org 'c12s' --query 'memory-totalGB \u003e 2'\n    ```\n\n### Relationship Management\n\n#### Create Relations\nCreate relations between entities.\n- **Command**: cockpit create relations\n- **Options**:\n  - --ids: IDs of the entities.\n  - --kinds: Kinds of the entities.\n- **Example**:\n\n    ```sh\n    cockpit create relations --ids 'c12s|dev' --kinds 'org|namespace'\n    ```\n\n### Label Management\n\n#### Add Label\nAdd a label to a node.\n- **Command**: cockpit put label\n- **Options**:\n  - --org: Organization of the node.\n  - --node-id: ID of the node.\n  - --key: Key of the label.\n  - --value: Value of the label.\n- **Example**:\n\n    ```sh\n    cockpit put label --org 'c12s' --node-id 'nodeId' --key 'newlabel' --value '25.00'\n    ```\n\n#### Delete Label\nDelete a label from a node.\n- **Command**: cockpit delete label\n- **Options**:\n  - --org: Organization of the node.\n  - --nodeId: ID of the node.\n  - --key: Key of the label.\n- **Example**:\n\n    ```sh\n    cockpit delete label --org 'c12s' --node-id 'nodeId' --key 'newlabel'\n    ```\n\n### Schema Management\n\n#### Create Schema\nCreate a new schema.\n- **Command**: cockpit create schema\n- **Options**:\n  - --org: Organization.\n  - --namespace: Namespace.\n  - --schema-name: Name of the schema.\n  - --version: Version of the schema.\n  - --path: Path to the schema file.\n- **Example**:\n\n    ```sh\n    cockpit create schema --org 'c12s' --namespace 'default' --schema-name 'schema' --version 'v1.0.0' --path 'request/schema/create-schema.yaml'\n    ```\n\n#### Get Schema Version\nRetrieve schema version details.\n- **Command**: cockpit get schema version\n- **Options**:\n  - --org: Organization.\n  - --namespace: Namespace.\n  - --schema: Name of the schema.\n- **Example**:\n\n    ```sh\n    cockpit get schema version --org 'c12s' --namespace 'default' --schema-name 'schema'\n    ```\n\n#### Get Schema\nRetrieve a specific schema.\n- **Command**: cockpit get schema\n- **Options**:\n  - --org: Organization.\n  - --namespace: Namespace.\n  - --schema: Name of the schema.\n  - --version: Version of the schema.\n- **Example**:\n\n    ```sh\n    cockpit get schema --org 'c12s' --namespace 'default' --schema-name 'schema' --version 'v1.0.0'\n    ```\n\n#### Validate Schema\nValidate a schema.\n- **Command**: cockpit validate schema\n- **Options**:\n  - --org: Organization.\n  - --namespace: Namespace.\n  - --schema: Name of the schema.\n  - --version: Version of the schema.\n  - --path: Path to the validation file.\n- **Example**:\n\n    ```sh\n    cockpit validate schema --org 'c12s' --namespace 'default' --schema-name 'schema' --version 'v1.0.0' --path 'request/schema/validate-schema.yaml'\n    ```\n\n#### Delete Schema\nDelete a schema.\n- **Command**: cockpit delete schema\n- **Options**:\n  - --org: Organization.\n  - --namespace: Namespace.\n  - --schema: Name of the schema.\n  - --version: Version of the schema.\n- **Example**:\n\n    ```sh\n    cockpit delete schema --org 'c12s' --namespace 'default' --schema-name 'schema' --version 'v1.0.0'\n    ```\n\n### Config Group Management\n\n#### Add Config Group\nAdd a configuration group.\n- **Command**: cockpit put config group\n- **Options**:\n  - --path: Path to the config group file.\n- **Example**:\n\n    ```sh\n    cockpit put config group --path 'request/config-group/create-config-group.yaml'\n    ```\n\n#### Get Config Group\nRetrieve a configuration group.\n- **Command**: cockpit get config group\n- **Options**:\n  - --org: Organization.\n  - --namespace: Namespace.\n  - --name: Name of the config group.\n  - --version: Version of the config group.\n  - --output: Output format (json, yaml).\n- **Example**:\n\n    ```sh\n    cockpit get config group --org 'c12s' --namespace 'default' --name 'app_config' --version 'v1.0.1'\n    ```\n\n#### List Config Groups\nList all configuration groups.\n- **Command**: cockpit list config group\n- **Options**:\n  - --org: Organization.\n  - --namespace: Namespace.\n  - --output: Output format (json, yaml).\n- **Example**:\n\n    ```sh\n    cockpit list config group --org 'c12s' --namespace 'default'\n    ```\n\n#### Diff Config Groups\nCompare differences between configuration groups.\n- **Command**: cockpit diff config group\n- **Options**:\n  - --org: Organization.\n  - --namespace: Namespace.\n  - --names: Names of the config groups.\n  - --versions: Versions of the config groups.\n  - --output: Output format (json, yaml).\n- **Example**:\n\n    ```sh\n    cockpit diff config group --org 'c12s' --namespace 'default' --names 'app_config|app_config' --versions 'v1.0.0|v1.0.1'\n    cockpit diff config group --org 'c12s' --namespace 'default' --names 'app_config' --versions 'v1.0.0|v1.0.1'\n    cockpit diff config group --org 'c12s' --namespace 'default' --names 'app_config|app_config' --versions 'v1.0.0'\n    ```\n\n#### Place Config Group\nPlace a configuration group.\n- **Command**: cockpit place config group\n- **Options**:\n  - --path: Path to the placement file.\n- **Example**:\n\n    ```sh\n    cockpit place config group --path 'request/config-group/create-config-group-placements.yaml'\n    ```\n\n#### List Config Group Placements\nList all placements of a configuration group.\n- **Command**: cockpit list config group placements\n- **Options**:\n  - --org: Organization.\n  - --namespace: Namespace.\n  - --name: Name of the config group.\n  - --version: Version of the config group.\n- **Example**:\n\n    ```sh\n    cockpit list config group placements --org 'c12s' --namespace 'default' --name 'app_config' --version 'v1.0.0'\n    ```\n\n#### Delete Config Group\nDelete a configuration group.\n- **Command**: cockpit delete config group\n- **Options**:\n  - --org: Organization.\n  - --namespace: Namespace.\n  - --name: Name of the config group.\n  - --version: Version of the config group.\n  - --output: Output format (json, yaml).\n- **Example**:\n\n    ```sh\n    cockpit delete config group --org 'c12s' --namespace 'default' --name 'app_config' --version 'v1.0.1'\n    ```\n\n### Standalone Config Management\n\n#### Add Standalone Config\nAdd a standalone configuration.\n- **Command**: cockpit put standalone config\n- **Options**:\n  - --path: Path to the config file.\n- **Example**:\n\n    ```sh\n    cockpit put standalone config --path 'request/standalone-config/create-standalone-config.json'\n    ```\n\n#### Get Standalone Config\nRetrieve a standalone configuration.\n- **Command**: cockpit get standalone config\n- **Options**:\n  - --org: Organization.\n  - --namespace: Namespace.\n  - --name: Name of the config.\n  - --version: Version of the config.\n  - --output: Output format (json, yaml).\n- **Example**:\n\n    ```sh\n    cockpit get standalone config --org 'c12s' --namespace 'default' --name 'db_config' --version 'v1.0.1'\n    ```\n\n#### List Standalone Configs\nList all standalone configurations.\n- **Command**: cockpit list standalone config\n- **Options**:\n  - --org: Organization.\n  - --namespace: Namespace.\n  - --output: Output format (json, yaml).\n- **Example**:\n\n    ```sh\n    cockpit list standalone config --org 'c12s' --namespace 'default'\n    ```\n\n#### Diff Standalone Configs\nCompare differences between standalone configurations.\n- **Command**: cockpit diff standalone config\n- **Options**:\n  - --org: Organization.\n  - --namespace: Namespace.\n  - --names: Names of the configs.\n  - --versions: Versions of the configs.\n  - --output: Output format (json, yaml).\n- **Example**:\n\n    ```sh\n    cockpit diff standalone config --org 'c12s' --namespace 'default' --names 'db_config|db_config' --versions 'v1.0.1|v1.0.0'\n    cockpit diff standalone config --org 'c12s' --namespace 'default' --names 'db_config' --versions 'v1.0.1|v1.0.0'\n    cockpit diff standalone config --org 'c12s' --namespace 'default' --names 'db_config|db_config' --versions 'v1.0.1'\n    ```\n\n#### Place Standalone Config\nPlace a standalone configuration.\n- **Command**: cockpit place standalone config\n- **Options**:\n  - --path: Path to the placement file.\n- **Example**:\n\n    ```sh\n    cockpit place standalone config --path 'request/standalone-config/create-standalone-config-placements.yaml'\n    ```\n\n#### List Standalone Config Placements\nList all placements of a standalone configuration.\n- **Command**: cockpit list standalone config placements\n- **Options**:\n  - --org: Organization.\n  - --namespace: Namespace.\n  - --name: Name of the config.\n  - --version: Version of the config.\n- **Example**:\n\n    ```sh\n    cockpit list standalone config placements --org 'c12s' --namespace 'default' --name 'db_config' --version 'v1.0.0'\n    ```\n\n#### Delete Standalone Config\nDelete a standalone configuration.\n- **Command**: cockpit delete standalone config\n- **Options**:\n  - --org: Organization.\n  - --namespace: Namespace.\n  - --name: Name of the config.\n  - --version: Version of the config.\n  - --output: Output format (json, yaml).\n- **Example**:\n\n    ```sh\n    cockpit delete standalone config --org 'c12s' --namespace 'default' --name 'db_config' --version 'v1.0.1'\n    ```\n\n### Node Metrics Management\n\n#### Get Node Metrics\nRetrieve metrics for a specific node.\n- **Command**: cockpit get node metrics\n- **Options**:\n  - --node-id: Node ID (required).\n  - --all: Display all metrics (optional).\n  - --sort: Sort metrics by 'cpu', 'memory', 'disk', 'network receive', 'network transmit' or 'bandwidth'.\n- **Example**:\n\n    ```sh\n    cockpit get node metrics --node-id 'nodeID'\n    cockpit get node metrics --node-id 'nodeID' --all-services --sort 'memory'\n    ```\n\n## Contributing\n\nContributions are welcome! Please follow these steps to contribute:\n\n1. Fork the repository.\n2. Create a new branch:\n\n    ```sh\n    git checkout -b feature/YourFeature\n    ```\n\n3. Make your changes.\n4. Commit your changes:\n\n    ```sh\n    git commit -m 'Add new feature'\n    ```\n\n5. Push to the branch:\n\n    ```sh\n    git push origin feature/YourFeature\n    ```\n\n6. Open a pull request and describe your changes.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc12s%2Fcockpit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc12s%2Fcockpit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc12s%2Fcockpit/lists"}