Effect-TS / effect

An ecosystem of tools to build robust applications in TypeScript
https://effect.website
MIT License
7.6k stars 242 forks source link

From Discord: Accessing original arguments in a `Command` #3912

Open effect-bot opened 5 days ago

effect-bot commented 5 days ago

Summary

In the conversation, a user named leighman_ asks if there's a way to access the original command-line arguments within a Command in the Effect Typescript library. They suggest using process.argv as a possible solution. Another user, maxwellbrown, responds by stating that this functionality isn't currently built-in, but suggests that the library could potentially expose the original arguments as an Arguments service for command handlers to access.

Key Takeaways:

Discord thread

https://discord.com/channels/795981131316985866/1304025127087767573

IMax153 commented 5 days ago

The idea would be to have an Arguments (name ?) service which you could access to get the original CLI arguments. Not sure if this is more or less useful than just accessing process.argv or similar in your handlers.

Will need to think / discuss.