No release in over 3 years
Write chrome extensions with ruby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

~> 1.4.0
 Project Readme

a library to write chrome extensions using Ruby

Guide

Install gem

gem install chrome_extension

Generating a new project

Generate a new chrome extension project by running the chrome_extension new command in terminal

chrome_extension new my_extension

this will create a folder with your project starter files

Build chrome extension

run the build comand and pass in path to ruby file

chrome_extension build my_extension.rb

this will create a folder containing your chrome extension which you can load into chrome chrome://extensions/ in browser go here and toggle on developer mode. then you will see a "load unpacked" button you can click there and select your chrome extension folder.

Creating project folder from scratch guide

create a folder for your extension

mkdir my_extension

cd directory

cd my_extension

create ruby file for extension

touch my_extension.rb

create popup html file

touch popup.html

add a icon I use svgrepo

icon.png

inside the ruby file you need to create a class that inherits from ChromeExtension you can copy this code for a basic starting template

  require "chrome_extension"

  class MyExtension < ChromeExtension
    name "Example chrome extension"
    description "This is a basic chrome extension"
    version "1.0" 
    manifest_version "3"
    default_popup "popup.html"
    default_icon "icon.png"
  end