Skip to content

canvas shell

canvas shell

Start interactive shell (REPL mode)

Synopsis

Start an interactive Read-Eval-Print Loop (REPL) shell for Canvas CLI.

The shell provides an interactive environment where you can execute Canvas commands without typing the 'canvas' prefix. It maintains session state and command history throughout the session.

Special shell commands: history - Show command history clear - Clear the screen session - Show current session state session set - Set a session variable session get - Get a session variable session clear - Clear session state exit/quit - Exit the shell

Examples:

# Start the interactive shell
canvas shell

# In the shell:

canvas> courses list canvas> session set course_id 12345 canvas> assignments list --course-id 12345 canvas> history canvas> exit

Note: This command is an alias for 'canvas repl'. Both commands start the same interactive shell environment.

canvas shell [flags]

Options

  -h, --help   help for shell

Options inherited from parent commands

      --as-user int       Masquerade as another user (admin feature, requires permission)
      --columns strings   Select specific columns to display (comma-separated)
      --config string     config file (default is $HOME/.canvas-cli/config.yaml)
      --dry-run           Print curl commands instead of executing requests
      --filter string     Filter results by text (case-insensitive substring match)
      --instance string   Canvas instance URL (overrides config)
      --limit int         Limit number of results for list operations (0 = unlimited)
      --no-cache          Disable caching of API responses
  -o, --output string     Output format: table, json, yaml, csv (default "table")
      --show-token        Show actual token in dry-run output (default: redacted)
      --sort string       Sort results by field (prefix with - for descending, e.g., -name)
  -v, --verbose           Enable verbose output

SEE ALSO

  • canvas - Canvas LMS CLI - Interact with Canvas from the command line
Auto generated by spf13/cobra on 25-Jan-2026