Install the project
Use Node 22.22.2, the version in.nvmrc. If you use nvm, clone the repository and install the packages with:
nvm install once.
Run the development version
From the repository root, run:http://127.0.0.1:5173, with ~/writing/docwriter-test as your writing workspace. The application code is from your local checkout; your documents are in the folder you specified. You can use an existing folder, or choose a new folder that will be created for you.
You can also use the equivalent npm command:
npm run build after each edit.
To run from another directory, use the full path to the development script:
--no-open if you want to open the browser yourself, or --port 5174 to choose another app port. The document sync connection is on port 3001 by default; you still need that port free when you choose another app port.
Use npm run dev from the repository root if you want the repository itself as your writing workspace. Open http://localhost:5173 after starting it.
You can edit documents without a provider credential. Follow Connect a provider when you want to test the agent.
When to restart or rebuild
Stop with Control+C, then run the development command again after changing environment variables, the launcher inbin/, or the document sync server in src/lib/server/ws-server.ts. The live document server is retained during automatic updates, so restart to test changes to that server. After changing dependencies, run npm install before restarting.
Use node bin/docwriter-dev.js while changing the application code. With node bin/docwriter.js or the linked docwriter command, you use the compiled application in build/; run npm run build and restart to try new code through those commands. With their --watch option, you can see changes to workspace documents, but you still need to rebuild after changing application code.
Check your change
Run these checks in another terminal from the repository root before you open a pull request:npm run check for TypeScript and Svelte checks, npm run test:unit for unit tests, and npm run build to check the production build. For provider smoke tests in e2e/, you need credentials for the provider you test.
Before you finish, open a document from your test workspace and save a small UI change in your checkout. Confirm that you can see the change in the browser, and that you have no errors from the checks above.
Choose the next page
- Read Architecture before changing the editor, document sync, review actions, or storage.
- Read Providers and tools before adding an AI provider or agent tool.
- Read Testing and documentation before changing public docs or visual assets.