Page MenuHomePhabricator

[mwcli] Create a docs site
Closed, ResolvedPublic

Description

We should create a docs site for mwcli that is easy to keep up to date as things change.

From the email thread so far:

@Addshore

One of the other main things I would love to get right in the next few weeks is the docs experience for mwcli & mwdd.
Personally I think the best experience could be a static site build from the code repo deployed to doc.wm.o?

@kostajh

Unsure; there's definitely value in having docs easily findable on wikitech/mediawiki.org. Maybe ask Sarahor Alex about their thoughts on it? They are managing most documentation efforts at WMF.

@Addshore

Perhaps I should start another email thread with them?
OR wait until we figure out the board cleanup and then make some well described tickets & involve them?

I'm fine with it living anyway.
I'm a fan of the github cli docs and would love to aim for something as nice https://cli.github.com/manual/index

Event Timeline

Addshore moved this task from Inbox to Backlog on the mwcli board.
Addshore triaged this task as Medium priority.May 22 2021, 9:42 PM
Addshore moved this task from Backlog to In Progress on the mwcli board.

Just wanted to drop by and say that https://www.mediawiki.org/wiki/Cli is looking great! I'm happy to help review when you get to that stage.

Seeing that this project uses Cobra, there's an interesting documentation generator that comes with Cobra: https://github.com/spf13/cobra/blob/master/doc/md_docs.md I don't have the Go skills to try it out, but it could be a cool way to create a static site that would get us closer to something that looks like GitHub's docs for the command reference.

Seeing that this project uses Cobra, there's an interesting documentation generator that comes with Cobra: https://github.com/spf13/cobra/blob/master/doc/md_docs.md I don't have the Go skills to try it out, but it could be a cool way to create a static site that would get us closer to something that looks like GitHub's docs for the command reference.

Thanks for the link, I actually hadn't spotted that yet.
I'll see if I can get it working, as that would likely end up being far less effort than keeping things in sync on the wiki manually!

Having spent some time slowly updating https://www.mediawiki.org/wiki/Cli now, it would be cool to:

  • Automatically generate (as part of CI)
    • gifs of some commands as part of a CI job.
    • help output for commands
  • Automatically edit mediawiki.org when:
    • A new version is out with the auto generated parts

Most of the text on the site could probably live as part of the test in the tool itself..

With https://gitlab.wikimedia.org/repos/releng/cli/-/merge_requests/119 you can now auto generate the command reference in a bunch of markdown files.

Though I don't know the project well, could Wikimedia-Developer-Portal (prototype) also be the place for mwcli, or are you already considering it?

Though I don't know the project well, could Wikimedia-Developer-Portal (prototype) also be the place for mwcli, or are you already considering it?

Not seen this at all yet! Taking a look now!

It looks like linking from the dev portal could be good

For now I wrote some bash to convert these auto docs from markdown to wikitext and will aim to write these to mediawiki.org on release

You can see a sample page at https://test.wikipedia.org/wiki/User:Addshore/Cli/ref/latest/mw

And the specific commit documenting this is currently https://gitlab.wikimedia.org/repos/releng/cli/-/merge_requests/119/diffs?commit_id=14b9e9241414a5de9b4e00f58e379752e6b78d67 in the merge request

I reworked https://www.mediawiki.org/wiki/Cli today
Reference is currently available at https://www.mediawiki.org/wiki/Cli/ref/mw

I'm going to spend a little time making some templates to link things together nicely too (or try)

@apaskulin I'd love another review if you have time
Might mark this as resolved in the coming days / weeks