Simple set of command-line utilities for interacting with Canvas API from your terminal. For a more streamlined experience, use canvas-cli (assuming, its ready :)
context
- Manage Canvas contextsws
- Manage Canvas workspacescanvas
- General Canvas system commands (including secure login)- Extends the default shell prompt (PS1) with Canvas workspace and context info
- Clone this repository:
git clone https://github.com/yourusername/canvas-shell.git
cd canvas-shell
- Run the installation script:
./install.sh
- Restart your terminal or source your bashrc:
source ~/.bashrc
# Set or update Canvas API key securely, defaults to localhost
canvas login
# Set Canvas server URL and API key in one step (URL format: protocol://host[:port])
canvas login https://my.cnvs.ai
# Connect to Canvas API
canvas connect
# Check connection status
canvas status
# View configuration
canvas config
# Disconnect from Canvas API
canvas disconnect
# For the whole list, run
canvas help
# Show current workspace
ws
# Set workspace
ws set myworkspace
# List available workspaces
ws list
# For the whole list, run
ws help
# Set context URL
context set https://example.com
# Show current context path
context path
# List available paths
context paths
# Show context tree
context tree
# For the whole list, run
context help
Configuration is stored in ~/.canvas/config/canvas-shell.ini
.
Example configuration:
protocol="http"
host="127.0.0.1"
port="8001"
base_url="/rest/v2"
api_key="your-auth-token"
default_workspace="universe"
default_context="default"
default_session="default"
- Add support for custom prompt (PS1)
- Fix the small timeout delay on start of the terminal(needs further testing, should not really be due to our CLI)
MIT