{"id":24478759,"url":"https://github.com/batleforc/dev-cli","last_synced_at":"2025-10-13T04:39:58.468Z","repository":{"id":222394440,"uuid":"757154913","full_name":"batleforc/Dev-cli","owner":"batleforc","description":"Homemade cli tool that help interacting with EclipseChe","archived":false,"fork":false,"pushed_at":"2024-04-14T19:12:14.000Z","size":420,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-24T05:23:06.882Z","etag":null,"topics":["cli","eclipse-che","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/batleforc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2024-02-13T22:51:53.000Z","updated_at":"2024-04-04T21:45:01.000Z","dependencies_parsed_at":"2024-04-14T20:26:04.648Z","dependency_job_id":"87abf268-5052-4e07-b88d-3d18a32fdc9d","html_url":"https://github.com/batleforc/Dev-cli","commit_stats":null,"previous_names":["batleforc/dev-cli"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/batleforc/Dev-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/batleforc%2FDev-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/batleforc%2FDev-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/batleforc%2FDev-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/batleforc%2FDev-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/batleforc","download_url":"https://codeload.github.com/batleforc/Dev-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/batleforc%2FDev-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013685,"owners_count":26085390,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","eclipse-che","rust"],"created_at":"2025-01-21T10:13:31.909Z","updated_at":"2025-10-13T04:39:58.438Z","avatar_url":"https://github.com/batleforc.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dev-cli\n\nThe goal of this project is to provide a cli to hasten my dev process and to create interface for thing that actualy dont.\n\n## Eclipse Che\n\nEclipse che is my main env that allow me to dev in my personal time (and i love it). This project is born from [this issue](https://github.com/eclipse/che/issues/22812) that follow my thinking process of loving project with source openly available.\n\n### What's done (in [4.0.0](https://github.com/batleforc/Dev-cli/releases/tag/0.4.0)) ?\n\n- Start/Restart/stop a workspaces from the CLI (Understand the lifecycle of a workspaces)\n- Get my current workspaces (if in one or else choose one)\n- List other container (in the current workspace or a choosen one) and if there is get the hability to open a shell inside\n- Spawn a shell in one of the container in the workspaces \u003chttps://docs.rs/kube/latest/kube/struct.Api.html#method.exec\u003e\n- Quick connect my vscode to the workspaces (code --folder-uri \"vscode-remote://k8s-container+context={CONTEXT NAME}+podname={Pod Name}+namespace={Namespace}+name={Container name}+image={Container image}{Path to open in the project}\") (Block thread and [prevent workspace to stop](https://github.com/che-incubator/che-code/blob/6e0a908d58cacb380c216dde3af544d75e3913d5/code/extensions/che-api/src/impl/k8s-workspace-service-impl.ts#L57)? and [in the interval](https://github.com/che-incubator/che-code/blob/main/code/extensions/che-activity-tracker/src/activity-tracker-service.ts#L18))\n\n###  What's left to do ?\n\n- Restart the workspaces from the local devfile [(How it's done in che-code)](https://github.com/che-incubator/che-code/blob/main/code/extensions/che-remote/src/extension.ts#L75) (A FEATURE THAT I REALLY NEED)\n- Quick connect Idea (jetbrains gateway) if handled by the workspaces\n- PortForward a list of pod (config file ?) [How it's done in the exemple](https://github.com/kube-rs/kube/blob/main/examples/pod_portforward_bind.rs#L60)\n\n### NotaBene\n\n- To detect DevSpace/Eclipse Che there is some env var that's available.\n  ![exemple](./doc/image/var-env-in-devspaces.png)\n- You can start/stop with a simple patch [Code Source](https://github.com/che-incubator/che-code/blob/6e0a908d58cacb380c216dde3af544d75e3913d5/code/extensions/che-api/src/impl/k8s-workspace-service-impl.ts#L62)\n\n## CRD handling and generating\n\nYou can get the CRD def with `kubectl explain devworkspace` for exemple, the `src/crd` include the Modop to generate new CRD or update existing one based based on the neeeded crd.\n\n## Restart from local Devfile\n\nHas of now the restart in VsCode is not fit for other ide [(How it's done in che-code)](https://github.com/che-incubator/che-code/blob/main/code/extensions/che-remote/src/extension.ts#L75). This way of working need to be tweaked for Idea and futur other ide. To make it easier i found the annotation \"che.eclipse.org/che-editor\" in the DevWorkspace CRD that include the editor passed on startup (Could be interesting to include the one in .che/che-editor if the other one is not found)\n\n## Dockerfile/DevFile templating\n\nLong story short i would like to include in another submodule/cli close to this one (it's possible that in the futur i pop out this part) a module that would act has a component library who would output a Dockerfile including all your need. Atm i have made the batleforc/che-base that include the base tool that i deemed necessary and made some variant based on it including different tool (sdkman for a full java image, Rust and cargo for a rust variant, etc). BUT i may need in some case to reduce the size of those image (ATM less than 1Go).\n\n##  Choice to be made\n\n- Rust or Golang ? (Most likely to be in rust)\n- Lib mode ?\n\n### Why rust ?\n\nRust is my main language to learn atm. And i have lots of project that im currently doing and some capacity that this project bring will further improve those project.\n\nThe choosen main lib is [clap - tutorial](https://docs.rs/clap/latest/clap/_derive/_tutorial/chapter_0/index.html) for the cli part and [kube](https://docs.rs/kube/latest/kube/index.html) for the kubernetes part.\n\n## What i want to learn\n\n- Interact directly with the kubernetes api not throught the mainstream manifest\n- Know a lots more of my ide (VsCode) and whats really behind\n- Deep dive in my dev env (Eclipse Che)\n- [x] (Automated with github action) Create a CI/CD that dont create Docker images but binary for different env (Do i publish the release on github or on a FS ?)\n- [x] (Set up allong with the pipeline) Sign commit and a fully fledged Changelog\n\n## Contributing\n\nHas of now, the best choice for contributing and having a ready to dev env is to use a \"eclipse che\" like env based on the image that i provide.\n\nBUT if you need to make your own here what's needed:\n\n- Rust (latest)\n- [Cargo-bump](https://crates.io/crates/cargo-bump)\n- [Cargo-audit](https://github.com/RustSec/rustsec/tree/main/cargo-audit)\n- [Cocogitto](https://github.com/cocogitto/cocogitto)\n- [GitLeaks](https://github.com/gitleaks/gitleaks)\n\nPlease do `cog install-hook --all` before your first commit, the hooks include a pre commit that will check for any secret and possible clippy error.\n\n## CICD ?\n\nThis repo has two CICD:\n\n- Build and Release that will create a release draft on each Tag\n- Clippy that will check for possible improvement\n\n### Release\n\nNO TAG SHOULD BE MANUALY MADE !!\n\nTo make a tag use :\n\n```shell\ncog bump [ --patch | --minor | --major ]\n```\n\nDoing it with the cli will:\n\n- Increment the past version depending on the choice made (path/minor/major)\n- Change the version in Cargo.toml\n- Generate the changelog\n- Trigger the pipeline that will create a draft with possible package\n\n#### If you want to undraft the release\n\n- Go to the [Github release page](https://github.com/batleforc/Dev-cli/releases)\n- Select the release to undraft\n- Give it a name like `0.2.2 - Dalek` and a descrption to your need\n- Publish the release and enjoy !!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbatleforc%2Fdev-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbatleforc%2Fdev-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbatleforc%2Fdev-cli/lists"}