1 Projects and Saving
liquibyte edited this page 2026-11-19 16:23:32 -06:00

Projects and Saving

A Skein project is one .yarn file. This page explains what is in that file, how to make, open, save and close a project, how Skein keeps your changes until you save them, what Undo covers, autosave, the backups that each save makes and how to restore one, and the file dialogs.

1. The project file

A project is a single file ending in .yarn. It is an ordinary SQLite database, nothing proprietary: any sqlite3 tool can open it. It holds everything of the project:

  • the object types, with their names, icons, colors and fields;
  • the objects, with their documents, field values, table rows, icons and colors;
  • the relationships between objects;
  • the places of the nodes on the Graph;
  • the project's own view: where the panels are, which rows of the tree are open, the selected row, the sort of the tree and the Inspector tab you used last.

Pictures are not inside the project: documents and Image fields name the picture files. A relative path is read from the folder of the project file; in a new project that was never saved, it is read from the folder Skein was started in.

The -wal and -shm files. While a project is open, two more files may appear beside it, name.yarn-wal and name.yarn-shm. They are SQLite's own working files: changes are written there first and folded back into the .yarn file at each save, autosave, Save As, project switch and at quit. They mean nothing without their .yarn file and are made again each time, so never back them up or put them under version control. To copy a project that is open, choose File > Save first: after a save, the .yarn file holds everything.

2. A new project

File > New... > New Project, Close Project, Close Folder, and a start with no project to reopen all give a new, empty project. It lives only in memory and the title bar reads Skein - Untitled. Nothing is written to disk until you save: the first File > Save asks for a file name, as Save As does (section 4).

3. Opening a project

File > Open... > Open Project... (Ctrl+O), or Open Project... in the menu of the toolbar's Open button, shows the "Open Project" dialog, which lists folders and .yarn files ("Skein Projects"). Choose a file and press OK. A file that is not a Skein project is not opened: Skein says so, and the project you had stays open.

You can also name a project when you start Skein:

skein recipes.yarn
  • Only the first name counts; other names and options are ignored.
  • A name that does not exist yet becomes a new, empty project with that name; the file is made at once.
  • The name is always opened as a project. To work on Markdown files, use the File menu (see Markdown Folders).
  • Without a name, Skein opens the project (or the Markdown folders) you had open last, when Settings > General > "Reopen last project on startup" is on and the file still exists. A name on the command line always wins over this.
  • When the project cannot be opened, Skein says so once its window is up, and starts on a new, empty project.

When the project you leave has unsaved changes, Skein first asks "This project has unsaved changes. Save before switching to a different project?" (see section 5). While a project loads, a small window with a progress bar says what is being done: at the start of Skein "Loading project tree...", "Building graph..." and "Restoring layout...", and when you open a project from the File menu "Loading project...".

4. Saving

How Skein keeps your changes. Everything you change in a project (new objects, names, icons, fields, values, relationships, documents) goes into the project as you work, but it is held back as one open change: it reaches the file on disk only when you save, or when autosave saves. Until then a * starts the title bar. If Skein ends without a save, from a crash or from Discard, the file is exactly as it was at the last save.

Command Key What it does
File > Save Ctrl+S Writes every change to the .yarn file, folds in the -wal file, and makes a backup copy (section 8). The * of the title and the bold rows of the tree go away. For a new project it does Save As: it asks for a file name. When a save fails, Skein says why, and the changes stay unsaved.
File > Save As... Ctrl+Shift+S Saves every change into the current file (without a backup copy), copies that file to a new name, and goes on working in the new file. The old file keeps the project as it was at that moment.

Save As shows the "Save Project As" dialog. It starts in the project's folder with the current file name, or with untitled.yarn for a new project. A name without any dot in it gets .yarn added. When the file exists, the dialog shows a small menu with Overwrite and Cancel beside its OK button. When you typed the name without .yarn and that file exists, Skein asks instead, "'...' already exists. Overwrite it?", with the buttons Overwrite and Cancel. The new file is remembered as the last project. When the copy cannot be written or opened, Skein says so and goes on with the project you had.

5. Unsaved changes

