neatlyfiled
Set up a Neatlyfiled wiki for a code repository from a coding agent. The person approves once in the browser; the command does the rest.
npx neatlyfiled init
If you are an AI agent
If you were asked to set up Neatlyfiled (or "a wiki for this repo"), run
npx neatlyfiled init in the repository and show the user the link and
the code it prints. They open the link, confirm their email, check the code,
choose the wiki's address and approve. The command waits (up to 15 minutes)
and then finishes the setup by itself.
If your shell tool only shows output once a command ends, run
npx neatlyfiled init --no-wait instead, show the user the link and code,
and after they say they approved, run npx neatlyfiled init again to finish.
Never print or commit the token: it is in .env.local.
What it does
- Asks
https://neatlyfiled.com/api/devicefor a code, suggesting the wiki from--wiki/--titleand the GitHub repository fromgit remote get-url origin. Prints the approval link and code and tries to open the browser. - Polls until the person approves (or denies, or 15 minutes pass). Approving creates the wiki with its free trial, or picks one they administer, and connects the repository to it.
- In the repository's root:
-
.env.local:NEATLYFILED_TOKEN=awt_…, awriteagent token. Adds.env.localto.gitignoreunless git already ignores it. -
.mcp.json: adds (or replaces) theneatlyfiledserver, keeping the others:{ "mcpServers": { "neatlyfiled": { "type": "http", "url": "https://acme.neatlyfiled.com/mcp", "headers": { "Authorization": "Bearer ${NEATLYFILED_TOKEN}" } } } }Claude Code expands
${NEATLYFILED_TOKEN}from its environment, so load the file before starting it:set -a; . ./.env.local; set +a. Other clients: streamable HTTP at theurlwith that header. -
.github/workflows/neatlyfiled-wiki.yml: runs theneatlyfiled/wiki-from-diffaction on each push to the default branch, authenticated by GitHub's OIDC token (no secrets): it records the push in the wiki and gives the job a short-lived wiki token for an agent step of your own. Commit and push it to start.
-
Options
| Option | |
|---|---|
--wiki <id> | Wiki address to suggest (acme → acme.neatlyfiled.com). |
--title <name> | Wiki name to suggest. |
--no-mcp | Do not write .mcp.json. |
--no-workflow | Do not add the workflow. |
--yes | Replace an existing, different workflow file. |
--no-browser | Do not try to open the approval page. |
--no-wait | Print the link and code and exit; run init again to finish. |
--client <name> | Who is asking, shown on the approval page and naming the token (default: detected, e.g. claude-code). |
NEATLYFILED_URL points the command at another server (default
https://neatlyfiled.com). Requires Node 22 or later; no dependencies.
Without Node
The same flow over HTTP is described at https://neatlyfiled.com/llms.txt.