Skip to content

INIT: Enable Extension to Call Ignite Commands #117

Open

Description

@Pantani

Add the ability to the extension to call the ignite commands

Activity

  1. julienrbrt commented on Jul 14, 2024

    @julienrbrt
    Member

    That's already possible like this: https://github.com/ignite/apps/blob/e5cd28a/appregistry/cmd/install.go#L34-L39
    Not the best I admit but does the job.
    What are you thinking about?

  2. Pantani commented on Jul 15, 2024

    @Pantani
    ContributorAuthor

    I was doing some tests trying to call the commands through GRPC, but in the end, it was the same solution with overengineer.

    ignite/cli#4252

    WDYT?

  3. julienrbrt commented on Jul 15, 2024

    @julienrbrt
    Member

    I look actually pretty handy, but it is indeed less flexible than just importing the cobra command. We would need a way to get stderr, stdout from that API.
    However me may need to use this if we don't want to depend on cobra in extensions.

  4. Pantani commented on Jul 15, 2024

    @Pantani
    ContributorAuthor

    The trick to importing the Cobra command is the ignite version. The version from the terminal can be different from the version from the app using an old building. However, using thought GRPC can break the app if the commands change.

  5. julienrbrt commented on Jul 15, 2024

    @julienrbrt
    Member

    Right, 100% agree, adding calling it via grpc is great for that, however we may want the api to do more (outputs, checking version indeed)

  6. changed the title [-]feat: add the ability to the extension to call the ignite commands[/-] [+]INIT: Enable Extension to Call Ignite Commands[/+] on Jul 18, 2024
  7. julienrbrt commented on Mar 28, 2025

    @julienrbrt
    Member

    This may be becoming more relevant with ignite 29 coming.

  8. Pantani commented on Mar 28, 2025

    @Pantani
    ContributorAuthor

    Now we are calling the Ignite cobra command, but we can also make this through GRPC

    apps/spaceship/cmd/chain.go

    Lines 251 to 255 in f0f1165

    igniteChainInitCmd := ignitecmd.NewChainInit()
    igniteChainInitCmd.SetArgs([]string{"-p", chain.AppPath, "--home", localChainHome})
    if err := igniteChainInitCmd.ExecuteContext(ctx); err != nil {
    return err
    }

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions