Skip to content

About

Mix plugin to use the GRiSP.io API

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

mix_grisp_io

Mix plug-in for GRiSP.io. It is the Elixir/Mix port of rebar3_grisp_io and keeps the same command architecture and feature set while using mix_grisp for release selection, artifact naming, and update-package creation.

Installation

Add the plug-in to your project dependencies:

def deps do
  [
    {:mix_grisp_io, "~> 1.0"}
  ]
end

mix_grisp_io depends on mix_grisp; the project must have a valid releases: entry and GRiSP configuration as described by mix_grisp.

Commands

Inspect a command with mix help grisp-io.COMMAND.

Authentication

mix grisp-io.auth

This opens a browser login session using PKCE (S256). A local HTTP listener on 127.0.0.1 uses an available port and waits up to five minutes for approval. The callback nonce must match the login attempt. If browser delivery fails, copy the authentication code from the confirmation page and paste it into the terminal prompt. The listener closes before the code is redeemed with the original verifier.

After receiving the token, the command asks whether to protect it with a passphrase (y/N, default no). Skip that prompt with an explicit flag:

mix grisp-io.auth --encrypt-token=true
mix grisp-io.auth --encrypt-token=false
mix grisp-io.auth --credentials --encrypt-token=true

--credentials uses username/password login instead of the browser flow. Encrypted tokens use AES-256-GCM; unencrypted tokens are stored as plaintext. Both use the rebar3 global configuration directory and the same grisp-io.config format, so an existing rebar3_grisp_io login can be reused. Set MIX_GRISP_IO_CONFIG_DIR to override the directory.

Upload

mix grisp-io.upload [--force] [--refresh] [--relname NAME] [--relvsn VERSION]

An existing _grisp/update/*.tar is reused unless --refresh is set. Otherwise the package is built through MixGrisp.Pack. --force allows overwriting the remote package.

Arguments after -- are forwarded to Mix's release generation, as with mix grisp.pack.

Deauthentication

mix grisp-io.deauth

This revokes the stored token and removes the local credentials. Stale local credentials are also removed when the server reports that the token is already invalid.

List

mix grisp-io.list

Lists the stored update packages and their application, version, platform, and last-modified time.

Deploy

mix grisp-io.deploy --device SERIAL [--package PACKAGE]

Without --package, the package name is derived from the selected Mix release. Use --relname and --relvsn when the project defines multiple releases.

Delete

mix grisp-io.delete [PACKAGE] [--relname NAME] [--relvsn VERSION]

When PACKAGE is omitted, its name is derived from the selected Mix release.

Validate

mix grisp-io.validate --device SERIAL

Cancel and reboot

mix grisp-io.cancel --device DEVICE
mix grisp-io.reboot --device DEVICE

Version

mix grisp-io.version

Configuration

The production service defaults to https://app.grisp.io. A different endpoint can be configured for development or testing:

config :mix_grisp_io, base_url: "https://localhost:8443"

TLS verification remains enabled by default in every Mix environment. A local development endpoint can opt out explicitly with insecure: true in the :grisp_io project configuration or :mix_grisp_io application environment.

About

Mix plugin to use the GRiSP.io API

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages