Skip to content

Make it possible to use the Leverage CLI outside of a project context #286

Description

@diego-ojeda-binbash

Describe the Feature

Currently the Leverage CLI only runs within the context of a project path. Some command utilities that rely on the credentials that the Leverage CLI can help set up (e.g. kubectl) start failing when such credentials expire and require re-running specific commands in order to refresh those credentials, which in turn requires moving to specific directory paths before you can run said commands.

We propose adding the following new commands:

  • leverage project discover: it will explore the user's filesystem searching for Leverage projects.
  • leverage project set-current: it will set the current project.

The list of projects that a user has available in his filesystem, or the project that is marked as current, could be stored in a config file, under the $HOME/.leverage/ path.

That way, when a Leverage command is run (one that can be run outside the context of a layer), it can use the project currently marked as current to "understand" it needs to run under that context.

IMPORTANT: if a user is already located within the context of a project, then that context will take precedence over anything that could be set by the above functionality.

NOTE: if a user runs the Leverage CLI outside the context of a project and has never ran the new commands listed above, then it will be hinted to do so.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions