Skip to content
codecaine-zzPublic

About

simple_gg is a lightweight, beginner-friendly UI framework for building native, hardware-accelerated desktop applications in V. Built on top of V's native gg graphics module (powered by Sokol), simple_gg delivers smooth performance and uniform UI rendering across macOS, Linux, and Windows.

Topics

Resources

Stars

10 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

109 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

simple_gg - Cross-Platform SimpleGUI for V

simple_gg is a lightweight, beginner-friendly UI framework for building native, hardware-accelerated desktop applications in V. Built on top of V's native gg graphics module (powered by Sokol), simple_gg delivers smooth performance and uniform UI rendering across macOS, Linux, and Windows without relying on external C/Obj-C dependencies.


๐ŸŽฌ Video Tutorials & Complete Interactive Masterclass (M4 Ultra ยท 6K XDR)

simple_gg God-Mode YouTube Masterclass Tutorial (M4 Ultra 6K XDR)

Watch the complete Plain-English Video Tutorial Suite (recorded on an Apple Mac Studio M4 Ultra ยท 32c CPU ยท 80c Metal 4 GPU ยท 192GB Unified LPDDR5X ยท Pro Display XDR 6K 120Hz) covering every widget, layout, theme, shader, example, desktop studio application, CLI utility, security helper, and vlang_utils module in friendly, easy-to-follow language:

Video / Guide File Link Resolution & Format Duration Description
1. Full Masterclass Tutorial (16:9) simple_gg_full_tutorial.mp4 1920ร—1080 ยท 30fps H.264 + AAC 19:19 Complete 10-Chapter, 28-Step beginner-to-pro walkthrough of the entire simple_gg ecosystem.
2. Short Highlight Tour (16:9) simple_gg_short_tutorial.mp4 1920ร—1080 ยท 30fps H.264 + AAC 02:43 Fast 5-Step plain-English highlight tour of widgets, 260+ themes, shaders, 47 apps & 45 vlang_utils.
3. Vertical YouTube Short (9:16) simple_gg_youtube_short_9x16.mp4 1080ร—1920 ยท 30fps H.264 + AAC 00:54 Mobile-ready 4-Scene vertical YouTube Short / Reel with live GPU canvas & V quickstart code.
4. Complete Video Tutorial Guide VIDEO_TUTORIAL.md Markdown + Timestamps โ€” Full companion documentation, chapter notes (SIMPLE_GG_FULL_TUTORIAL_NOTES.md), and upload guide.

โฑ๏ธ Full Masterclass Tutorial Timestamps (19:19 โ€” 10 Chapters & 28 Steps)

