Skip to content

Latest commit

 

History

History
107 lines (71 loc) · 3.92 KB

File metadata and controls

107 lines (71 loc) · 3.92 KB
titleshortTitleallowTitleToDifferFromFilenameintroversionstype
Using {% data variables.product.prodname_classroom %} with {% data variables.product.prodname_cli %}
{% data variables.product.prodname_classroom %} CLI
true
You can use `gh`, the {% data variables.product.github %} command line interface, to work with {% data variables.product.prodname_classroom %} directly from your command line.
fpt
*
how_to

About {% data variables.product.prodname_classroom %} CLI

{% data reusables.cli.about-cli %} For more information, see AUTOTITLE.

You can work with {% data variables.product.prodname_classroom %} in the {% data variables.product.prodname_cli %} to:

Setting up {% data variables.product.prodname_cli %}

{% data reusables.cli.cli-installation %}

Using the {% data variables.product.prodname_classroom %} extension with {% data variables.product.prodname_cli %}

If you have not already done so, run gh auth login to authenticate with your {% data variables.product.prodname_dotcom %} account.

To install the {% data variables.product.prodname_classroom %} extension, run gh extension install github/gh-classroom.

To use gh to work with {% data variables.product.prodname_classroom %}, type gh classroom SUBCOMMAND.

As an example of a series of commands you might use to work with {% data variables.product.prodname_classroom %}, you could:

  • List your classrooms:
    gh classroom list
  • List the assignments for a specific classroom:
    gh classroom assignments
  • View information for a specific assignment:
    gh classroom assignment

gh subcommands for {% data variables.product.prodname_classroom %}

These sections give example subcommands for each of the available operations. {% data reusables.classroom.classroom-cli-prompt %}

On the command line, use gh classroom --help for general help or gh classroom SUBCOMMAND --help for help with a specific subcommand.

List classrooms

gh classroom list

List of classrooms you own.

View classroom information

gh classroom view

Display the classroom ID, classroom slug, title, and other information about a classroom.

List assignments

gh classroom assignments

Display a list of assignments for a classroom.

List accepted assignments

gh classroom accepted-assignments

Display a list of accepted assignments and information about the student's assignments.

View assignment information

gh classroom assignment

Displays assignment information.

Clone an assignment's starter code repository

gh classroom clone starter-repo

Clones starter code repo used by an assignment. By default, the starter code is cloned into the current directory. To clone into a different directory, use the --directory flag. If the directory does not exists, it will be created.

Clone a student’s assignment repository

gh classroom clone student-repos

Clones student repositories from a given assignment. By default, the student repositories are cloned into the current directory a directory named after the assignment slug. To clone into a different directory, use the --directory flag. If the directory does not exists, it will be created.

By default, all student repositories are cloned. To get a different number of repositories, use the --page NUMBER and --per-page NUMBER flags.

close