GithubHelp home page GithubHelp logo

Comments (8)

devblackops avatar devblackops commented on May 28, 2024 2

Hi @RamblingCookieMonster!

So were you thinking of something like this?

!install-plugin --source 'https://github.com/dfinke/NameIT.git'

That could git clone the repo and look for a module manifest file named NameIT.psd1 at the root. This would work for those that like to have the module at the root of the repo.

You could also specify a subfolder with the // method similar to how Terraform does it here to tell PoshBot that the actual module lives in a subfolder and PoshBot would assume that the manifest file is named the same as the subfolder.

!install-plugin --source 'https://github.com/poshbotio/PoshBot.Wolfram.git//PoshBot.Wolfram'

The next question is where does it git clone them to? My thinking would be to clone them to whatever directory is specified in the PluginDirectory property of your PoshBot configuration. That directory is added to $env:PSModulePath on bot startup.

The next next question is what to do when you run the above !install-plugin command again for the same git URL and get an updated version? Do you stomp on the original you just downloaded or support side by side? Maybe track the hash of each git clone?

I like this idea but we should brainstorm how it would play out from a users' point of view because they're running these commands in a chat window so they don't have the full command line available to help troubleshoot.

from poshbot.

devblackops avatar devblackops commented on May 28, 2024 1

I'm thinking PoshBot.<PluginName> would be good convention. Bonus points for adding a PoshBot tag in the module manifest for easy searching.

. seems to be the leader in the separation character wars, at least on the PSGallery.

(find-module -repository psgallery -name '*.*').Count
176
(find-module -repository psgallery -name '*-*').Count
123

A while back I setup a separate GitHub org with the intention of moving the project over there and perhaps hosting a GH pages site. The poshbot.io domain is mine as well. We could start with building a doc page listing compatible modules and then later move to a jekyll site or something similar.

from poshbot.

RamblingCookieMonster avatar RamblingCookieMonster commented on May 28, 2024 1

Hiyo!

Question for you! So... gallery is awesome, but for those of us who (1) might not have an internal package manager with nuget support (wat. I know.), or (2) want to test or pull things directly from GitHub or git, would you ever consider adding other plugin sources?

I think either way works. Not sure if worth the potential complexity and room-for-confusion it might create. Folks can always pre-stage modules as needed, or use some other method to pull them in to a spot PoshBot will see them.

Example code (ugly, sorry, some assumptions based on the project these are in, and a lazy author):

Cheers!

from poshbot.

michaeltlombardi avatar michaeltlombardi commented on May 28, 2024

I think PoshBot.<PluginName> is probably for the best, too - the - is more often used as a verb-noun separator, even in module names (eg, Invoke-Parallel, Invoke-Build, etc).

Starting with a doc page is probably easiest, especially since there are no other modules on the gallery for PoshBot yet.

I can take a look at the code for plugins and add the automatic removal of Poshbot. from the beginning of module names when displayed and add that doc file.

from poshbot.

RamblingCookieMonster avatar RamblingCookieMonster commented on May 28, 2024

Agreed, would probably add too much complexity. Realistically, folks should be able to pick this up offline, or could write a poshbot plugin specifically built for this rather than trying to shoehorn this.

Cheers!

from poshbot.

michaeltlombardi avatar michaeltlombardi commented on May 28, 2024

So, I like this idea, but it also adds another level of complexity / installs PowerShell modules into a (probably) non-obvious location on disk.

This does make me wonder if this type of functionality should exist in *-Module though, for PowerShellGet.

from poshbot.

stale avatar stale commented on May 28, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from poshbot.

stale avatar stale commented on May 28, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from poshbot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.