Skip to content

Getting Started

nodemode-ai edited this page Dec 3, 2026 · 6 revisions

Getting Started

Requirements

Python 3.12 or later, Node 20.19+ or 22.12+, and for desktop builds Rust with the Tauri toolchain. ./formchem doctor checks them, the backend venv and its packages, and whether ports 5220 and 8220 are free.

Install and boot

./formchem install      # backend venv and frontend packages
./formchem              # engine on 127.0.0.1:8220, app on http://localhost:5220

Windows: formchem.bat install, then formchem.bat. One-click installers: formchem_oc_install and formchem_oc_install.bat.

Draw your first structure

Aspirin, with the mouse and a few keys:

  1. On Home, press New drawing. Home closes and the canvas opens with the tool rail on the left.
  2. Press R (the benzene tool) and click the middle of the page: a benzene ring.
  3. Press B (the single bond tool) and click a ring atom: a bond grows out of it. Click the new end atom to grow the chain; add two short branches the same way (one for the acetyl group, one for the acid).
  4. Point at an atom without clicking and press O: it becomes oxygen. Point at a bond and press 2: it becomes double. Do this for the ester oxygen, the two carbonyls and the acid oxygens.
  5. Open the Analysis panel (title bar or View > Analysis Panel): formula C9H8O4, molecular weight 180.16, exact mass 180.0423 and the elemental analysis. The formula also sits in the status bar.
  6. Structure > Clean Up Structure tidies bond lengths and angles in one undo step. Ctrl+S (Cmd+S on macOS) saves; a new drawing asks for a name.

Faster: copy CC(=O)Oc1ccccc1C(=O)O and press Ctrl+V on the canvas, or use Insert > Structure from SMILES. Molfile, SDF, RXN, SMILES, InChI, CML, CDXML and CDX files open from File > Open or by dropping them on Home, and File > Export saves PNG, SVG, PDF and EPS pictures that open again as the drawing (Formats and Export). The page is dark by default; View > Dark Page turns it off (Grid and Page). Drawing lists every tool and hover key, and how to draw with the keyboard alone.

Connect an agent

Claude Code, Codex, Cursor, Antigravity or any MCP client can draw in the window you have open:

  1. Start FormChem (./formchem, or the desktop app).
  2. In the FormChem folder run ./formchem agents install. It writes the configs for Claude Code (.mcp.json), Codex, Cursor and Antigravity with the agent token, and installs the FormChem skill so the agent knows the tools. For another client, Window > Agents and MCP shows the setup lines with the token filled in, or use ./formchem mcp as a stdio server, which needs no token.
  3. Restart the agent and ask it, for example: "Draw aspirin in FormChem and check it."
  4. The first time it changes something, the window asks you: Deny, Allow once or Always allow.

The agent calls draw_from_smiles: the structure appears in a new drawing, the title bar shows "[agent] just edited" with Stop, and what it drew is outlined for a moment. It then checks its work with render (a picture drawn by the window) and get_structure (SMILES, InChIKey, molfile). Ctrl+Z undoes the whole call in one step; Window > Agent Activity lists every call with undo for the latest one. Agents lists the tools and Agent Activity the panel.

An agent you connected to 0.7.0 over HTTP needs the token from 0.8.0 on: run ./formchem agents install again (./formchem agents token prints the token).

Commands

Command What it does
./formchem or ./formchem boot engine and app together
./formchem backend, ./formchem frontend one half only
./formchem build, ./formchem serve build the frontend, serve it from the engine (preview on 5221)
./formchem install-desktop, ./formchem desktop dev, ./formchem desktop build the Tauri desktop app
./formchem freeze freeze the engine for the desktop app (a folder in src-tauri/engine on macOS, a one-file sidecar elsewhere)
./formchem convert, batch, descriptors, render convert structure files and folders, write properties to CSV, draw every record (Command Line)
./formchem i18n check, scan, export, import the interface languages: gaps, new strings, CSV out and in
./formchem counts lines of code per language
./formchem doctor, ./formchem clean checks, cleanup
./formchem mcp the MCP server over stdio
./formchem agents install, ./formchem agents sync, ./formchem agents token agent configs with the agent token, and skills; print the token
./formchem cli list, describe, run, batch the window's command catalogue from a terminal; run needs the window open
./formchem claude Claude Code in this terminal with FormChem's MCP tools attached

Each command has a formchem.bat twin on Windows.

Ports and folders

The engine listens on 127.0.0.1:8220 (FORMCHEM_PORT), the Vite app on localhost:5220. The desktop shell starts the engine on a free port and prefers 8221. The data folder is ~/formchem (FORMCHEM_DATA_DIR); it holds settings.json, library.json (Home's lists), commands-catalogue.json, agent-token (0.8.0), the Agent log folder (0.8.0) and, while the engine runs, engine.json.

Clone this wiki locally