You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 3, 2025. It is now read-only.
TMC-CLI is the command-line client for University of Helsinki's TestMyCode -framework. TestMyCode is used by various online programming courses for exercise testing and submission.
13
13
14
14

15
15
16
-
##Requirements
16
+
##Requirements
17
17
18
18
* Java Runtime Environment 7
19
19
* Linux, Mac OS X or Microsoft Windows
20
20
* Currently only limited support for Windows
21
21
* Other Unix-like systems may work, but are not tested
22
22
* If you want autocompletion, Bash or a Bash-compatible shell is required
23
23
24
-
##Installation
24
+
##Installation
25
25
26
-
###Using the install script (Linux/OS X only)
26
+
###Using the install script (Linux/OS X only)
27
27
28
28
`cd` into the directory where you wish to install TMC-CLI. Then, copy and paste the following command in your terminal:
TMC-CLI should now be installed. You can try running it with `tmc` in a new terminal.
35
35
36
-
###Manual installation
36
+
###Manual installation
37
37
38
38
Download the latest [release](https://github.com/testmycode/tmc-cli/releases/latest). If you use Linux or OS X, choose "tmc". If you use Windows, choose "tmc-cli-[VERSION].jar".
39
39
@@ -58,11 +58,11 @@ Tip: On Windows, use `doskey tmc="java -jar [path_to_tmc-cli.jar] $*"` in cmd.ex
58
58
59
59
Now that you've installed tmc-cli, you can view all available commands by running tmc without arguments or with `tmc --help`. You can also view all available options for commands by running them with the `--help` switch, for example `tmc courses --help`.
60
60
61
-
##Uninstallation
61
+
##Uninstallation
62
62
63
63
Delete tmc from the directory where you downloaded it, .tmc-autocomplete.sh from your home directory and remove 'source $HOME/.tmc-autocomplete' from your shell rc file.
64
64
65
-
##Manual
65
+
##Manual
66
66
67
67
The Unix man page for tmc-cli is located in docs/tmc.1 in this repository. To view it, open it with `man -l tmc.1`.
68
68
@@ -72,7 +72,7 @@ For system administrators/packagers: To make the man page available for all user
72
72
73
73
You can also open the manual in your shell remotely with `curl -0s https://raw.githubusercontent.com/testmycode/tmc-cli/master/docs/tmc.1 | man -l -`. This will show the manual for the latest version. You may want to bind it to an alias for ease of use.
74
74
75
-
##Logging in
75
+
##Logging in
76
76
77
77
Once installation is complete, you can log in using `tmc login`. This saves your TMC login information to a configuration file in ~/.config/tmc-cli/ (or %APPDATA% on Windows) - you will only have to log in once.
78
78
@@ -84,7 +84,7 @@ password:
84
84
Login successful.
85
85
```
86
86
87
-
##Listing courses
87
+
##Listing courses
88
88
89
89
Once you have logged in, you can list all the available courses on the server with `tmc courses`.
90
90
```
@@ -98,7 +98,7 @@ javascript-for-lazy-hipsters
98
98
99
99
Note that you can only submit exercises on courses for which you have enrolled.
100
100
101
-
##Downloading courses
101
+
##Downloading courses
102
102
103
103
Navigate to a suitable directory in which you wish to download your course(s). Then, run `tmc download [COURSE_NAME]`. This will create a new directory for your course and download all available exercises into it. By default, only exercises that you have not fully completed are downloaded - download all exercises with `-a`.
Course-specific information is stored in .tmc.json. Do not manually edit or remove it unless you are completely done with the course - doing so will cause tmc to not function properly.
116
116
117
-
##Running tests
117
+
##Running tests
118
118
119
119
After you've completed an exercise and wish to run tests on it, navigate to the exercise directory and run `tmc test`. If you are in the course root directory, you can also give the names of the exercises as arguments: `tmc test exercise1 exercise2`. Running `tmc test` in the course root with no arguments will run tests on all exercises.
120
120
@@ -125,7 +125,7 @@ Test results: 1/1 tests passed
125
125
All tests passed! Submit to server with 'tmc submit'
126
126
```
127
127
128
-
##Submitting exercises
128
+
##Submitting exercises
129
129
130
130
You have now completed your first exercise! To submit your exercise, run `tmc submit`. The syntax is the same as for running tests.
As you complete exercises, more exercises may become available. To update the course and download new exercises, run `tmc update`.
144
144
@@ -147,7 +147,7 @@ As you complete exercises, more exercises may become available. To update the co
147
147
New exercises downloaded: [exercise5, exercise6]
148
148
```
149
149
150
-
##Listing exercises
150
+
##Listing exercises
151
151
152
152
If you want to see your current progress, you can view the status of all course exercises with `tmc exercises [course]`. By default, the exercise list is viewed in your system's pager, but you can print them directly to your terminal with the `-n` or `--no-pager` switch.
153
153
@@ -161,7 +161,7 @@ Deadline: 2038-20-01 at 18:00:00
161
161
Not completed: exercise4
162
162
```
163
163
164
-
##Sending exercises to pastebin
164
+
##Sending exercises to pastebin
165
165
166
166
If you're having trouble with an exercise or just want to have your code peer-reviewed, you can use `tmc paste` to send an exercise to the TMC server's pastebin. You'll be prompted to add a message, but it is optional.
167
167
@@ -186,7 +186,7 @@ You cannot submit exercises that you have completed.
186
186
## Crafting a release
187
187
Releases are automatically built in Travis and pushed to GitHub releases. Once ready to release, update version in pom.xml and gat the commit accordingly. Once tests have passed a new release is uploaded to travis. Note: only travis runs with tag set are used for releases.
188
188
189
-
##Disclaimer
189
+
##Disclaimer
190
190
191
191
This software is licensed under [the MIT license](https://raw.githubusercontent.com/testmycode/tmc-cli/instructions/LICENSE).
0 commit comments