Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

external aliases, rename to 'projects' #1

Closed
8 tasks
jondot opened this issue Jul 15, 2022 · 0 comments
Closed
8 tasks

external aliases, rename to 'projects' #1

jondot opened this issue Jul 15, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@jondot
Copy link
Member

jondot commented Jul 15, 2022

Suggestion / Feature Request

Goal: NOTE aliases now renamed to projects. Allow me to "tap" into external sources for projects so I can just run bp new rust and that gives me the best Rust starter there is, without me having to search for that, configure it etc. In principle similar to formula and Homebrew taps. This shift the focus from me writing my own aliases (projects) to consuming something that's ready-made and public. External file content is the same format of configuration, but we only take projects: for now.

Design:

projects_sources:
- name: community
  link: https://<raw file>
projects: # previously: aliases
  • Config does merging of local and global as before. Now additional step will be added:
await config.resolve_projects() // mut

Which will:

  1. verify files in ~/.backpack don't already exist. if they do, bail.
  2. if no files corresponding to sources, download the files, name them according to project source name (e.g. community.yaml).

Next,

  • with the array of external projects,
  • concat all additional projects into projects list in config, only add missing, never overwrite, make sure their source is external
  • resolve from main projects array.

Some changes to project alias records:

  1. Each alias should now have a source: local | external
  2. Should have a description
  3. Should have a run command (for post-clone). External run will be prompted by user to approve. Local runs will run without prompt.

The data structure should also support:

backpack new
<interactive menu - choose your project>

And should be ready for but not implement yet:

  • fuzzy search in menu

  • frecency score (most recent and most used projects at the top)

  • rename aliases to projects

  • project should now have description, run: <string> (not implemented yet), source (default local)

  • build external projects resolver, returns a list of projects, initialized with external

  • merge logic in Config, careful not to overwrite from external

  • Config gets a new defensive API that hides the data inside of it.

  • new interactive UI module.

  • implement choice menu, sourced by projects, divided by local and external, rig it to bp new and bp apply when called with no arguments, this also means we will need to take in dest interactively.

  • bp config --projects should now show a divided list of available projects. consider just saying bp projects instead.

@jondot jondot added the enhancement New feature or request label Jul 15, 2022
@jondot jondot closed this as completed Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant