The command line
Work on your project from a terminal with qwil, or let an agent there do it.
qwil does from a terminal what you do in Qwil: read the structure and the text, rename, move, add and delete scenes and chapters, split and join scenes, change a synopsis or a scene's text, work on your codex, bring a Word file in, export. An agent that runs commands in a terminal, such as Claude Code, can use it too.
Add qwil to your terminal
- Open Settings › General › Automation, and turn on Changes from agents.
- Under qwil in your terminal, click Add to terminal. On a Mac, enter your password when your Mac asks for it.
- Open a new terminal window and type
qwil.
On a Mac, this puts a link to qwil in /usr/local/bin. On Windows, it adds the folder Qwil is installed in to your PATH. Terminals that were open before don't see it.
Running Qwil from its disk image or your Downloads folder? Move it to Applications first: Settings asks you to.
Get started
qwil help shows what you can do and where to start. Add --help to any command, such as qwil node.rename --help. qwil ops lists every request with what it does and what it takes, and qwil ops node.rename shows one in full.
Send a request
qwil <request> <project folder> '<arguments>'
The arguments are JSON, and so is the answer:
qwil node.rename ~/Books/Flut '{"id":"kdwmd925","title":"Wer kommt an?"}'
Use - in place of the arguments to read them from standard input, for long texts.
Leave the project out
- Run
qwilin your project's folder, or any folder inside it, and leave the folder out:qwil project.get. - Or choose a project once with
qwil use <project folder>. Commands that name no project, and don't run inside one, use it from then on.qwil usesays which one it is, andqwil use --forgetforgets it. - Or set
QWIL_PROJECT:export QWIL_PROJECT=~/Books/Flut, or in PowerShell on Windows,$env:QWIL_PROJECT = "C:\Books\Flut".
A folder you name in the command always wins.
Find something by its title
qwil node.find '{"title":"die uberfahrt"}' answers the id of "Die Überfahrt". Capitals, accents, quotation marks and extra spaces don't matter, and "strasse" finds "Straße", but the whole title must match.
qwil recent.list lists the projects you opened lately. The one open in Qwil right now says "open": true. qwil project.show opens the project in Qwil and brings its window to the front.
Your codex
qwil codex.get lists every kind of entry and every entry, with their ids. qwil entry.find '{"name": "Aria Venn"}' finds one by its name or another name.
qwil entry.create '{"type": "character", "name": "Aria Venn"}'
qwil relation.add '{"from": "aria-venn", "type": "located-in", "to": "veyra"}'
To change an entry's description, read it first: qwil entry.get '{"id": "veyra"}' answers its text and its rev. Send that rev with qwil entry.text '{"id": "veyra", "rev": <rev>, "markdown": "…"}'. If the text changed in between, the command ends with stale-rev: read it again and send your change with the new rev.
qwil entryType.create and qwil relationType.create make kinds of entry and of relation. Each has its update, which also turns one off. Use the kinds' ids from codex.get, such as character, in a German project too.
qwil validate <project folder> lists every problem with your project's files, your codex's included, such as a place that is part of itself.
Bring a Word file in
qwil import.read '{"path": "/Users/you/Manuskript.docx"}'shows how your book divides, each paragraph with its role.qwil project.importwith the same path, the folder to make the project in, and themarkthe first answer gave, makes the project. To make a heading a scene, or a scene break text, send its paragraph'sindexwith the role you want underchanges.
The trash
qwil trash.listlists what's in the trash, with where it was and when you deleted it, newest first.qwil trash.read '{"kind": "node", "id": "<id>"}'reads one.qwil trash emptydeletes everything in the trash for good.qwil trash delete '{"kind": "node", "id": "<id>"}'deletes one thing. Both name what goes and ask first: typeyto go on.
What you delete for good goes to your computer's own Trash, where you can still find it. Undo can't bring it back.
Export
qwil export.write '{"path": "book.pdf"}'
A path ending in .pdf gives a PDF, .docx a Word file. Add "profile": "<name>" for a profile, and "scenes": ["<id>", …] to export only some parts, chapters or scenes. An export never replaces a file of the same name unless you add "replace": true.
Undo a command
Every command that changes your project is a run of its own. qwil run.list lists them, newest first. qwil run.undo '{"run":"2026-11-17 140322"}' undoes the one you name.
Good to know
qwilreads your projects whenever you like. It changes them only while Changes from agents is on.- With the project open in Qwil, its changes show up there at once.
- Before a command first changes a scene, the scene's text becomes a version, so you can get it back in Versions.
- If you changed something yourself since the run, say renamed the same scene, the undo stops there and tells you which change. Nothing of yours goes to the trash.
- An undo is a run too, so you can undo the undo.
- Runs are files in your project's folder, under
history/runs. Delete one, and you can no longer undo that run in one step. - Your settings for every project and your dictionary for every project stay yours to change in Qwil.
- On Windows, use the same commands in PowerShell 7.