Skip to content

Wiki

The wiki command (alias w) reads and writes pages on a project’s wiki.

Every subcommand needs a project. Pass --project <identifier>, or rely on the default project of the active profile (see auth).

Terminal window
redmine wiki list [flags]

Aliases: ls. Lists each page’s title and last-modified timestamp. Results are paginated server-side; combine --limit 0 with --offset to walk large wikis.

Flag Description
--project Project identifier or numeric ID. Falls back to the default project of the active profile.
--limit Maximum number of results (0 for all)
--offset Result offset for pagination
-o, --output Output format: table, json, csv
Terminal window
redmine wiki list --project myproject
Terminal window
redmine wiki get <page> [flags]

Aliases: show, view. Prints the page metadata and full Textile/Markdown source. Pass --version to fetch a historical revision instead of the current one.

Redmine 7.0 added the owning project to the wiki page API response, so wiki get shows a Project row (and a project key in JSON output) against 7.0+ servers. Older servers do not send it and the row is omitted.

Flag Description
--project Project identifier or numeric ID
--version Page version to fetch (omit or 0 for the latest)
--include Include related data. Only attachments is supported.
-o, --output Output format
Terminal window
redmine wiki get WikiStart --project myproject
redmine wiki get WikiStart --project myproject --version 3
redmine wiki get WikiStart --project myproject --include attachments
Terminal window
redmine wiki create <page> [flags]

Aliases: new. Creates a new wiki page. If a page with the same name already exists, Redmine overwrites it. Use update when you want to be sure you are editing rather than replacing.

Flag Description
--project Project identifier or numeric ID
-t, --text Page content in Textile/Markdown. required
--title Display title (defaults to the page name)
--comments Change comment recorded in the page history
--attach Path to a file to attach (repeatable)
-o, --output Output format
Terminal window
redmine wiki create MyPage --project myproject --text "h1. Hello World"
redmine wiki create MyPage --project myproject \
--text "Content here" --title "My Page" --comments "Initial draft"
redmine wiki create MyPage --project myproject \
--text "See diagram" --attach ./diagram.png
Terminal window
redmine wiki update <page> [flags]

Aliases: edit. Edits an existing page. Only the fields you pass change. When --text is omitted, the current page text is fetched and resent unchanged so that retitling or re-commenting does not wipe content.

Flag Description
--project Project identifier or numeric ID
-t, --text New page content. If omitted, the current text is preserved.
--title New display title
--comments Change comment recorded in the page history
--attach Path to a file to attach (repeatable)
--expect-version Expected current page version. The server returns 409 Conflict (and the CLI surfaces error code conflict) if the page has moved on since you last fetched it.
--ensure-current Refetch the page first and assert its current version on update. Mutually exclusive with --expect-version.
--section Section number (1-based) to update. When set, only that section is replaced; the rest of the page remains unchanged. Requires --text.
--section-hash Hash of the original section content, used by Redmine for conflict detection on section edits. Requires --section.
Terminal window
redmine wiki update MyPage --project myproject --text "Updated content"
redmine wiki update MyPage --project myproject --comments "Fixed typo"
redmine wiki update MyPage --project myproject --title "New Title"
redmine wiki update MyPage --project myproject --attach ./screenshot.png
# Update only section 5 of the page
redmine wiki update MyPage --project myproject \
--section 5 --text "h3. Updated Section Content"
# Section update with conflict detection
redmine wiki update MyPage --project myproject \
--section 5 --section-hash abc123 \
--text "h3. Updated Section Content"
# Optimistic concurrency: fail if the page has been edited since version 7
redmine wiki update MyPage --project myproject \
--text "Updated content" --expect-version 7
# Convenience: refetch the page first and reuse its current version
redmine wiki update MyPage --project myproject \
--text "Updated content" --ensure-current
destructive
Terminal window
redmine wiki delete <page> [flags]

Aliases: rm. Permanently removes the page along with all its attachments and version history. Child pages are re-parented to the wiki root rather than deleted.

Flag Description
--project Project identifier or numeric ID
-f, --force Skip the confirmation prompt
Terminal window
redmine wiki delete MyPage --project myproject
redmine wiki delete MyPage --project myproject --force