Create a new workspace in the current directory: wiki.yml, README.md, layouts/, and starter files under wiki/.
Does not use loaded Config; safe to run before a config exists.
Usage
wiki init
wiki init --force
wiki init --git
wiki init --repo wazootech/wiki
wiki init --graph-context-wiki https://example.org/mywiki/ --site-base-url /mywiki
Options
| Flag | Description |
|---|---|
--force |
Overwrite existing wiki.yml, README.md, starter wiki/ files, and seeded layout files (layouts/wikipedia.html and assets/wikipedia.css when --site-layout wikipedia) |
--git |
Run git init after scaffolding |
--repo |
GitHub owner/repo; infer graph.context.wiki and site.base_url for GitHub Pages |
--graph-context-wiki |
Override graph.context.wiki (overrides --repo inference) |
--site-base-url |
Override site.base_url (default /wiki or inferred from --repo) |
--site-url-style |
Override site.url_style: dir or file (default dir) |
--graph-content-predicate |
Override graph.content_predicate CURIE (e.g. schema:articleBody) |
--link-style |
Override link.style: standard page links (standard) or wikilinks (wikilink) |
--site-name |
First letter used in assets/logo.svg only (default name Wiki CLI → W); does not change copied layout title, sidebar label, or search placeholder; not written to wiki.yml |
--wiki-inputs |
Override wiki.inputs list (can be specified multiple times, default [wiki]) |
--graph-base-iri |
Override graph.base_iri URI |
--site-theme-color |
Logo gradient at init only (e.g. #3b82f6; not written to wiki.yml) |
--graph-implicit-types |
Override graph.implicit_types (can be specified multiple times) |
--graph-implicit-types-policy |
Override graph.implicit_types_policy: fallback or append |
--graph-include-file-extension |
Override graph.include_file_extension flag (defaults to --no-graph-include-file-extension) |
URL resolution
When --graph-context-wiki is not passed, init resolves graph.context.wiki in this order:
--repo— GitHub Pages project site:https://{owner}.github.io/{repo}/andsite.base_url: /{repo}(acceptsowner/repo, HTTPS, or SSH URLs).- Git remote — If
.gitalready exists or--gitwas passed, parsegit remote get-url originwhen it points at GitHub. - Interactive prompt — Custom wiki namespace IRI (default
https://wiki.example.org/).
--graph-context-wiki always wins over --repo and remote detection. --site-base-url overrides the inferred path from --repo.
Document subject IRIs default to graph.context.wiki. Set optional graph.base_iri in wiki.yml when auto-generated document IRIs must differ from the wiki: namespace (see Wiki Configuration).
Prompts
When no flag or git remote supplies graph.context.wiki, init prompts once:
- Custom wiki namespace IRI (default
https://wiki.example.org/) →wiki:ingraph.context
Always includes schema, wiki, wazoo, foaf, dc, dcterms, sh, and xsd prefixes. The wazoo URI is fixed in the scaffold (https://schema.wazoo.dev/), like the other built-in prefixes.
Generated config
New workspaces receive a plain wiki.yml rendered from wiki.yml. Jinja variables (such as graph_context_wiki, site_base_url, graph_content_predicate, and link_style) map from init CLI flags into nested blocks.
For every key — schema default, whether init writes it, and which command audits it — see Wiki Configuration → Overview and the per-block defaults tables in Wiki Configuration.
Generated files
layouts/wikipedia.htmlandassets/wikipedia.css— copied when--site-layout wikipedia(default); full Vector layout with linked stylesheet. With--site-layout minimal,site.layoutis omitted and the packagedindex.htmllayout applies.assets/logo.svg— starter sidebar logo; center glyph is the first letter of--site-name(defaultWiki CLI→W); optional--site-theme-colorsets the gradient. Sidebar label and search placeholder live in the packaged page layout.README.md— starter workspace overview and common commandswiki/Person_Shape.md— startersh:NodeShapeforschema:Personwiki/Ethan_Davidson.md— starterschema:Personexample