{"id":16989129,"url":"https://github.com/kosperera/vscode-remote-try-cli","last_synced_at":"2026-05-17T18:05:07.196Z","repository":{"id":74241214,"uuid":"311671336","full_name":"kosperera/vscode-remote-try-cli","owner":"kosperera","description":"Sample hello-world CLI project in .NET 6.0 for trying out VS Code Remote - Containers","archived":false,"fork":false,"pushed_at":"2021-05-16T15:54:37.000Z","size":52,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-26T21:26:28.113Z","etag":null,"topics":["cli","console-app","devcontainers","dotnet","vscode","vscode-remote-try"],"latest_commit_sha":null,"homepage":"","language":"C#","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/kosperera.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}},"created_at":"2020-11-10T13:44:51.000Z","updated_at":"2025-01-11T20:09:04.000Z","dependencies_parsed_at":"2023-03-03T18:00:28.633Z","dependency_job_id":null,"html_url":"https://github.com/kosperera/vscode-remote-try-cli","commit_stats":null,"previous_names":["therealkosala/vscode-remote-try-cli","kosperera/vscode-remote-try-cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kosperera%2Fvscode-remote-try-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kosperera%2Fvscode-remote-try-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kosperera%2Fvscode-remote-try-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kosperera%2Fvscode-remote-try-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kosperera","download_url":"https://codeload.github.com/kosperera/vscode-remote-try-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244898410,"owners_count":20528335,"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","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","console-app","devcontainers","dotnet","vscode","vscode-remote-try"],"created_at":"2024-10-14T03:05:31.413Z","updated_at":"2026-05-17T18:05:02.157Z","avatar_url":"https://github.com/kosperera.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Try out CLI-based console app (C#)\n\nThis repository demonstrates developing a CLI-based hello world console app with .NET 5.0 using VS  Code and Development Containers.\n\nWith Temninal:\n```zsh\n#!/bin/zsh\n# Greet someone\nhwld greet -n \"Angry Haslett\"\n# \u003e Hello Angry Haslett!\n```\n```zsh\n#!/bin/zsh\n# Say something to echo\nhwld echo -m \"Sad Lamarr\" -t 2\n# \u003e Starting to Sad Lamarr 2 times ...\n# \u003e Sad Lamarr for the 1 time ...\n# \u003e Sad Lamarr for the 2 time ...\n```\n\n### What's included:\n- Uses .NET 5.0 development container found in [@kosalanuwan/devcontainers][devcontainers-repo]\n- Uses [Microsoft.Extensions.Hosting][ms-hosting-ext-repo] package for [Generic Hosting][generic-hosting-docs] and Dependency Injection\n- Uses [System.CommandLine][command-line-api-repo] package for CLI options, args, and commands\n- Configured to [build and run][vscode-tasks] from the VS Code tasks\n\n## Quick Start\nIf you want to understand how development containers work or want to build your own development container, you want to have a look at [the dev container page][ms-devcontainers-create-docs] for full-blown instructions.\n\n### Build and run from source\nFirst, you want to fork or clone the repo locally, then open up the source code in VS Code.\n\n```zsh\n#!/bin/zsh\ngh repo clone kosalanuwan/vscode-remote-try-cli\ncd vscode-remote-try-cli \u0026\u0026 code .\n```\nThen, re-open the source in the development container to install minimal runtime tools, plugins, extensions et al.\n\nWith VS  Code:\n- Run task: `Reopen in Container`\n- Run task: `build` to clean, restore, and build the project\n- Run task: `watch` to run project in watch mode\n\n```zsh\n#!/bin/zsh\n# Greet someone\ndotnet watch --project Cli/HelloWorld.Cli.csproj run greet -n \"Angry Haslett\"\n# Say something to echo\ndotnet watch --project Cli/HelloWorld.Cli.csproj run echo -m \"Sad Lamarr\" -t 2\n```\n\n## Useful Commands\nOccasionally, you will want to repeat below steps to create a console project, add dependencies, and write your own CLI tool.\n\nWith VS Code:\n```zsh\n#!/bin/zsh\n# Create a new console project\ndotnet new console -n Weather.Cli -o Cli\n```\n```zsh\n#!/bin/zsh\n# Create a new solution to add the project\ndotnet new sln -n Cli\ndotnet sln add Cli/\n```\n```zsh\n#!/bin/zsh\n# Add useful dependencies\ndotnet add Cli/ package Microsoft.Extensions.Hosting  --prerelease\ndotnet add Cli/ package System.CommandLine --prerelease\n```\n```zsh\n#!/bin/zsh\n# Run in watch mode\ndotnet watch --project Cli/Weather.Cli.csproj run\n```\n\n## Related Projects\n- [@dotnet/command-line-api][command-line-api-repo] for implemnting commands and args\n- [A flavor of Carmel Eve's DI approach][carmeleve-cli-demo-repo] using the [Genric Host][generic-hosting-docs].\n\n## Feedback\nIf you have any technical problems with VS Code or Development Containers, you are better off [asking VS Code Support directly][vscode-support], since you'll end up getting a much faster response back that way.\n\n## Contributing\nThe official repo to contribute would be [@microsoft/vscode-dev-containers][ms-devcontainers-repo].\n\nHave a suggestion or a bug fix? Just open a pull request or an issue. Include the development container with a clear folder name and the simplest instructions possible.\n\n## License\nThe source code is license under the [MIT][lic]\n\n[devcontainers-repo]: https://github.com/kosalanuwan/devcontainers/#readme\n[ms-hosting-ext-repo]: https://github.com/dotnet/runtime/tree/master/src/libraries/Microsoft.Extensions.Hosting/src\n[generic-hosting-docs]: https://docs.microsoft.com/en-us/dotnet/core/extensions/generic-host\n[command-line-api-repo]: https://github.com/dotnet/command-line-api\n[vscode-tasks]: .vscode/tasks.json\n[ms-devcontainers-create-docs]: https://code.visualstudio.com/docs/remote/create-dev-container\n\n[carmeleve-cli-demo-repo]: https://github.com/carmeleve/SystemCommandLine.Demo/blob/master/SystemCommandLine.Demo/Program.cs\n\n[vscode-support]: https://github.com/microsoft/vscode-dev-containers#contributing-and-feedback\n[ms-devcontainers-repo]: https://github.com/microsoft/vscode-dev-containers#readme\n\n[lic]: LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkosperera%2Fvscode-remote-try-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkosperera%2Fvscode-remote-try-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkosperera%2Fvscode-remote-try-cli/lists"}