A Rust-based sequence viewer for molecular cloning workflows, with an embedded terminal and a unified command layer — every operation is invokable from both the GUI menu and the terminal.
https://github.com/cmoscy/seqforge
Status: v0.2 editor tagged (
v0.2.0); v0.3 assembly A1 (workbench +assemble/digest) and fidelity F1 (Tatapov/Potapov overhang %) are in-tree. Gibson / overhang design still next. Still pre-1.0. See ROADMAP.md for per-track detail.
Prerequisites: Rust toolchain via rustup. The repo pins Rust 1.95.0 in rust-toolchain.toml; rustup installs it automatically on first cargo invocation.
git clone https://github.com/cmoscy/seqforge.git
cd seqforge
cargo build --release
./target/release/seqforge-appFor a quick debug build (contributors):
cargo run -p seqforge-appNote: use
cargo build(notcargo build -p seqforge-app) so theseqforgeCLI binary is built alongside the app. The embedded terminal automatically adds it toPATH— no install step needed.
To also use seqforge from any terminal window (not just the embedded one), install it via the GUI or a single flag:
From the GUI: Tools → Install 'seqforge' CLI to PATH
Headless / scripted:
./target/release/seqforge-app --install-cliBoth methods symlink the bundled binary into /usr/local/bin (if writable) or ~/.local/bin. After updating the app, re-run either to refresh the symlink.
Open the app, then use the file browser on the left to navigate to a .gb or .fasta file. Double-click to open it in the viewer.
The viewer shows the dual-strand sequence with ATGC colouring, a position ruler, and stacked annotation bars. The Inspector (Features · Cut sites · Primers) lists annotations; the Restriction Sites panel (⌘E) shares the CLI enzyme grammar. Primers show as a map overlay with thermo QC. Map selection highlights the matching Inspector row (and switches tabs unless inspector.follow_selection = false).
From Cut sites, Digest opens a read-only Fragments list over the source buffer. For cloning, File → New Assembly… builds a recipe of bins (Digest / PCR / AsIs → Ligate or Golden Gate); optional fidelity % appears on the join strip. Products open as normal sequence tabs. Depth: plans/assembly.md, plans/fidelity.md.
The bottom pane is an ordinary shell — no special prefix or syntax. It only
differs from any other terminal in that SEQFORGE_SOCKET is already exported,
so seqforge commands typed there route to the live window automatically (see
CLI below).
The seqforge binary works with or without the GUI open.
File commands (always local — no GUI needed):
seqforge info plasmid.gb
seqforge tm GGGACCGCCT
seqforge translate plasmid.gb --start 0 --end 30
seqforge orfs plasmid.gb
seqforge primers list plasmid.gb
seqforge primers find plasmid.gb GCGTACViewer commands (require a running SeqForge window):
seqforge open path/to/plasmid.gb
seqforge goto 500
seqforge find ATGC
seqforge enzymes "EcoRI BamHI" # quote multi-enzyme queries — it's one argument
seqforge enzymes "golden gate" # preset: BsaI, BsmBI, BbsI, SapI
seqforge enzymes --op add SpeI # union into the active set (also: --op remove)The enzyme query is a single argument, so any value with a space — an enzyme list
or a two-word preset — must be quoted ("golden gate", "EcoRI BamHI, SpeI").
Within that argument, names may be separated by spaces or commas. Accepted
presets: unique, unique+dual, non-cutters, type IIs, golden gate,
moclo, all, none. The same grammar is shared by the GUI Restriction Sites
panel (⌘E, where no shell quoting applies) and the CLI.
Editor commands (require a running window):
seqforge insert 100 ATGC
seqforge delete 100 110
seqforge undo # also: redo
seqforge save # also: save-as <path>goto is 1-based; edit ranges are 0-based. Feature/primer editing and more verbs are wired the same way — run seqforge --help for the full list.
Cloning (local; no GUI needed for dry-run):
seqforge digest plasmid.gb --enzymes EcoRI,BamHI
seqforge assemble vector.gb@EcoRI..PstI insert.gb@EcoRI..PstI --method ligate --dry-run
seqforge assemble parts/*.gb@BsaI..BsaI --method golden-gate --dry-run --fidelity-dataset bsaiWhen the GUI is running, it sets SEQFORGE_SOCKET in the embedded terminal's environment. Any seqforge viewer command executed there — or in any shell that has SEQFORGE_SOCKET set — routes to the live viewer. If the variable is absent, viewer commands exit with a clear error.
| Format | Extensions | Notes |
|---|---|---|
| GenBank | .gb, .gbk, .genbank |
Fully supported |
| FASTA | .fasta, .fa, .fna |
Sequence only; no features |
| SnapGene | .dna |
Planned (post-MVP) |
cargo check # fast type-check
cargo test # run all tests
cargo clippy # lint
cargo fmt # format
cargo build # build everything (app + CLI)The embedded terminal finds the seqforge CLI as a sibling of the app binary in target/, so both must be built. Build once with cargo build, then iterate with cargo run — the CLI binary persists between runs:
cargo build # first time: builds app + CLI
cargo run -p seqforge-app # subsequent runs: rebuilds only what changedThe workspace has seven crates:
| Crate | Role |
|---|---|
seqforge-core |
data model, typed command surface, dispatch / dispatch_file — no GUI deps |
seqforge-bio |
I/O, DNA utilities, primers/thermo, assembly engine; wraps restriction + thermo |
seqforge-restriction |
REBASE enzyme DB + scanner + presets. See plans/restriction.md |
seqforge-thermo |
Tm/GC/folding (vendored seqfold); via seqforge-bio — docs/architecture.md |
seqforge-fidelity |
overhang ligation fidelity (Potapov/Pryor via tatapov); assembly dry-run / join strip — crate README |
seqforge-app |
eframe + egui_dock + egui_term GUI shell |
seqforge-cli |
Standalone seqforge binary |
All user-visible actions go through dispatch or dispatch_file in seqforge-core. Menu clicks and CLI/socket invocations all parse to the same ViewerRequest/FileCommand enum and call the same dispatch path.
- Bugs and feedback: GitHub Issues
- Architecture: docs/architecture.md, docs/socket-protocol.md
- CI: pushes and PRs to
mainruncargo fmt --check,cargo clippy -D warnings, andcargo teston Ubuntu (see.github/workflows/ci.yml)
SeqForge original source code is licensed under the MIT License — see LICENSE.
Bundled data and vendored components retain their own terms — see NOTICE. Notably: restriction enzyme data is derived from REBASE (© Dr. Richard J. Roberts); thermodynamics code vendors seqfold (MIT); ligation-fidelity matrices are from Potapov et al. / Pryor et al. via tatapov_data (CC BY-ND 4.0) — see crates/seqforge-fidelity/ATTRIBUTION.md.