Project

ruflet_cli

0.01
No release in over 3 years
Ruflet command line interface for creating and running Ruflet apps.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

~> 2.2
 Project Readme

Ruflet

Ruflet is a Ruby port of Flet for building web, desktop, and mobile apps in Ruby.

Class-based apps are the recommended and documented standard:

  • class MyApp < Ruflet::App
  • implement def view(page)

Start Here

  1. Install mobile client app from releases:
  1. Install Ruflet CLI from RubyGems:
gem install ruflet_cli
  1. Create and run your first app:
ruflet new my_app
cd my_app
bundle install
ruflet run main.rb

CLI output after creation:

Ruflet app created: my_app
  1. Open Ruflet mobile client and connect:
  • Enter URL manually, or
  • Tap Scan QR and scan QR shown by ruflet run ...

Package Split

Ruflet is split into packages:

  • ruflet: core runtime (includes protocol + UI)
  • ruflet_server: WebSocket runtime (Ruflet.run backend)
  • ruflet_cli: CLI executable (ruflet)
  • ruflet_rails: Rails integration/protocol adapter

Monorepo folders:

  • packages/ruflet
  • packages/ruflet_server
  • packages/ruflet_cli
  • packages/ruflet_rails

New Project Behavior

ruflet new <appname> generates a Gemfile using RubyGems dependencies:

  • gem "ruflet", ">= 0.0.2"
  • gem "ruflet_server", ">= 0.0.2"

It does not add ruflet_cli to app dependencies.

That keeps CLI global/tooling-level and app deps runtime-focused.

App Style (Required in docs/examples)

Use class-based apps:

require "ruflet"

class MyApp < Ruflet::App
  def view(page)
    page.vertical_alignment = Ruflet::MainAxisAlignment::CENTER
    page.horizontal_alignment = Ruflet::CrossAxisAlignment::CENTER
    page.title = "Hello"
    page.add(text(value: "Hello Ruflet"))
  end
end

MyApp.new.run

Widget builders are global/free helpers (text, row, column, container, etc.). Use page only for runtime/page operations (add, update, go, show_dialog, pop_dialog).

CLI

ruflet new <appname>
ruflet run [scriptname|path] [--web|--mobile|--desktop]
ruflet build <apk|ios|aab|web|macos|windows|linux|zip>

For monorepo development (always uses local CLI source), run:

By default ruflet build ... looks for Flutter client at ./ruflet_client. Set RUFLET_CLIENT_DIR to override.

Development (Monorepo)

cd /Users/macbookpro/Documents/Izeesoft/FlutterApp/ruflet
/opt/homebrew/opt/ruby/bin/bundle install

Documentation