Download the PHP package ruvelo/laravel-wiki without Composer

On this page you can find all versions of the php package ruvelo/laravel-wiki. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-wiki

Live demo     Configuration     Developer guide     Changelog

Tests Laravel 12 | 13 PHP 8.3+ PHPStan level 8

Laravel Wiki

A drop-in wiki for your Laravel app. Markdown pages, [[links]] between them, and the full history of every change. It runs on your database and your logins, with no frontend build step and no extra services.

Then open /wiki. Or click around the live demo first.

A quick tour

Pages link to each other. Write [[Deploy guide]] and it becomes a link. Pages that don't exist yet show in red, an open invitation to whoever knows the answer.

Edit with a live preview. Markdown on the left, the finished page on the right, updated as you type.

Every save is kept. See what changed, who changed it, and put any old version back in one click.

Light and dark, following each reader's system setting. Search with highlighted snippets; an exact title takes you straight to the page.

Features

Requirements

Who can edit

By default, anyone can read and any signed-in user can edit. To narrow that, define a wiki-edit gate, for example in your AppServiceProvider:

To make the whole wiki private, wrap every route in auth through the config:

Configuration

Publish the config file if you want to change the defaults:

Key Default
name Wiki (WIKI_NAME) Shown in the header and page titles
path wiki (WIKI_PATH) URL prefix
domain null Serve the wiki on its own (sub)domain
middleware ['web'] Applied to every route
edit_middleware [] Extra middleware for create/edit/delete/restore (signing in is always required)
home home Slug shown at the wiki root
sidebar sidebar Slug of the page used as the left menu; null for an automatic list
table_prefix wiki_ Tables are {prefix}pages, {prefix}revisions, {prefix}links
run_migrations true Set to false if you publish and manage the migration yourself
user_model your users provider model Who revisions are attributed to
user_name_attribute name Shown as the author in the history
per_page 50 Page size for lists and search
routes true Set to false to register routes yourself (copy routes/web.php)
api.enabled false (WIKI_API) Turn on the JSON API
api.prefix api/wiki Where the JSON API lives
api.middleware ['api', 'auth:sanctum'] Applied to every API route
mcp.enabled false (WIKI_MCP) Turn on the MCP server for AI agents (needs laravel/mcp)
mcp.path mcp/wiki The MCP HTTP endpoint; null for none
mcp.middleware ['auth:sanctum'] Applied to the MCP endpoint. Use a token guard: agents can't hold a session
mcp.local wiki Handle for php artisan mcp:start wiki; null for none
mcp.local_user null (WIKI_MCP_USER) User id the local server acts as; a guest otherwise
mcp.allow_writes false (WIKI_MCP_WRITES) Offer the write_page tool (still needs the wiki-edit gate)
markdown.extensions [] Extra CommonMark extensions
markdown.options [] CommonMark options, merged over the defaults

Making it look like your app

The views are plain Blade with the styles inlined in one layout. Publish them and edit as you like:

They land in resources/views/vendor/wiki. Every page extends layout.blade.php, so swapping that one file for your own layout is enough to put the wiki inside your app's chrome. Each page fills a content section and a title section. The layout also has a wiki-head stack for extra <head> tags, and colors are CSS variables (--wiki-accent and friends) at the top of the layout.

Use it from AI agents

The wiki can be a knowledge source for AI agents: Claude Code, Claude Desktop, Cursor, ChatGPT or anything else that speaks the Model Context Protocol. Ask "how do refunds work?" and the agent searches the wiki, reads the right pages and cites them.

It's built on Laravel MCP, which the wiki suggests but doesn't require. To turn it on:

Agents get these tools:

Tool Does
search_pages Search titles and text: titles, slugs, a snippet around the match, URLs
read_page One page by slug or title: Markdown body, title, URL, last update, current revision, the pages it links to and the pages linking to it
list_pages Every page alphabetically, paginated
recent_changes The latest edits with their summaries and authors, for the whole wiki or one page
write_page Create or update a page with an edit summary. Only when you allow writes (below)

Every page is also a resource, wiki://pages/{slug}, with slug completion, so clients that let you attach resources can pull a page into the conversation.

