Skip to main content

The terminal

The terminal is the version of miyagi for those who prefer the keyboard or want single-command tasks. It does the same as the desktop app, with the same permissions before publishing and the same subjects. You need to install it from the terminal.

The output of miyagi --help: the commands and their options.
miyagi's commands, with miyagi --help.

Creating a subject: miyagi init​

Terminal
$ miyagi init

It asks you for the name, the description, the tone and the language, whether you want to create instructions.md and whether you're connecting a Moodle classroom now.

The terminal with miyagi init on a demo subject: name, description, tone, language, and the option of not connecting the classroom.
miyagi init, without connecting a classroom.

The subject is saved in ~/.miyagi/workspaces/<name>/ and you open it from anywhere by its name, for example miyagi chat -w bases-de-datos. miyagi workspaces shows you which ones you have. The details are in Getting started.

Talking to it: miyagi chat​

Terminal
$ miyagi chat -w bases-de-datos

The chat fills the whole terminal window. It greets you with what it already knows about the course, and you ask for things in your own words.

miyagi chat with a read-only reply about the submissions for the final practical, with a table of aliases and their state.
A real reply in the terminal chat.

Before publishing, it asks your permission with a panel: Yes (Enter, 1 or y), No (2 or n) or Stop (3).

The terminal chat with the approval panel for renaming a section and the Yes, No and Stop options.
The approval in the terminal.

Shortcuts are typed with /, and miyagi commands lists them:

The output of miyagi commands: the list of chat shortcuts.
The chat shortcuts.

All the keys and the modes are in The conversation.

Single-command tasks: miyagi run​

If you already know what you want, give it the task in one go:

Terminal
$ miyagi run --task "Which submissions do I have left to grade?"
The terminal with a read-only miyagi run --task and its reply.
A read-only task with miyagi run --task.

It's explained in Single-command tasks.

Give it your material: miyagi ingest​

Copy your documents into the subject's sources folder and:

Terminal
$ miyagi ingest -w bases-de-datos

It doesn't open Moodle: it reads each document and turns it into pages of its course memory, linked to each other.

miyagi ingest working on a demo subject: it reads the sources and creates pages as it goes.
miyagi ingest at work.
The summary of miyagi ingest: the gaps it finds and the web sources it suggests.
And its summary, with the gaps it found.

Looking at your Moodle: miyagi explore​

With the classroom connected, miyagi explore looks, without changing anything, at which activity and question types it sees in your course and how grades are calculated, and notes it down in course/moodle-capabilities.

Terminal
$ miyagi explore -w bases-de-datos
The end of miyagi explore: a summary of what it has seen and the page saved in course/moodle-capabilities.
The end of miyagi explore.

Extensions: miyagi extension​

Terminal
$ miyagi extension list
$ miyagi extension add docker-lab
The output of miyagi extension list: docker-lab and moodle-teacher enabled.
miyagi extension list.

All the commands are in Extensions. Inside the chat, /extensions shows which ones the session works with.

Its skills: miyagi skills​

Terminal
$ miyagi skills
The output of miyagi skills with the list of skills and, at the end, estilo-sql marked as your own.
miyagi skills, with a skill of your own at the end.

You can see it in real tasks in Use cases in the terminal. All the commands and options are in the Reference.