### Run and Connect to Garnish Examples via SSH Source: https://github.com/ausimian/garnish/blob/main/README.md These shell commands show how to first start a Garnish example application (e.g., `counter.exs`) and then connect to it using an SSH client, demonstrating the TUI over SSH functionality. ```shell mix run --no-halt examples/counter.exs ``` ```shell ssh -o NoHostAuthenticationForLocalhost=yes -p 2222 localhost ``` -------------------------------- ### Start and Stop SSH Daemon for Garnish Application in Elixir Source: https://github.com/ausimian/garnish/blob/main/README.md This Elixir code demonstrates how to start the SSH daemon within your application's `start/2` callback, configuring it to use a Garnish application. It also includes the `stop/1` callback for proper daemon shutdown. ```elixir @impl true def start(_type, _args) do opts = [ # ... other ssh opts ssh_cli: {Garnish, app: My.App} ] {:ok, ref} = :ssh.daemon({127,0,0,1}, 2222, opts) children = [ ] opts = [strategy: :one_for_one, name: My.Supervisor] with {:ok, pid} <- Supervisor.start_link(children, opts) do {:ok, pid, ref} end end @impl true def stop(ref) do :ssh.stop_daemon(ref) end ``` -------------------------------- ### Add Garnish Dependency to Elixir Project Source: https://github.com/ausimian/garnish/blob/main/README.md This snippet shows how to add the `garnish` package as a dependency in your `mix.exs` file, allowing your Elixir project to use the Garnish TUI framework. ```elixir def deps do [ {:garnish, "~> 0.2.0"} ] end ``` -------------------------------- ### Configure SSH Extra Application in Elixir Source: https://github.com/ausimian/garnish/blob/main/README.md To enable SSH support for your Garnish application, you need to add `:ssh` to the `extra_applications` list within your `application` definition in `mix.exs`. ```elixir def application do [ extra_applications: [:logger, :ssh, ...], mod: ... ] end ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.