{"id":16019575,"url":"https://github.com/iboard/seely","last_synced_at":"2025-10-10T03:38:12.646Z","repository":{"id":57546529,"uuid":"339204870","full_name":"iboard/seely","owner":"iboard","description":"Elixir CLI with Sessions, Routers, and Controllers","archived":false,"fork":false,"pushed_at":"2021-02-17T09:58:22.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-09T14:34:14.015Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iboard.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-15T20:57:11.000Z","updated_at":"2022-03-26T14:53:56.000Z","dependencies_parsed_at":"2022-09-16T23:02:21.273Z","dependency_job_id":null,"html_url":"https://github.com/iboard/seely","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iboard/seely","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iboard%2Fseely","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iboard%2Fseely/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iboard%2Fseely/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iboard%2Fseely/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iboard","download_url":"https://codeload.github.com/iboard/seely/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iboard%2Fseely/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002622,"owners_count":26083425,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-08T17:04:48.805Z","updated_at":"2025-10-10T03:38:12.619Z","avatar_url":"https://github.com/iboard.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README\n\n## A CLI-Framework for Elixir\n\nIt defines a GenServer `Main` which holds a list of running `Session`s.\nThe `API` defines all functions provided by Main and Session, thus you can `import Seely.API`\nand then call it's functions directly.\n\n    iex\u003e import Seely.API\n    iex\u003e cli()\n\n  - `Seely.Main` ......... The main process, started by the application.\n  - `Seely.API` .......... A wrapper module to Main you can import where Seely is needed.\n  - `Seely.Session` ...... Named sessions - A GenServer handling a CLI-User session.\n  - `Seely.Router` ....... Handles the router defined by the user.\n  - `Seely.Parser` ....... Helper functions to parse routes.\n  - `Seely.EchoController` Defines all the functions your router offers.\n\n## You just implement\n\n  - `YourRouter` ..... Define your controllers and routes.\n  - `YourController` . Define the functions for your router.\n\nSee `Implementation` below.\n\n## Installation\n\n[Available in Hex](https://hex.pm/packages/seely), the package can be installed\nby adding `seely` to your list of dependencies in `mix.exs`:\n\n    def deps do\n      [\n        {:seely, \"~\u003e 0.1.0\"}\n      ]\n    end\n\nSince `Seely` is published on hex the documentation is on\n[HexDocs](https://hexdocs.pm) at [https://hexdocs.pm/seely](https://hexdocs.pm/seely).\n\n## Implementation\n\n## Define your router\n\n    defmodule YourApp.YourRouter do\n      def routes,\n        do: [\n          {\"echo\", Seely.EchoController, :echo},\n          {\"your_function\", YourApp.YourController, :your_function}\n        ]\n\n      def parse_opts,\n        do: [\n          strict: [upper: :boolean, trim: :boolean,\n                   myopt: :string]\n        ]\n    end\n\n`--upper` and `--trim` can be used with the echo command from the `Seely.EchoController`.\n\n## Define your controller\n\n    defmodule YourApp.YourController do\n\n      def your_function(params \\\\ [\"\"], opts \\\\ []) do\n        myopy = Keyword.get(opts, :myopt, \"not found\")\n        output =\n          \"Produced by your_function in MyController #{myopy}, #{inspect parmams}\"\n\n        {:ok, output}\n      end\n    end\n\n## Start with your application\n\n    use Application\n\n    def start(_type, _args) do\n      children = [\n        #...,\n        {Seely.Main, YourRouter}\n      ]\n\n      opts = [strategy: :one_for_one, name: YourApp.Supervisor]\n      Supervisor.start_link(children, opts)\n    end\n\n## Start manually\n\n    {:ok, main} = Seely.Main.start_link(YourRouter)\n\n\n## Usage\n\nWrite your Seely-Controllers and Seely-Router and use `Seely.API.cli()` to run a REPL\nfor your router and controllers.\n\n    iex -S mix  # in your project\n    iex\u003e Seely.API.cli\n    CLI (1) your_function --myopt \"some option\" some params\n    {:ok, \"Produced by your_function in YourController 'some params' '{myopt: 'some option'}\"}\n\n    CLI (2) echo --upper --trim \" Hello, world!      \"\n    {:ok, \"HELLO, WORLD!\"}\n\n    CLI (3) something not implemented\n    {:error, \"No route found\"}\n\n    CLI (4) echo --wrong thing\n    {:error, \"invalid parameter --wrong\"}\n\n    CLI (5) exit\n    iex\u003e Ctrl+C\n\n## More to come\n\nIn this very early version, `Seely` can run a single loop on a node. Although, the\narchitecture of `Main` and `Session` will allow to scale in further versions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiboard%2Fseely","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiboard%2Fseely","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiboard%2Fseely/lists"}