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

Add a CLI argument to redbot to add cog paths to [p]paths #6506

Open
cswimr opened this issue Jan 25, 2025 · 1 comment · May be fixed by #6510
Open

Add a CLI argument to redbot to add cog paths to [p]paths #6506

cswimr opened this issue Jan 25, 2025 · 1 comment · May be fixed by #6510
Labels
Category: Core - Command-line Interfaces This is related to Red's CLIs (redbot, redbot-launcher, redbot-setup). Status: In Progress There's a PR open to deal with this, or an org member is working on this internally Type: Feature New feature or request.
Milestone

Comments

@cswimr
Copy link
Contributor

cswimr commented Jan 25, 2025

Type of feature request

Other

Description of the feature you're suggesting

I propose a --cog-paths flag for the redbot CLI. This flag would add a colon-separated list of cog paths to [p]paths, and would not persist through restarts (just like other CLI flags).

Example usage:
--cog-paths /workspaces/FooCogs:/workspaces/BarCogs

Anything else?

So, for some context, I develop my cogs for Red inside of a Dev Container. Here's what that looks like. Then, I use Visual Studio Code's Run & Debug feature to actually run Red. The initial setup process for this development environment is as follows:

  • Run redbot-setup
  • Launch Red through the Run & Debug menu
  • Once the bot is started, run [p]addpath /workspaces/SeaCogs inside of Discord to add the project directory to the bot as a cog path.
    • This step is what would be improved by this feature request.

If this feature request is implemented, I could add --cog-paths /workspaces/SeaCogs to my VSCode Run & Debug configuration, removing one initial setup step to get up and running.

Discussed in the Red Discord Server, in #feature-ideas: https://discord.com/channels/133049272517001216/133049878837329920/1332807433650704534

@cswimr cswimr added the Type: Feature New feature or request. label Jan 25, 2025
@github-actions github-actions bot added the Status: Needs Triage This has not been labeled or discussed for handling yet. label Jan 25, 2025
@Flame442 Flame442 added Status: PRs Welcome No one is currently assigned to this issue, but we'd be grateful if anyone made a PR. Category: Core - Command-line Interfaces This is related to Red's CLIs (redbot, redbot-launcher, redbot-setup). and removed Status: Needs Triage This has not been labeled or discussed for handling yet. labels Jan 31, 2025
@Flame442
Copy link
Member

I would prefer if this was called --cog-path or similar, and behaved similar to --co-owner where it could be passed multiple times to add multiple paths.

cswimr added a commit to cswimr/Red-DiscordBot that referenced this issue Feb 1, 2025
This argument takes a list of strings (can be used multiple times for more than one value), validates that the path provided exists, and adds the path via `self._cog_mgr.add_path()`, so that cogs can be loaded from that path.

Closes Cog-Creators#6506
@cswimr cswimr linked a pull request Feb 1, 2025 that will close this issue
@Flame442 Flame442 added Status: In Progress There's a PR open to deal with this, or an org member is working on this internally and removed Status: PRs Welcome No one is currently assigned to this issue, but we'd be grateful if anyone made a PR. labels Feb 1, 2025
@Flame442 Flame442 added this to the 3.5.x milestone Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Core - Command-line Interfaces This is related to Red's CLIs (redbot, redbot-launcher, redbot-setup). Status: In Progress There's a PR open to deal with this, or an org member is working on this internally Type: Feature New feature or request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants