A command-line interface for interacting with the Jutge.org platform API. Access your profile, submit solutions, upload problems, manage courses, and more directly from your terminal.
- π» Easy interface with Jutge.org API
- π¨βπ« Student operations (profile, awards, submissions, courses)
- π Instructor operations (queries, course management)
- π Multi-account authentication management
- π Auto-login with saved credentials
- π Multiple output formats (JSON, YAML, CSV, table, raw)
- π File upload and download support
The CLI requires Bun as a JavaScript runtime.
bun install --global @jutge.org/cliVerify the installation:
jutge --versionLogin to your Jutge.org account:
jutge loginYou'll be prompted for your email and password. Your credentials will be securely stored for future use.
# Get help about available commands
jutge --help
# Explore specific sections
jutge student --help
jutge instructor --help
# View your profile
jutge student profile
# List your courses
jutge student courses listMuch more commands are available; use --help to explore them.
The CLI supports managing multiple Jutge.org accounts, making it easy to switch between student and instructor roles or different user accounts.
# List all registered accounts
jutge accounts list
# Add a new account
jutge accounts add -e [email protected] professor
# Switch active account
jutge accounts use professor
# Use a specific account for one command
jutge student profile -a professor
# Remove an account
jutge accounts remove professor
# Rename an account
jutge accounts rename professor prof
# View the accounts manual
jutge accounts manualFor convenience, you can save the password of the current account locally (stored as base64):
jutge accounts save-passwordWarning: Passwords are not securely encrypted. Use this feature at your own risk.
Set a preferred output format for current account:
jutge accounts default-format jsonThe CLI supports multiple output formats for flexibility:
# JSON format (good for scripting)
jutge student profile --json
# Table format (human-readable)
jutge student courses list --table
# YAML format
jutge student awards list --yaml
# CSV format (for spreadsheets)
jutge instructor queries getCourseProblemSubmissions \
--course_nm "PRO3_2024" \
--problem_nm "P68688_ca" \
--csv
# Raw format (no formatting)
jutge student profile --raw# Upload a file (input files are always arguments)
jutge student profile updateAvatar photo.jpg
# Download a file (use -o to specify output name)
jutge student submissions download --submission_id S001 -o my-submission.zipSee the raw API request and response:
jutge student profile --debugThe CLI structure mirrors the Jutge.org API, making it easy to explore:
# Get help for any command
jutge student --help
jutge student courses --help
jutge instructor queries --help
# Each endpoint maps to a command
# API: student.profile β CLI: jutge student profile
# API: instructor.queries.getCourseProblemSubmissions β
# CLI: jutge instructor queries getCourseProblemSubmissions
# See the API documentation for more details:
# https://api.jutge.orgConfiguration files are stored in platform-specific locations.
credentials.json- Account credentials and tokensconfig.yml- General settings
JUTGE_API_URL- Override the default API endpoint (default:https://api.jutge.org/api)
Example:
export JUTGE_API_URL="https://api-dev.jutge.org/api"
jutge student profileCheck for and install updates:
jutge upgradeIf you encounter authentication errors:
# Logout and login again
jutge logout
jutge login
# Check which account is active
jutge accounts list# Verify the API endpoint
echo $JUTGE_API_URL
# Check if the API is accessible
curl https://api.jutge.org/api/dir- Use
--helpwith any command to see detailed usage - Check the Jutge.org documentation for API details
- Report issues on the project repository
- Bun - JavaScript runtime (required)
- Internet connection to access Jutge.org API
- Documentation: Use
jutge <command> --helpfor command-specific help - API Documentation: https://api.jutge.org
- Platform: https://jutge.org
Copyright Β© Jutge.org. All rights reserved.