When you quit (File > Quit, Ctrl+Q or the window's close button), open another project, start a new one, close it, or switch to Markdown folders while there are unsaved changes, Skein asks first, for example "You have unsaved changes. Save before quitting?":

Button Key What it does
Save Alt+S, Enter Saves the changes, as File > Save does, then goes on. For a new project that was never saved, it asks for a file name first; cancelling that, or a save that fails, stops, and nothing is closed.
Discard Alt+D Throws away every change since the last save, then goes on.
Cancel Alt+C, Escape, the close button of the question Stops: nothing is saved and nothing is closed.

Save has the focus when the question opens. Tab moves between the buttons, and Enter presses the one with the focus. Skein counts changes, not their result: changing a name and changing it back still counts as a change. Moving nodes with Sort Graph Nodes and the project's view (panels, open rows, selection) do not count.

6. Undo and Redo

Edit > Undo (Ctrl+Z) and Redo (Ctrl+Y) work on two separate lists of changes:

  • the document's own list, for the text you type in the Document panel;
  • the project's list, for these changes: making an object or a type, renaming one, moving an object in the tree, dragging a node on the Graph, and deleting a field in Manage Fields.

Ctrl+Z and Ctrl+Y act on the document's list while the Document panel has the keyboard focus, and on the project's list otherwise. Edit > Undo and Edit > Redo act on the list that changed last. In the Document, Ctrl+Shift+Z redoes as well. The Undo and Redo buttons of the Document panel's toolbar always act on the document's list; Undo and Redo in the right-click menus of the tree and the Graph, and the Undo button of Manage Fields, always act on the project's list. The project's list keeps the last 64 changes.

These are not undone: deleting an object or a type, the order of the types, the values of fields and table cells, rows and columns of tables, relationships, icons, Sort Graph Nodes and imports. Undoing changes back to the saved state of the project clears the * again. Undoing the making of an object deletes it with any children it has been given since; redoing it makes it again as it was made: with the template it started with, in the same place among its siblings, and for a type with the default color it was given. Undoing the deletion of a table field brings back the table and its columns, but not its rows.

7. Autosave

With Settings > General > "Autosave every ... seconds" on (it is off at first), Skein saves the project by itself when that many seconds (10 to 60, 30 at first) have passed since the last save and there is something to save. Autosave does not make backups, and it never runs while you work on Markdown folders. A new project that was never saved has no file, so autosave leaves it alone, and its * stays until you save it. When an autosave fails, Skein says why.

8. Backups

Each File > Save makes a backup copy of the saved file beside it: recipes.yarn.01 is the newest. The older copies move up one number (.02, .03, ...), and the oldest beyond the number to keep is replaced. Settings > General > "Backups to keep (one per Save)" sets how many (0 to 20, 3 at first; 0 makes none). When you lower the number, the next save deletes the backups beyond it. Save in the question about unsaved changes (section 5) makes a backup as File > Save does; Save As and autosave make none.

Restoring a backup. Settings > Backup & Recovery lists the backups of the open project, with the date and size of each ("Backup .01 — 2026-11-16 14:30 — 212 KB"). Press Restore... beside one. Skein asks "Replace the current project with this backup? Any changes since it was made — including anything not yet saved — will be permanently lost." and, with Restore, copies the backup over the project file and opens it again at once. The file it replaces is not kept. When the copy or the opening fails, Skein says so; if the project cannot be opened again, Skein goes on with a new, empty project.

9. Closing

File > Close... > Close Project, or Ctrl+W, closes the project (asking about unsaved changes) and starts a new, empty one. Close File and Close Folder are for Markdown folders; while Markdown folders are open, Ctrl+W does Close Folder. Close File asks first when the file has changes that are not saved yet (see Markdown Folders).

10. The file dialogs

Every file dialog of Skein (Open Project, Save Project As, Import, Insert Image, Choose Image, Export as Static Site, and the Markdown dialogs) is the same dialog:

Part of the dialog What it does
Places, at the left Home, Desktop, Documents, Downloads, Music, Pictures, Videos and File System. A click goes there. Below them are your favorites.
Favorites Right-click the file list and choose Add to Favorites to add the folder you are in (at most eight). Right-click a favorite and choose Remove from Favorites to remove it.
The path bar, at the top Shows the folder you are in as a row of folder names; click a name to go there. Click beside the names, or press Ctrl+L, to type a path instead: / starts from the root, ~ is your home folder, anything else is inside the folder you are in. Enter goes to a typed folder; in an open dialog, the full path of a file chooses that file at once. Escape gives the path bar back.
The file list Folders first, then files. The ".." entry goes up one folder. Columns: Name, Size, Type and Modified. Click a column heading to sort by it, again to reverse the order. Drag the edge between two headings to make a column wider or narrower.
The list's right-click menu Show Hidden Files (also Ctrl+H; the dialog shows "Hidden: on" or "Hidden: off"), Size Column, Type Column and Modified Column (show or hide each), and Add to Favorites.
The name field Only in Save Project As and Export as Static Site: the name of the file to write. A folder or a path to a folder typed there (.., ~/notes) goes to that folder instead.
The file type list "All Files", or the kind of file the dialog is for, such as "Skein Projects" or "Images".
New Folder Makes a folder in the folder you are in (also Ctrl+Shift+N). Type its name, then Create or Enter; Cancel or Escape stops.
OK and Cancel OK takes the chosen file. With no file chosen (or, when saving, no name typed) the dialog stays open and says "Select a file" or "Type a name for the file". Cancel closes the dialog.

In the list, Up, Down, Page Up, Page Down, Home and End move the selection. Enter or a double-click goes into a folder, or takes a file. A folder that cannot be opened (one you may not read, for example) is not entered: the dialog stays in the folder it was in and says "Couldn't open" with the reason.

The dialogs remember your favorites, the hidden-files switch, which columns show, their widths and the sort, in ~/.config/skein/file_dialog.txt: every file dialog starts with them, also after a restart.

11. Known limitations

  • Save As adds .yarn only to a name with no dot at all, so my.notes stays as it is.
  • The Backup & Recovery list is made when the Settings dialog opens, and is not brought up to date while it is open.
  • Skein remembers only one last project; there is no list of recent projects.