Who can see what. The endpoint is /mcp/wiki, behind auth:sanctum by default (set wiki.mcp.middleware for another guard). The wiki has no per-page permissions, so anyone who gets through that middleware can read every page, just as anyone who can open /wiki can. If your web wiki is private, keep the MCP guard at least as strict.

Writing is off by default. Set WIKI_MCP_WRITES=true to offer write_page. Agents then edit like people do: they need a signed-in user who passes the wiki-edit gate, each save is a revision with a summary (so it can be diffed and undone in the history), and an update must name the revision it was based on. If someone saved the page in the meantime, the write is refused and the agent is told to read it again and merge. An agent can't overwrite a page it hasn't read.

Connect a client

Create a token for the user the agent acts as (with Sanctum: $user->createToken('wiki-mcp')->plainTextToken), then:

Claude Code

Cursor (.cursor/mcp.json)

Claude Desktop (claude_desktop_config.json), through the mcp-remote bridge:

On your own machine, skip the token: run the server over stdio from your app's folder. Set WIKI_MCP_USER to a user id if the agent should be able to write as that user.

Clients that only sign in with OAuth (ChatGPT, Claude.ai connectors) need Laravel Passport: follow the Laravel MCP OAuth guide, then set wiki.mcp.middleware to ['auth:api'].

To mount the server yourself instead (another path, extra middleware), leave WIKI_MCP off and register Ruvelo\Wiki\Mcp\WikiServer in routes/ai.php:

Laravel Boost

If your app uses Laravel Boost, php artisan boost:install (or boost:update --discover) picks up the wiki's guidelines, so your coding agent knows to write pages through Wiki::write() rather than the tables, to render with $page->html(), to use the factory in tests, and so on.

For developers

PHP API

Wiki::write() takes the same basedOn: and throws EditConflict rather than overwrite a newer save.

Events: PageSaved (with wasCreated()) and PageDeleted. Exceptions: EditConflict, PageAlreadyExists and InvalidTitle, all extending WikiException.

JSON API

Off by default. Set WIKI_API=true and you get /api/wiki/pages (list, search, show, create, update, delete) and /api/wiki/pages/{slug}/revisions (list, show, restore), protected by Sanctum. Updates take a base_revision and answer 409 rather than overwrite a newer save.

Request Does
GET /pages?q= List pages, or search them. Paginated, per_page up to 100
GET /pages/{slug} One page with body, html, revision, links and backlinks
POST /pages Create. 201, or 409 if the title is taken
PATCH /pages/{slug} Update title and/or body; send base_revision to get a 409 instead of overwriting a newer save
DELETE /pages/{slug} Delete the page and its history. 204
GET /pages/{slug}/revisions History, newest first
GET /pages/{slug}/revisions/{id} One revision with its body
POST /pages/{slug}/revisions/{id}/restore Put that version back

Reading needs a valid token; writing also needs the wiki-edit gate. Use your own guard by setting wiki.api.middleware.

Import and export

Re-importing only saves files that changed. [[links]], [[Page|label]] and [[Page#Section]] work as in Obsidian.

Extending Markdown

In your tests

URLs

/wiki Home page
/wiki/{slug} A page
/wiki/{slug}/edit Edit
/wiki/{slug}/history Revisions
/wiki/{slug}/history/{id} One revision and its diff
/wiki/_/new Create (?title= to pre-fill)
/wiki/_/pages All pages
/wiki/_/recent Recent changes
/wiki/_/search?q= Search

Special pages live under /_/, which can never collide with a page: slugs never contain an underscore.

Renaming a page keeps its address. Links written with the old title ([[Old title]]) still resolve, because they point at the slug.

Contributing

Pull requests are welcome. Clone, composer install, then composer check runs code style (Pint), static analysis (PHPStan level 8) and the tests, exactly as CI does. See changelog.

The demo and screenshots are built from the package itself: composer demo writes the static demo into build/, and demo/screenshots.sh regenerates art/.

Credits

Built by François Bultez at Valtry, the website security scanner, and everyone who contributes.

License

MIT. See LICENSE.


All versions of laravel-wiki with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
laravel/framework Version ^12.4.1|^13.0
league/commonmark Version ^2.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ruvelo/laravel-wiki contains the following files

Loading the files please wait ...