{"action":"created","issue":{"url":"https://api.github.com/repos/micronaut-projects/micronaut-core/issues/330","repository_url":"https://api.github.com/repos/micronaut-projects/micronaut-core","labels_url":"https://api.github.com/repos/micronaut-projects/micronaut-core/issues/330/labels{/name}","comments_url":"https://api.github.com/repos/micronaut-projects/micronaut-core/issues/330/comments","events_url":"https://api.github.com/repos/micronaut-projects/micronaut-core/issues/330/events","html_url":"https://github.com/micronaut-projects/micronaut-core/issues/330","id":336928683,"node_id":"MDU6SXNzdWUzMzY5Mjg2ODM=","number":330,"title":"Micronaut profile for creating CLI applications with picocli","user":{"login":"remkop","id":5917763,"node_id":"MDQ6VXNlcjU5MTc3NjM=","avatar_url":"https://avatars2.githubusercontent.com/u/5917763?v=4","gravatar_id":"","url":"https://api.github.com/users/remkop","html_url":"https://github.com/remkop","followers_url":"https://api.github.com/users/remkop/followers","following_url":"https://api.github.com/users/remkop/following{/other_user}","gists_url":"https://api.github.com/users/remkop/gists{/gist_id}","starred_url":"https://api.github.com/users/remkop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remkop/subscriptions","organizations_url":"https://api.github.com/users/remkop/orgs","repos_url":"https://api.github.com/users/remkop/repos","events_url":"https://api.github.com/users/remkop/events{/privacy}","received_events_url":"https://api.github.com/users/remkop/received_events","type":"User","site_admin":false},"labels":[{"id":859093720,"node_id":"MDU6TGFiZWw4NTkwOTM3MjA=","url":"https://api.github.com/repos/micronaut-projects/micronaut-core/labels/type:%20enhancement","name":"type: enhancement","color":"a2eeef","default":false}],"state":"open","locked":false,"assignee":{"login":"ZacharyKlein","id":114379,"node_id":"MDQ6VXNlcjExNDM3OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/114379?v=4","gravatar_id":"","url":"https://api.github.com/users/ZacharyKlein","html_url":"https://github.com/ZacharyKlein","followers_url":"https://api.github.com/users/ZacharyKlein/followers","following_url":"https://api.github.com/users/ZacharyKlein/following{/other_user}","gists_url":"https://api.github.com/users/ZacharyKlein/gists{/gist_id}","starred_url":"https://api.github.com/users/ZacharyKlein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZacharyKlein/subscriptions","organizations_url":"https://api.github.com/users/ZacharyKlein/orgs","repos_url":"https://api.github.com/users/ZacharyKlein/repos","events_url":"https://api.github.com/users/ZacharyKlein/events{/privacy}","received_events_url":"https://api.github.com/users/ZacharyKlein/received_events","type":"User","site_admin":false},"assignees":[{"login":"ZacharyKlein","id":114379,"node_id":"MDQ6VXNlcjExNDM3OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/114379?v=4","gravatar_id":"","url":"https://api.github.com/users/ZacharyKlein","html_url":"https://github.com/ZacharyKlein","followers_url":"https://api.github.com/users/ZacharyKlein/followers","following_url":"https://api.github.com/users/ZacharyKlein/following{/other_user}","gists_url":"https://api.github.com/users/ZacharyKlein/gists{/gist_id}","starred_url":"https://api.github.com/users/ZacharyKlein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZacharyKlein/subscriptions","organizations_url":"https://api.github.com/users/ZacharyKlein/orgs","repos_url":"https://api.github.com/users/ZacharyKlein/repos","events_url":"https://api.github.com/users/ZacharyKlein/events{/privacy}","received_events_url":"https://api.github.com/users/ZacharyKlein/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2018-06-29T09:29:08Z","updated_at":"2018-07-11T20:22:28Z","closed_at":null,"author_association":"NONE","body":"During discussion in [another ticket](https://github.com/micronaut-projects/micronaut-core/issues/256), the idea was raised to add a Micronaut profile for creating CLI applications with picocli:\r\n\r\n> By the way, one other thing that might be interesting is a Micronaut profile for creating CLI applications with Picocli\r\n> \r\n> Right now there are variety of application types you can make with Micronaut (serverless functions, netty server apps etc.) with more coming (Kafka / RabbitMQ apps etc.)\r\n> \r\n> Another common domain is writing CLI apps and with Micronaut DI being fast it might be a good fit. For example your CLI apps could DI datasources, discovery services, http clients etc.\r\n"},"comment":{"url":"https://api.github.com/repos/micronaut-projects/micronaut-core/issues/comments/404297884","html_url":"https://github.com/micronaut-projects/micronaut-core/issues/330#issuecomment-404297884","issue_url":"https://api.github.com/repos/micronaut-projects/micronaut-core/issues/330","id":404297884,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDI5Nzg4NA==","user":{"login":"ZacharyKlein","id":114379,"node_id":"MDQ6VXNlcjExNDM3OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/114379?v=4","gravatar_id":"","url":"https://api.github.com/users/ZacharyKlein","html_url":"https://github.com/ZacharyKlein","followers_url":"https://api.github.com/users/ZacharyKlein/followers","following_url":"https://api.github.com/users/ZacharyKlein/following{/other_user}","gists_url":"https://api.github.com/users/ZacharyKlein/gists{/gist_id}","starred_url":"https://api.github.com/users/ZacharyKlein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZacharyKlein/subscriptions","organizations_url":"https://api.github.com/users/ZacharyKlein/orgs","repos_url":"https://api.github.com/users/ZacharyKlein/repos","events_url":"https://api.github.com/users/ZacharyKlein/events{/privacy}","received_events_url":"https://api.github.com/users/ZacharyKlein/received_events","type":"User","site_admin":false},"created_at":"2018-07-11T20:22:28Z","updated_at":"2018-07-11T20:22:28Z","author_association":"CONTRIBUTOR","body":"@remkop My recommendation would be to create a `configurations` module with the necessary factory class, as you suggested. You would then create a new profile (based on your example project), alongside the existing profiles in this repo: https://github.com/micronaut-projects/micronaut-profiles. I would take a look at the `service` profile as an example, but note that you will likely not need to include features like `http-server` or `http-client` in a CLI app. The profile would include the new configuration dependency, as well as a basic skeleton application/configuration so that the new app can be executed out of the box.\r\n\r\nThe `mn` CLI includes a `create-profile` command, but as of M2 it's broken (it should be fixed in `master`). You can simply copy the existing `service` profile and rename it and go from there. I would recommend naming it something like `cli`. Usage would be via the `create-app` command:\r\n\r\n```\r\n> mn create-app my-cli-app -profile cli\r\n```\r\n\r\nThe profile system is based on the Grails profile system, so the docs here should get you started: https://docs.grails.org/latest/guide/profiles.html\r\n\r\nLet me know if you have any questions, I'm happy to help if I can."}}
{"actor":{"display_login":"ZacharyKlein"}}