Timestamp Chapter / Step Plain-English Summary & What You Learn Source Files
00:00 Chapter 01 Welcome to simple_gg โ€” What It Is, Why It Is So Fast & 1-Minute Setup main.v
00:03 CH 01 ยท WHAT IS SIMPLE_GG? Why simple_gg? No 200 MB browser bloatโ€”draws directly on your GPU (Metal, OpenGL, D3D11) for 0.42s builds, 1.4 MB apps & locked 120 FPS. main.v, simplegui/
00:49 CH 01 ยท EASY 1-MINUTE SETUP Clone the repo, link simplegui & simplecli into ~/.vmodules, and run v run main.v on macOS, Linux, or Windows. install_homebrew_dependencies.sh
01:29 CH 01 ยท 3 EASY CODING STYLES 3 Beginner-Friendly Coding Styles: Classic Named IDs (ex01), Nameless Shortcuts (ex05), and Fluent Chaining (ex09). examples/01, 05, 09
02:09 Chapter 02 Smart Layouts, Forms & Everyday Building Blocks simplegui/layout.v
02:12 CH 02 ยท ROWS, GRIDS & DASHBOARDS Zero pixel math! Use begin_row, begin_grid, and win.group to arrange KPI dashboards automatically. examples/03, 06
02:47 CH 02 ยท FORMS, TABS & TOOLBARS Sliders, steppers, star ratings, date pickers, tree views, tabs, toolbars & password strength meters. examples/04, 07, 10, 15
03:15 Chapter 03 DevStudio Workspace Pro (Tabs 1โ€“3) โ€” Analytics, Tree Grids & Smart Forms main.v
03:19 CH 03 ยท TAB 1 & SLIDE-OVER DRAWER Left Navigation Rail, Smooth Area Chart, 26-Week Activity Heatmap, Flow Tags, UI Zoom & Slide-Over Drawer. main.v (Tab 1)
03:54 CH 03 ยท TAB 2: TREE GRID & CALENDAR Expandable Folder Hierarchy Tree Table (add_tree_table) + Interactive Monthly Calendar (add_calendar). main.v (Tab 2)
04:23 CH 03 ยท TAB 3: SMART FORMS & MARKDOWN Auto-Formatting Phone/IP Masks, Password Eye Toggle, Hotkey Recorder, Team Avatars & Native Markdown Viewer. main.v (Tab 3)
05:03 Chapter 04 DevStudio Workspace Pro (Tabs 4โ€“6) โ€” Audio Studio, Stock Charts & AI DevTools main.v
05:06 CH 04 ยท TAB 4: STUDIO & AUDIO FX Bar & Donut Charts, Live 24-Band FFT Spectrum Analyzer, Rotary Synth Knobs, Stereo VU Meter, 7-Band EQ & 2D XY Pad. main.v (Tab 4)
05:46 CH 04 ยท TAB 5: RADAR, STOCKS & TIMELINE 6-Axis Radar Spider Chart, Stock OHLC Candlesticks, Radial Speedometer Gauge, Gantt Roadmap & 4-Track Video Timeline. main.v (Tab 5)
06:22 CH 04 ยท TAB 6: NODES, AI CHAT, HEX & DIFF Visual Node Graph (add_node_graph), AI Chat (add_chat_view), Hex Inspector (add_hex_viewer) & Git Diff (add_diff_viewer). main.v (Tab 6)
06:55 Chapter 05 3D Isometric Folders & All 260+ Studio / GPU FX Themes (Tab 7) simplegui/theme_fx_catalog.v
06:59 CH 05 ยท 5 HARDWARE THEME TIERS 260+ Themes in 5 Hardware Tiers: Tier 1 (0% E-Ink/OLED), Tier 2 (60Hz), Tier 3 (120Hz Glass/24K Gold), Tier 4 (Ultra 6K) & Tier 5 (M4 Extreme). main.v (Tab 7), examples/02
07:41 CH 05 ยท LIVE 3D FOLDER SHADERS Live 120Hz Folder Shaders: Polar Aurora Icicles, Hellfire Embers, Holiday Fairy Lights, Dali Acid Melt, M4 Titanium & Golden Halos. simplegui/render_fx.v
08:18 Chapter 06 Live Physics Shaders, 3D/4D Wireframes, Particles & Retro CRT Filters simplegui/render_fx.v
08:21 CH 06 ยท 8 LIVE PHYSICS SHADERS 8 Built-In Physics Shaders (add_shader_viewport): Black Hole, Tokamak Fusion, Lorentz Butterfly, Ferrofluid, Tornado, Tesla, Calabi-Yau & 3D DNA. main.v (Tab 8)
08:59 CH 06 ยท 3D WIREFRAMES, PARTICLES & CRT 4D Tesseract Wireframes (add_wireframe_3d), Gravity Particle Fountain, Bezier Curve Editor, CRT Scope & Full-Window Screen Filters. main.v (Tab 8)
09:39 Chapter 07 RAD Form Builder, Reactive State Store, Data Binding & Spy++ simplegui/state.v
09:42 CH 07 ยท RAD BUILDER & DATA TABLE PRO One-Line JSON Form Export (export_form_json), Sortable Data Table Pro, Transfer Lists, Split Views & Command Palette (Ctrl+K). examples/08, 11, 14
10:26 CH 07 ยท REACTIVE STATE, BINDING & FONTS Reactive State & Auto-Save (ex13), Two-Way Binding (ex17), Interval Timers (ex16) & Custom TTF/OTF Fonts (ex18). examples/13, 16, 17, 18
11:12 CH 07 ยท SPY++, OS CALLS & STDLIB Live Cross-Window sys_spy_window UI Inspector, Native Notifications, Clipboard, HTTP/Crypto, Collections & OS Telemetry. examples/12, 19, 20, 21
11:56 Chapter 08 Modern Super Controls, High-DPI Image Galleries & 3D Glossy Dialogs simplegui/control.v
12:00 CH 08 ยท MODERN SUPER CONTROLS (EX 22) Wizard Steppers, Sparkline Stat Cards, Health Score Cards, Code Studio, Super Terminal & 4-Column Kanban Board. examples/22
12:40 CH 08 ยท IMAGE GALLERIES & MEDIA PLAYER (EX 23) Hero Banners, Verified Profile Cards, 3D App Launcher Tiles, Image Carousels, Media Player & Product Cards. examples/23
13:16 CH 08 ยท 3D GLOSSY MODAL DIALOGS (EX 24โ€“25) 10 Custom 3D Glossy Modal Dialogs: Success, Error, Security, Cloud, 3-Button Confirmations & Inline Text Prompts. examples/24, 25
13:46 Chapter 09 All 47 Ready-to-Run Native Desktop Studio Applications applications/
13:49 CH 09 ยท FLAGSHIP ALL-IN-ONE HUBS omnitool_studio.v (41-in-1), media_studio_hub.v, app_bundler_studio.v (macOS .app packager) & watchexec_studio.v. applications/README.md
14:37 CH 09 ยท DEVOPS, DB & SECURITY STUDIOS 13 DevOps, DB & Security Studios: SQLite, Docker, Task Manager, Disk, Launchd, Brew, API, Crypto, Nmap, DNS, IFConfig, Recon & Subfinder. applications/README.md
15:20 CH 09 ยท MEDIA, SEARCH & TEXT STUDIOS 22 Media & Text Studios: FFmpeg, ImageMagick, YT-DLP, OCR, Pandoc, Ouch, Text Editor Pro, Regex, Ripgrep, FD & JQ JSON Studio. applications/README.md
16:11 CH 09 ยท DATA SCIENCE & MATH STUDIOS 8 Data Science & Math Studios: Statistics, Graph Plotter, Graphviz DOT, DataConvert, Programmer Calc, Qalc, Kalker & Numbat Physics. applications/README.md
16:52 Chapter 10 simplecli Framework, 49 CLI Apps, Security Shield & All 45 vlang_utils simplecli/, UTILS_API.md
16:56 CH 10 ยท SIMPLECLI & 49 CLI APPS simplecli (examples/26โ€“28) + 49 cli_apps/*.v utilities: ANSI Banners, Tables, Interactive Prompts & calc_cli.v Bitwise Engine. simplecli/simplecli.v, cli_apps/
17:36 CH 10 ยท BUILT-IN SECURITY SHIELD Shell-injection & path-traversal defense (simplegui/security.v): quote_arg, quote_path, exec_safe, exec_safe_stdin & sanitize_filename. simplegui/security.v
18:19 CH 10 ยท ALL 45 VLANG_UTILS MODULES All 45 zero-dependency vlang_utils modules (examples/29 + UTILS_API.md + demos/run_all_demos.v: 45/45 PASS). examples/29, UTILS_API.md
โšก Click to view timestamps for the 2-Minute Short Tour (`02:43`) & Vertical 9:16 YouTube Short (`00:54`)

16:9 Short Highlight Tour (youtube_production/simple_gg_short_tutorial.mp4 โ€” 02:43)

  • 00:00 โ€” Title Card: simple_gg High-Speed Plain-English Highlight Tour (M4 Ultra ยท 6K XDR)
  • 00:03 โ€” 01 ยท 120HZ NATIVE V GUI: Compiles in 0.42s to a 1.4 MB native app running at 120 FPS on Mac, Linux & Windows.
  • 00:34 โ€” 02 ยท 65+ EASY WIDGETS: Folder Tree Tables, Calendars, Markdown, Audio FFT & Knobs, Stock Candlesticks, Video Timeline & Visual Node Graph.
  • 01:02 โ€” 03 ยท 260+ THEMES & SHADERS: Hanging Icicles, Hellfire Embers, Gargantua Black Hole, Tesla Globe, 11D Calabi-Yau, 4D Tesseract & Matrix Filter.
  • 01:37 โ€” 04 ยท 3D DIALOGS & 47 APPS: 3D Glossy Modal Dialogs (ex24), Image Carousels (ex23) & 47 Ready-to-Use Desktop Studios (OmniTool Pro, SQLite, Docker, FFmpeg).
  • 02:10 โ€” 05 ยท SIMPLECLI & 45 VLANG_UTILS: 49 CLI Apps (simplecli) + Security Shield (security.v) + 45 vlang_utils Modules (45/45 PASS).

9:16 Vertical YouTube Short (youtube_production/simple_gg_youtube_short_9x16.mp4 โ€” 00:54)

  • 00:00 โ€” Scene 1: 120Hz Native Desktop GUI for V (DevStudio Workspace Pro + 5-line V quickstart)
  • 00:13 โ€” Scene 2: 65+ Easy Widgets (Live FFT Spectrum, Rotary Knobs, 7-Band EQ, Candlesticks, Node Graph & 3D Dialogs)
  • 00:26 โ€” Scene 3: 260+ GPU FX Themes & 8 Physics Shaders (Compiz Hellfire, Polar Aurora 6K, Gargantua Black Hole, 11D Calabi-Yau)
  • 00:40 โ€” Scene 4: 47 Native Workstations + 45 vlang_utils Modules (OmniTool Studio Pro 41-in-1 + git clone)

Visual Showcase & Snapshots of All Examples

Modern UI Suite & Ergonomic Enhancements Demo Custom 3D Image Dialogs Demo

Modern Image Controls Demo Super Controls Suite Demo

RAD Controls Showcase Dashboard App Demo

๐Ÿ“ธ Click to view remaining example screenshots (19 more)

01 - Quickstart Demo 02 - Theme Gallery Demo

03 - Layout Containers Demo 04 - Component Gallery Demo

05 - Nameless Shortcuts Demo 07 - Advanced Controls Demo

08 - RAD Application Builder Demo 09 - Control Customization Demo

10 - More UI Controls Demo 11 - Data Table Pro Demo

12 - System & Stdlib Toolkit Demo 13 - Reactive State Store Demo

15 - Modern UI Features Showcase Demo 16 - Interval Timers Demo

17 - Data & Event Binding Demo 18 - Custom Font Typography Demo

19 - Cross-Window Spy Demo 20 - Stdlib Data Structures Demo

21 - Extended OS System Calls Demo 29 - Vlang Utils Showcase Demo


Key Features

  • Cross-Platform: Runs natively on macOS, Linux, and Windows with native OS drag-and-drop support.
  • 260+ Built-in Studio & GPU FX Themes: Includes 87 core production palettes (list_themes()) plus 187 GPU FX & 20 Master Tiered Custom Themes (list_fx_themes(), list_all_studio_themes()) across 5 hardware graphics tiers (low, medium, high, ultra, extreme) with multi-layer procedural atmospheres and 3D folder shaders.
  • RAD Development Controls Suite: Multi-select Tag Input, Dual-Thumb Range Slider, Monospace Code Editor, File Drop Zone, Property Grid Inspector, Sparkline Micro-Charts, Pagination Bar, Resizable Split View, Toast Notification Overlay Stack, Command Palette (Ctrl+K), and Context Menus.
  • Studio, Analytics, DevTools & GPU VFX Controls: Rotary Knobs, Stepper Inputs, Stereo VU Level Meters, Graphic Equalizer, 2D XY Morph Pad, Categorical Bar Charts, Ring/Donut Charts, FFT Spectrum Analyzer, Radar/Spider Charts, Financial OHLC Candlesticks, Radial Gauges, Gantt Roadmaps, Multi-Track Video Timeline, Visual Node Graph, AI Copilot Chat View, Hex Memory Inspector, Unified Git Diff Viewer, 3D Folder Grid, Theme FX Studio, Live Shader Viewport, 3D Wireframe Viewer, 2D Physics Particle Emitter, Cubic-Bezier Keyframe Editor, CRT Cyberdeck Monitor, and Multi-Pass VFX Compositor Deck.
  • Complete Widget Set: ListBox (interactive single/multi select), ComboBox, Transfer List, Console Output Viewer, Color Palette Swatch Grid, Status Bar, Step Slider, text/password inputs, masked inputs, hotkey inputs, inline editable labels, avatar groups, callout banners, steppers, range sliders, toggle switches, checkboxes, dropdowns, segmented controls, rating stars, date pickers, month calendars, metric cards, charts, tree views, hierarchical tree tables, data tables, breadcrumbs, avatars, status badges, accordions, markdown views, and alert banners.
  • Layout Engine: Automatic vertical stacking, horizontal rows (begin_row), multi-column grids (begin_grid), flexboxes (begin_flex_box), auto-wrapping flow layouts (begin_flow_layout), slide-over drawers (show_drawer), collapsible navigation rails (add_nav_rail), tab containers, and group cards.
  • Reactive State Management & Universal Persistence (state.v): Key-value reactive store (set_state, get_state), typed accessors, reactive state listeners (on_state_change), atomic crash-proof disk persistence (save_app_state, load_app_state), automated per-application form state restoration on launch, global theme auto-save, and window session restoration (save_window_session, restore_window_session).
  • OS & System Extensions (sys.v): Standardized user directory lookups for macOS (~/Library), Windows (%APPDATA%), and Linux ($XDG_*), path expansion with tilde (~) and environment variable resolution, native notifications, hardware metrics, process execution, clipboard, and file operations.
  • Headless Console & RAD Toolkit (simplecli): Full-featured zero-window CLI framework with flag parsing, ANSI colors, tables, interactive prompts, multi-level logging, process control, hardware probing, and cryptography.
  • V Standard Library Integrations (stdlib.v): Built-in fluent helpers for HTTP requests, RegEx matching, Cryptography (SHA256, MD5, AES, Bcrypt), Gzip/Zlib/Zstd compression, TOML parsing, SemVer checks, and WebSockets.
  • 45 Bundled Production Utility Modules (vlang_utils): Zero-boilerplate ergonomic toolkit ready to import anywhere (archiveutils, asyncutils, bitutils, cacheutils, cliutils, colorutils, compressutils, configutils, cronutils, cryptoutils, diffutils, envutils, eventutils, fileutils, flowutils, graphutils, htmlutils, httputils, idutils, jsonutils, jwtutils, logutils, markdownutils, mathutils, mockutils, netutils, procutils, regexutils, semverutils, sliceutils, sqlbuilder, sqliteutils, stateutils, statutils, structutils, strutils, sysutils, tarutils, templateutils, testutils, timeutils, tomlutils, urlutils, validutils, webutils). Full manual in UTILS_API.md.
  • Beginner Friendly: Fluent chainable builder API with zero boilerplate.

๐Ÿ“ฆ Installation & Module Setup

1. Install from GitHub (recommended for this repo)

This repository is currently published under the GitHub repo name simple_gg, but the V module you import is simplegui.

If you cloned the project manually, put it in your V module path so imports resolve correctly:

git clone https://github.com/codecaine-zz/simple_gg.git
mkdir -p ~/.vmodules
ln -s "$PWD/simple_gg/simplegui" ~/.vmodules/simplegui

Then run examples from the project directory or from any project that imports simplegui.

If the package is later published to VPM under a matching name, the standard v install ... flow will work as usual. For this repo today, linking the repository's simplegui/ directory at ~/.vmodules/simplegui is the reliable Linux/macOS workflow.

2. Install Homebrew dependencies (macOS)

For a default install on macOS, run the projectโ€™s bundled Homebrew installer:

./install_homebrew_dependencies.sh

This installs the required runtime tools used by the project and apps, such as FFmpeg, ImageMagick, jq, rg, pandoc, sqlite, nmap, and related toolchain utilities.

If you also want optional cross-compilation toolchains for Windows builds, install them explicitly:

./install_homebrew_dependencies.sh --optional

This adds zig and mingw-w64, which are only needed for Windows-targeted builds and are not required for the normal app runtime.

You can also install only the base bundle directly:

brew bundle --file ./Brewfile

3. Linux System Dependencies

On Linux (Debian / Ubuntu / Pop!_OS / Mint), ensure standard X11/GL development headers are present:

# The project dependency checker is cross-platform and will show Linux guidance:
v run install_dependencies.vsh --check

# Or install manually via apt:
sudo apt update
sudo apt install -y libx11-dev libxcursor-dev libxi-dev libgl1-mesa-dev libasound2-dev xclip

4. Naming & Import Convention

Element Name Description
Repository Name simple_gg The GitHub project name (SimpleGUI built on V's gg engine).
V Module Name simplegui Used in all code across macOS, Linux, and Windows: import simplegui
Headless CLI Module simplecli Zero-window terminal apps across all platforms: import simplecli

5. V Compiler Version & v up Maintenance

simple_gg is developed and validated against V 0.5.2 (commit 9e9f7f05 / V3 compiler backend). All test suites, 45 utility module demos, 29 examples, 47 desktop workstations, and 49 CLI tools are tested and verified on this build.

โš ๏ธ Caution with v up

Running v up directly pulls rolling changes from the V master branch, which can occasionally introduce compiler bootstrap issues or codegen regressions:

  • cheaders.v / EmbedFileData Panic: If v up pulls a commit where embedded C headers are restructured before the bootstrap pre-built vc sources are synchronized, running v will fail with:
    V panic: EmbedFileData error: files ... cheaders.v do not exist
    
  • Interface Dispatch Mismatches (json2, io.Reader): Upstream master changes can affect generic interface method dispatch parameter resolution (e.g., when streaming io.Reader in json2 encounters types with zero-parameter read methods).

๐Ÿ”„ How to Safely Rebuild / Recover V

If running v up leaves your V installation broken or unable to compile, restore it cleanly from bootstrap C code (vc):

cd /path/to/v

# 1. Fetch latest changes or pin to verified commit
git fetch origin
git checkout 9e9f7f05   # Verified working commit (or master)

# 2. Bootstrap from the official vc repository
git clone --depth 1 https://github.com/vlang/vc /tmp/vc
cc -std=gnu99 -w -o v /tmp/vc/v.c -lm -lpthread

# 3. Recompile V self-hosted
./v self

# 4. Clean out any obsolete fallback caches
rm -rf ~/.cache/v/v1-fallback

๐Ÿ’ก Environment Flag (VFLAGS) Best Practice

On macOS with Homebrew, if you set library search paths via VFLAGS in ~/.zshrc or ~/.bashrc, specify -ldflags separately for each path to avoid argument-splitting failures during recursive sub-invocations (e.g. v test or v crun):

# โœ… Recommended (avoids nested quoting errors in subshells):
export VFLAGS="-ldflags -L/opt/homebrew/lib -ldflags -L/usr/local/lib"

# โŒ Avoid (inner quotes break argument tokenization in V child processes):
# export VFLAGS="-ldflags '-L/opt/homebrew/lib -L/usr/local/lib'"

Quick Start

module main

import simplegui

fn main() {
	mut win := simplegui.new_simple_window('My App', 520, 380)
	win.set_theme('Apple Dark')
	win.add_heading('SimpleGUI Starter')
	win.add_form_field('Name:', 'username', 'Ada Lovelace')
	win.add_checkbox('agree', 'I agree to the Terms', true)

	win.add_button('btn_save', 'Save')
	win.on_click('btn_save', fn (mut win simplegui.SimpleWindow) {
		println("User: ${win.get_text('username')}")
	})

	win.run()
}

Beginner-Friendly Examples & Snapshots

The repository includes 29 beginner-friendly example programs in the examples/ directory:

Example Description Run Command Snapshot
01_quickstart.v First starter app with inputs and button callbacks. v run examples/01_quickstart.v ๐Ÿ“ธ Snapshot
02_theme_gallery.v Complete tabbed control gallery with an always-visible live switcher across 87 production palettes. v run examples/02_theme_gallery.v ๐Ÿ“ธ Snapshot
03_layout_containers.v Horizontal rows, multi-column grids, and group cards. v run examples/03_layout_containers.v ๐Ÿ“ธ Snapshot
04_widgets_and_forms.v Form inputs, sliders, steppers, ratings, dates, and metric cards. v run examples/04_widgets_and_forms.v ๐Ÿ“ธ Snapshot
05_nameless_shortcuts.v Rapid prototyping using nameless shortcuts (win.input()). v run examples/05_nameless_shortcuts.v ๐Ÿ“ธ Snapshot
06_dashboard_app.v Real-world dashboard with KPI metrics, charts, and actions. v run examples/06_dashboard_app.v ๐Ÿ“ธ Snapshot
07_advanced_controls.v Data tables, tab containers, tree views, search, breadcrumbs, avatars, and shortcuts. v run examples/07_advanced_controls.v ๐Ÿ“ธ Snapshot
08_rad_development.v Rapid app builder with batch ops, JSON form export, clipboard, and OS dialogs. v run examples/08_rad_development.v ๐Ÿ“ธ Snapshot
09_control_customization.v Custom geometry, margins/padding, colors, borders, and fluent control chaining. v run examples/09_control_customization.v ๐Ÿ“ธ Snapshot
10_more_controls.v Icon buttons, toolbars, hyperlinks, checklists, chips, and password strength meter. v run examples/10_more_controls.v ๐Ÿ“ธ Snapshot
11_data_table_pro.v Sortable data tables, wheel scrolling, row hover, and table manipulation. v run examples/11_data_table_pro.v ๐Ÿ“ธ Snapshot
12_system_and_stdlib_features.v Desktop notifications, hardware specs, clipboard, system paths, HTTP GET, RegEx, Crypto. v run examples/12_system_and_stdlib_features.v ๐Ÿ“ธ Snapshot
13_reactive_state_store.v Reactive key-value state store, typed accessors, state change listeners, and JSON disk persistence. v run examples/13_reactive_state_store.v ๐Ÿ“ธ Snapshot
14_rad_controls_showcase.v RAD & Advanced Suite: ListBox, Multi-Select ListBox, ComboBox, Transfer List, Code Editor, Console Log, Color Palette, Step Slider, Status Bar, Tag Input, Range Slider, Drop Zone, Property Grid, Sparkline, Pagination, Split View, Toasts, Command Palette, Context Menu. v run examples/14_rad_controls_showcase.v ๐Ÿ“ธ Snapshot
15_modern_ui_features_showcase.v Modern UI Showcase: Window controls, themes, layouts, forms, state store, system utilities. v run examples/15_modern_ui_features_showcase.v ๐Ÿ“ธ Snapshot
16_interval_timers.v Interval Timers & Timeouts: Recurring timers, timeouts, clock, auto progress bar. v run examples/16_interval_timers.v ๐Ÿ“ธ Snapshot
17_data_and_event_binding.v Data & Event Binding: Two-way state binding (bind_state), click aliases, shortcut bindings. v run examples/17_data_and_event_binding.v ๐Ÿ“ธ Snapshot
18_custom_font_loading.v Custom Font & Typography: Platform font resolution, custom TTF/OTF setting, font discovery. v run examples/18_custom_font_loading.v ๐Ÿ“ธ Snapshot
19_cross_window_spy_and_automation.v Cross-Window Spy++ & Automation: Global window registry, control inspection, event bus. v run examples/19_cross_window_spy_and_automation.v ๐Ÿ“ธ Snapshot
20_stdlib_data_structures_math_and_sockets.v Collections, Math & Sockets: Stack, Queue, Set, MinHeap, BigInt, string distance metrics. v run examples/20_stdlib_data_structures_math_and_sockets.v ๐Ÿ“ธ Snapshot
21_extended_os_system_calls.v Extended OS & Hardware: CPU/memory pressure, environment variables, audio beeps, zip. v run examples/21_extended_os_system_calls.v ๐Ÿ“ธ Snapshot
22_modern_super_controls_showcase.v Super Controls Suite: Super Terminal, Code Studio, Smart Table, Kanban Board, Wizard Stepper, Floating Toolbar, Score Card, Sparklines, Donut Chart, Chip Input. v run examples/22_modern_super_controls_showcase.v ๐Ÿ“ธ Snapshot
23_modern_image_controls_showcase.v Modern Image Controls: User Profile Cards, Product Cards, Multi-Image Showcase Gallery, 3D App Launcher Tiles, Media Player Card, Hero Banners, and Hardware Texture Caching. v run examples/23_modern_image_controls_showcase.v ๐Ÿ“ธ Snapshot
24_custom_image_dialogs_showcase.v RAD Custom 3D Image Dialogs: 3D glossy icons (Success, Error, Warning, Info, Confirm, Danger, Security, Database, Cloud, Tip), 3-button actions, Checkboxes & Inline Input Prompts. v run examples/24_custom_image_dialogs_showcase.v ๐Ÿ“ธ Snapshot
25_modern_ui_suite_and_ergonomics.v Modern UI Suite & Ergonomic Enhancements: Slide-over Drawer, Collapsible Nav Rail, Spline Area Chart, Activity Heatmap, Dynamic Flow Chips, Tree Grid, Month Calendar, Masked Inputs & Markdown Viewer. v run examples/25_modern_ui_suite_and_ergonomics.v ๐Ÿ“ธ Snapshot
26_simplecli_system_monitor.v SimpleCLI Headless System Monitor: CPU/RAM/Disk metrics, load averages, battery status, ASCII tables & panels. v run examples/26_simplecli_system_monitor.v Console CLI
27_simplecli_rad_interactive_tool.v SimpleCLI Interactive RAD Wizard: Banners, selects, multi-selects, prompts, progress bars & state persistence. v run examples/27_simplecli_rad_interactive_tool.v Console CLI
28_simplecli_process_and_automation.v SimpleCLI Process & Task Automation: Command timeouts, retry loops, AES encryption, clipboard & desktop alerts. v run examples/28_simplecli_process_and_automation.v Console CLI
29_vlang_utils_showcase.v Vlang Utils Showcase: String case transforms, statistical analytics, WCAG contrast checks, SemVer, relative time, and synthetic mock data. v run examples/29_vlang_utils_showcase.v ๐Ÿ“ธ Snapshot

simplecli - Headless Console & RAD Toolkit (Zero GUI Dependencies)

Need all the power of OS system calls, process management, hardware monitoring, desktop alerts, speech synthesis, standard paths, and stdlib crypto/HTTP without spinning up a graphical window? Use import simplecli!

module main

import simplecli

fn main() {
	mut app := simplecli.new_app('DeployCLI', '1.0.0')
	app.banner('DeployCLI Workspace', 'v1.0.0')

	// System metrics & paths
	cpu := app.get_cpu_info()
	ram := app.get_memory_info()
	app.print_kv({ 'CPU': cpu, 'RAM': ram })

	// Interactive RAD prompts & tables
	env := app.select('Target environment', ['dev', 'staging', 'prod'])
	app.success('Selected ${env}')

	// Desktop notification
	app.notify('Ready', 'DeployCLI initialized.')
}

See CLI_API.md for the complete SimpleCLI documentation and API reference.


๐Ÿ’ป Production Console Applications Suite (cli_apps/ - 49 Utilities)

simple_gg includes 49 zero-window command-line applications and client versions of the GUI workstations in the cli_apps/ directory:

Category Applications Key Highlights
DevOps & Cloud Sentinel, Docker CLI, Launchd CLI, Task Manager, Disk CLI, Git Pilot, App Bundler Container stats, process monitors, backup vaults & crontabs.
Security & Network Nmap CLI, DNS & SSL CLI, Recon CLI, Subfinder, IFConfig CLI, Crypto Studio, Vault Port scanning, WHOIS, certificate transparency, AES-256 & hashes.
Data & Databases JQ CLI, Data Convert CLI, SQLite Studio CLI, API Stress Bench, API Studio CLI JSON queries, CSV/TSV/TOML conversion, SQLite REPL & REST client.
Media & Audio FFmpeg CLI, ImageMagick CLI, yt-dlp CLI, Audio Tag, ExifTool, OCR, Say TTS Video transcoding, image resizing, stream downloader & speech.
Text & Stream GAWK CLI, Sed CLI, SD CLI, Cut CLI, TR CLI, Regex CLI, Ripgrep, FD, Find Fast stream transformation, pattern matching & file traversal.
Math & Science Numbat Units, Kalker Math, Qalc Studio, Programmer Calc, Stats, Graph CLI Physical dimensional analysis, arbitrary precision & ASCII charts.
Docs & Archives Pandoc CLI, Ouch Archive CLI, Wget2 Downloader, Text Editor CLI Document conversion, universal archives (ZIP/7z/zstd) & downloader.

See cli_apps/README.md for the complete catalog of all 49 command-line applications.


Production Workstations & Studio Applications (47 Workstations)

simple_gg includes 47 desktop applications in the applications/ directory, covering devtools, media studios, network utilities, data converters, and security workstations:

OmniTool Studio Pro Watchexec Studio Pro

App Bundler Studio Pro Media & Data Studio Hub

Text Editor Pro Task Manager Pro

Application Category Description Run Command Snapshot
omnitool_studio.v DevTools AAA utility suite: fd, sd, watchexec, wget2, rg, rip, ouch, bat, eza. v run applications/omnitool_studio.v Screenshot
watchexec_studio.v DevTools Filesystem watcher, auto-reload runner, debounce & glob filters. v run applications/watchexec_studio.v Screenshot
app_bundler_studio.v DevTools macOS .app bundler, Retina .icns generator & packager. v run applications/app_bundler_studio.v Screenshot
api_studio.v DevTools Modern API testing client & HTTP request builder. v run applications/api_studio.v Screenshot
media_studio_hub.v Media Master workstation with instant one-click media tools. v run applications/media_studio_hub.v Screenshot
ffmpeg_studio.v Media Video/audio encoding, trimming, and format transcoding. v run applications/ffmpeg_studio.v Screenshot
sqlite_studio.v Database Interactive SQLite schema inspector & query executor. v run applications/sqlite_studio.v Screenshot
docker_studio.v DevOps Container inspector, logs viewer, and lifecycle manager. v run applications/docker_studio.v Screenshot
task_manager.v System Real-time process monitor with CPU/memory telemetry. v run applications/task_manager.v Screenshot
text_editor.v Productivity Full-featured code & markdown text editor. v run applications/text_editor.v Screenshot
regex_studio.v DevTools Real-time regular expression tester with capture groups. v run applications/regex_studio.v Screenshot
imagemagick_studio.v Media Batch image manipulation, resizing, and filters. v run applications/imagemagick_studio.v Screenshot
nmap_studio.v Security Network security scanner & port analyzer. v run applications/nmap_studio.v Screenshot
brew_studio.v Package Mgr Homebrew package browser, installer, and updater. v run applications/brew_studio.v Screenshot
... (33 more) Various See complete visual gallery & catalog in applications/README.md. All Snapshots

Security & Safe Execution Engine

simple_gg features a hardened system execution framework (simplegui/security.v) designed to prevent shell injection, command poisoning, and path traversal attacks across all platforms:

  • POSIX Single-Quote Escaping (simplegui.quote_arg, simplegui.quote_path): Wraps and escapes user input safely, neutralizing quotes, semicolons, backticks, dollar signs, and redirection operators.
  • Safe Subshell Execution (simplegui.exec_safe(tool, args)): Automatically quotes all arguments and executes binaries without vulnerability to command injection.
  • Safe Stdin Pipe Execution (simplegui.exec_safe_stdin(tool, args, input_data)): Safely pipes arbitrary data over standard input without shell exposure.
  • Filename Sanitization (simplegui.sanitize_filename(name)): Strips path separators (/, \), null bytes, and traversal tokens (..).

Documentation

  • Video Tutorial Masterclass & Timestamps: See VIDEO_TUTORIAL.md and youtube_production/ for the complete 19-minute 10-chapter / 28-step Full Masterclass (simple_gg_full_tutorial.mp4), 2-minute Short Tour (simple_gg_short_tutorial.mp4), 9:16 Vertical YouTube Short (simple_gg_youtube_short_9x16.mp4), Display-P3 YouTube Thumbnail (simple_gg_youtube_thumbnail.png), and full chapter timestamps.
  • Full API Guide (GUI): See API.md for complete details on window configuration, controls, layout engine, themes, GPU FX & procedural shaders (render_fx.v, theme_fx_catalog.v), event callbacks, reactive state management (state.v), system calls (sys.v), and standard library extensions (stdlib.v).
  • SimpleCLI Reference (Headless & Console): See CLI_API.md for complete details on the zero-window console utility framework, flag parsing, ANSI UI, interactive prompts, process management, hardware metrics, and stdlib utilities.
  • 45 Utility Modules Reference (vlang_utils): See UTILS_API.md for complete documentation, function signatures, and beginner-friendly examples for all 45 utility modules.
  • Workstations Catalog: See applications/README.md for the complete list & visual showcase of 47 desktop applications.
  • CLI Applications Catalog: See cli_apps/README.md for the complete list of 49 command-line applications.
  • Examples Guide: See examples/README.md for detailed descriptions of all 29 example programs.

Related GUI & RAD Desktop Projects

Explore sister projects and complementary GUI frameworks, templates, and RAD visual design suites:

Project Primary Stack Architecture & Description
Vlang Webview RAD Studio V (vlang) + Native OS Webview Cross-platform visual Rapid Application Development (RAD) IDE & enterprise desktop suite. Borland Delphi/VB-inspired form designer with 70+ controls, 42 desktop themes, 16 enterprise studio applications, 16 companion CLIs, and standalone .app/.exe/ELF packager.
Bun RAD Studio Bun + TypeScript / Webview-Bun High-performance visual RAD IDE for Bun and Webview-Bun, featuring instant hot-reload, drag-and-drop form canvas, full TypeScript type safety, and 76 desktop themes.
Vlang macOS Webview App Template V (vlang) + Cocoa Webview Standalone native macOS .app desktop application template for V using ttytm.webview, Cocoa Objective-C window helper integration (window_helper.m), 9-point screen placement geometry, stay-on-top pinning, and two-way IPC.
vlang_simplegui V (vlang) + Native GUI Declarative macOS-native GUI starter framework written in V, featuring fluent builder syntax, reactive two-way value synchronization, KPI dashboards, sortable tables, and dynamic live theme switching across 42 themes.

Notable Open-Source Webview Frameworks

  • pywebview - Lightweight, cross-platform native GUI window wrapper around OS webviews for Python applications by Roman Sirokov (r0x0r) and community.
  • Neutralinojs - Portable, lightweight cross-platform desktop application development framework using web technologies and native webview by the Neutralinojs organization.

About

simple_gg is a lightweight, beginner-friendly UI framework for building native, hardware-accelerated desktop applications in V. Built on top of V's native gg graphics module (powered by Sokol), simple_gg delivers smooth performance and uniform UI rendering across macOS, Linux, and Windows.

Topics

Resources

Stars

10 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages