Skip to content

ffabbr/expert-vscode

Repository files navigation

Code Expert for VS Code (unofficial)

Browse, edit, run, and submit ETH Zürich Code Expert tasks from inside VS Code.

Unofficial. Community extension. Not affiliated with ETH or the Code Expert team.


Install

  1. Download expert-vscode-<version>.vsix from the latest release.
  2. In VS Code: open the Extensions panel → click the menu in its top-right → Install from VSIX… → pick the file. Or from a terminal:
    code --install-extension expert-vscode-<version>.vsix
  3. Reload VS Code if prompted.

Requirements: VS Code 1.110 or newer, macOS.


Getting started

1. Sign in

Open the Code Expert view (mortar-board icon in the Activity Bar on the left). Click "Sign in to Code Expert…" → pick "Sign in inside VS Code".

A browser tab opens with expert.ethz.ch. Sign in normally (SWITCH edu-ID). Once you're logged in, a green checkmark page appears in VS Code — you're done. You can close the browser tab.

If sign-in keeps timing out, try one of the other options in the picker (Chrome cookie import, or manual paste).

2. Open a task

The tree view in the left panel shows your semesters → courses → weeks → tasks. Click any task. The extension:

  • Pulls the project files into ~/CodeExpert/<semester>/<course>/<task>/
  • Locks server-side read-only files (In.java, Out.java, Graph.java, public/*, etc.) at the editor level — the lock icon appears on those tabs
  • Writes the task description as TASK.md and opens it in rendered preview
  • Switches your workspace to that folder

3. Edit and auto-sync

Just edit and save. Every Cmd+S pushes the file to Code Expert with the same call the web IDE uses — no manual upload step. The "Code Expert" Output channel shows each successful upload (↑ Main.java).

4. Run public tests

Click the ▶ play icon in the editor toolbar (top-right of any task file), or run "Code Expert: Run Public Tests" from the Command Palette.

Output appears in a Code Expert terminal pane with full ANSI coloring (yellow headers, red wrong answers, green correct + progress bar) — same as the web IDE's Test button.

Local edits are auto-saved and uploaded before the grader starts.

5. Submit

Click the ☁ cloud-upload icon in the editor toolbar, or run "Code Expert: Submit". Confirm in the dialog. The feedback view opens in your browser when the submission is registered.

Submissions are pushed against the same project files you've been editing, so save before submitting (the extension does this for you anyway).


Tips

  • Tree not updating? Click the refresh icon at the top of the Code Expert panel.
  • Need to sync down a fresh copy? Delete the task folder under ~/CodeExpert/ and click the task in the tree again.
  • Wrong account / signed in as someone else? "Code Expert: Sign Out" from the Command Palette, then sign in again.
  • Where do uploaded files go? Same place the web IDE writes them — autosaves_set on your student project. Visible by reopening the task in the web IDE.

Caveats

  • Uses an undocumented internal API of Code Expert. Endpoints can change without warning.
  • Do not use during proctored exams. This extension is for normal exercise work only.
  • Read-only files (In.java, Graph.java, etc.) on the server are also locked locally — VS Code won't let you save changes to those even if you bypass the editor's read-only flag.

Develop

git clone https://github.com/ffabbr/expert-vscode
cd expert-vscode
npm install
npm run watch       # auto-rebuild on changes

Open the folder in VS Code, press F5 to launch an Extension Development Host with the dev build loaded.

Build a release VSIX

npm run build
npm run package     # produces expert-vscode-<version>.vsix

Credits

Reverse-engineered with reference to the official MIT-licensed CodeExpertSync Tauri app. See NOTICE.

License

MIT — see LICENSE.

About

Unofficial VS Code extension for ETH Zürich's Code Expert

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors