OpenFini

Docs / Studios

Code Studio

The Code studio builds websites inside an OpenFini document. It combines a real code editor and a visual designer over the same HTML, CSS and JavaScript files. The files are the only source of truth: visual actions are written as minimal text edits (your formatting and comments survive), and typing in the editor updates the canvas immediately. Open it with Alt+4, the Code button in the header, or Studio ▸ Code Studio.

Getting started#

  • New website: File ▸ New, choose Code. Pick Blank, Landing page, Portfolio, Blog, Documentation or Link in bio, or a framework starter (Frameworks and Libraries).
  • Open files or a folder: Markdown, LaTeX, JSON, YAML and other text files open as one-file projects; folders keep their structure (Markdown and LaTeX).
  • Import: Import a folder… or Import files… on the start screen, or drag a folder onto the Explorer.
  • The project is stored inside the .ofini file (web/files/…), next to your design pages, so one file holds the artwork and the site.

Workbench#

AreaWhat it does
Activity barExplorer, Add elements, Navigator, Search, Source Control, Assets, Libraries, Settings
ExplorerCreate, rename (F2), move, duplicate, delete, upload, download; renaming updates links in HTML and CSS
EditorOne tab per file with its own undo; highlighting, folding, multiple cursors, completions for tags, attributes, CSS properties, your classes, var(--…) and file paths, snippets, diagnostics
CanvasLive preview in a sandboxed frame; Design mode selects and edits, live preview lets the page run
NavigatorElement tree; drag rows to reorder or nest
AddElements and ready-made sections (hero, feature grid, pricing, FAQ)
Style panelLayout (flex, grid), spacing, size, position, typography, backgrounds, borders, effects
Settings panelTag, id, classes, attributes, text
Console, Problems and Terminalconsole.log output and runtime errors; HTML, CSS, JavaScript and JSON problems; a terminal for the project folder (desktop app)

Switch between Design, Split and Code with the toolbar buttons or Mod+Alt+1/2/3; Mod+Alt+P toggles design mode and live preview.

The visual designer#

Select on the canvas or in the Navigator (Alt-click selects the parent). Selecting an element moves the caret to its tag and the reverse. Double-click text to edit (Esc cancels), drag to move, insert from the Add pane, and use the usual copy, paste, duplicate, delete and wrap shortcuts. Selecting text in the live preview (or while editing text) selects exactly that text in the HTML source, character references such as & included.

Editing assets in a design studio#

Right-click a PNG, JPEG or WebP image in Assets or the Explorer and choose Open in Pixel Studio, or an SVG and choose Open in Vector Studio. The image opens as its own document; File ▸ Save (Mod+S) writes it back into the project file in the same format, and Save Back to Website and Return also switches back to the Code studio. SVG is rewritten from the drawing, so comments and scripts in it are not kept.

Terminal#

The Terminal tab of the bottom panel (Mod+Alt+T) runs one program with its arguments per line in the folder the project was opened from (desktop app, File ▸ Open Folder). There is no shell: no pipes, redirects, variables or wildcards, and programs cannot read keyboard input. The allow and deny lists, time limit and output cap of Settings ▸ Artificial intelligence ▸ Terminal apply. Built in: cd (never leaves the project folder), pwd, clear, history, help. The browser version explains that the desktop app is needed. See Security and Privacy.

Classes and breakpoints#

The Style panel styles a class selector. Name a class (or use the one the element has) and every change writes declarations to that class rule in your stylesheet. Choose inline to write a style attribute instead (desktop only). Breakpoints are desktop-first:

BreakpointWidthCSS written
Desktop 1920 / 14401920 / 1440 px@media (min-width: …)
Desktop (base)1280 pxnone
Tablet991 px@media (max-width: 991px)
Mobile landscape767 px@media (max-width: 767px)
Mobile portrait478 px@media (max-width: 478px)

A blue dot marks a value set at this breakpoint, an orange dot one inherited from a larger screen; click the dot to reset.

Viewport, rulers and zoom (since 0.7)#

The viewport bar sets the page size in CSS pixels: width and height fields (Enter applies, arrows change by 1, Shift by 10, range 100 to 4000), aspect lock, rotate, fill height, generic presets (Desktop 1440, 1280, 1024; Tablet 820, 768; Phone 390, 375, 360, 320), up to 12 saved sizes, zoom from 25 to 400 percent, a width slider (280 to 2560) that snaps to breakpoint markers (hold Alt to avoid snapping), and drag handles with a size badge. Rulers show CSS pixels and mark the editor breakpoints (blue) and the @media conditions in your CSS (amber).

Measure tool (since 0.7)#

Press M in the canvas (or View ▸ Measure Tool). Hover shows margin, border, padding and content bands with size and distances to the viewport edges; Alt shows the distance to the pinned, selected or parent element; click pins; Shift+click links two pins; D shows values; Ctrl+C copies the size; Esc clears. Units: px, mm, cm, in, pt, rem, em and percent.

Split layouts (since 0.7)#

In Split view choose code left, right, above or below the preview (toolbar, View ▸ Split Layout, commands code.layout.codeLeft, codeRight, codeTop, codeBottom). The splitter is draggable and keyboard resizable; each pane keeps at least 240 px. A detached preview window is not offered yet.

Editor shortcuts#

ActionShortcut
Command paletteMod+Shift+P (or F1)
Quick open (prefixes > commands, # elements, : line)Mod+P
Find / replace in fileMod+F / Mod+H
Find in filesMod+Shift+F
Go to lineMod+G
Expand Emmet abbreviationTab (for example ul>li*3, .card>h3{Title}+p)
Format documentShift+Alt+F
Toggle commentMod+/
Move / copy lineAlt+Up/Down / Shift+Alt+Up/Down
Add next occurrenceMod+D
Toggle sidebar / bottom panelMod+B / Mod+J
Word wrapAlt+Z

Preview and security#

The canvas is an <iframe sandbox="allow-scripts …"> without allow-same-origin: your page's scripts run but cannot read OpenFini, its storage or your documents. In the desktop app the Content-Security-Policy blocks fetch and XMLHttpRequest to other servers from the preview and allows scripts only from self, data:, jsDelivr, cdnjs and unpkg. Website projects opened from a file start with scripts off ("protected mode"); see Security and Privacy.

Git, publishing and libraries#

Source Control gives real Git inside the document (Git in the Code Studio). The Publish button deploys to hosting targets (Export and Publish). The Libraries pane manages CDN libraries and import maps (Frameworks and Libraries).

Limits#

The designer edits one page at a time (no shared partials, symbols or CMS). No interactions editor, no language server, no type checking; the terminal is a console without a shell or TTY (no interactive programs). Details: Roadmap and Known Limits.

Vibe#

The assistant can create sites from templates, read and edit files, insert elements, edit styles per breakpoint, check problems and control the viewport and layout (Vibe Tools Reference).

See also#

Edit on GitHub → wiki/Code-Studio.md