Classeviva is a Go library and CLI tool to access the popular school portal https://web.spaggiari.eu.
An OpenAPI specification is available that documents the Classeviva API endpoints. This specification can be used to:
- View interactive API documentation - Use 3rd party tools like Swagger Editor or Redocly
- Generate API clients in your preferred programming language using tools like OpenAPI Generator
- Understand API endpoints and request/response formats
The specification is based on the unofficial community documentation at Classeviva-Official-Endpoints.
Note: This is an unofficial specification as the Classeviva API is not publicly documented by Spaggiari.
brew install zmoog/homebrew-classeviva/classevivabrew info zmoog/homebrew-classeviva/classeviva
==> classeviva: 0.2.1
Installed
/opt/homebrew/Caskroom/classeviva/0.2.1 (6.8MB)
Installed on 2025-10-30 at 23:37:52
From: https://github.com/zmoog/homebrew-classeviva/blob/HEAD/Casks/classeviva.rb
==> Name
classeviva
==> Description
==> Artifacts
classeviva (Binary)$ classeviva profile add joelmiller
Username: joelmiller
Password: ******
Profile 'joelmiller' added successfully.$ classeviva profile list
+------------+------------+---------+
| PROFILE | USERNAME | DEFAULT |
+------------+------------+---------+
| joelmiller | joelmiller | * |
+------------+------------+---------+
$ classeviva grades list
+------------+-------+-----------------------------------------------------------+----------------------------------+
| DATE | GRADE | SUBJECT | NOTES |
+------------+-------+-----------------------------------------------------------+----------------------------------+
| 2025-10-24 | 9 | SCIENZE MOTORIE E SPORTIVE | |
| | 7- | STORIA | |
| 2025-10-22 | 8½ | SCIENZE NATURALI (BIOLOGIA, CHIMICA, SCIENZE DELLA TERRA) | Verifiche genetica moderna e DNA |
+------------+-------+-----------------------------------------------------------+----------------------------------+% Classeviva supports multiple authentication methods with a priority chain, making it easy to manage credentials for multiple students.
Credentials are resolved in the following order (highest priority first):
- CLI flags:
--usernameand--password - Profile-based:
--profileflag ordefault_profilefrom config file - Environment variables:
CLASSEVIVA_USERNAMEandCLASSEVIVA_PASSWORD
For families with multiple students, profile-based authentication is the recommended approach.
Add profiles for each student:
# Add first student profile
$ classeviva profile add older-kid
Username: student1_username
Password: ********
# Add second student profile
$ classeviva profile add younger-kid
Username: student2_username
Password: ********Set a default profile to use when --profile is not specified:
$ classeviva profile set-default older-kidView all configured profiles:
$ classeviva profile list
PROFILE DEFAULT
older-kid *
younger-kidDisplay profile information (credentials are hidden):
$ classeviva profile show older-kid
Profile: older-kid
Username: student1_username
Password: ********Delete a profile:
$ classeviva profile remove younger-kidOnce profiles are configured, use them with any command:
# Use default profile
$ classeviva grades list --limit 10
# Use specific profile
$ classeviva --profile younger-kid grades list --limit 10
# Override with CLI flags (highest priority)
$ classeviva --username user --password pass grades listProfiles are stored in ~/.classeviva/config.yaml:
profiles:
older-kid:
username: "student1_username"
password: "student1_password"
younger-kid:
username: "student2_username"
password: "student2_password"
default_profile: "older-kid"Note: The config file has restrictive permissions (0600) to protect credentials.
For backward compatibility, you can still use environment variables:
export CLASSEVIVA_USERNAME="your_username"
export CLASSEVIVA_PASSWORD="your_password"
$ classeviva grades listAuthentication tokens are cached per-profile in ~/.classeviva/identity-{profile}.json to minimize API calls. Tokens are automatically refreshed when expired.
Display the application version:
$ classeviva version
Classeviva CLI v0.0.0 (123) 2022-05-08 by zmoogJSON output:
$ classeviva version --format json
{
"version": "v0.0.0",
"commit": "123",
"date": "2022-05-08",
"builtBy": "zmoog"
}List student grades with optional limit:
$ classeviva grades list --limit 3
+------------+-------+-----------------+-------------------------------+
| DATE | GRADE | SUBJECT | NOTES |
+------------+-------+-----------------+-------------------------------+
| 2022-04-27 | 9 | ARTE E IMMAGINE | |
| 2022-04-22 | 7+ | COMPORTAMENTO | comportamento della settimana |
| | 7 | SCIENZE | |
+------------+-------+-----------------+-------------------------------+
JSON output:
$ classeviva grades list --limit 1 --format json
[
{
"subjectDesc": "ARTE E IMMAGINE",
"evtDate": "2022-04-27",
"decimalValue": 9,
"displayValue": "9",
"color": "green",
"skillValueDesc": " "
}
]List agenda items (homework, events) with optional date range and limit:
$ classeviva agenda list --limit 2
+---------------------------+---------------------------+---------+----------------------+-----------------------------------------------------------------------+
| BEGIN | END | SUBJECT | TEACHER | NOTES |
+---------------------------+---------------------------+---------+----------------------+-----------------------------------------------------------------------+
| 2022-05-02T09:00:00+02:00 | 2022-05-02T10:00:00+02:00 | | PESANDO MARGHERITA | Inizio interrogazioni di inglese (1º turno) |
| 2022-05-03T00:00:00+02:00 | 2022-05-03T23:59:59+02:00 | | AVANZATO PAOLA CARLA | Link per colloqui |
+---------------------------+---------------------------+---------+----------------------+-----------------------------------------------------------------------+
JSON output:
$ classeviva agenda list --until 2022-04-27 --limit 2 --format json
[
{
"evtId": 546249,
"evtCode": "AGNT",
"evtDatetimeBegin": "2022-05-02T09:00:00+02:00",
"evtDatetimeEnd": "2022-05-02T10:00:00+02:00",
"notes": "Inizio interrogazioni di inglese (1º turno)",
"authorName": "PESANDO MARGHERITA",
"subjectDesc": ""
},
{
"evtId": 578930,
"evtCode": "AGNT",
"evtDatetimeBegin": "2022-05-03T00:00:00+02:00",
"evtDatetimeEnd": "2022-05-03T23:59:59+02:00",
"notes": "Link per colloqui prof. AVANZATO",
"authorName": "AVANZATO PAOLA CARLA",
"subjectDesc": ""
}
]List school announcements and circulars:
$ classeviva noticeboards list
+---------------------+------+---------------------------------------+
| PUBLICATIONDATE | READ | TITLE |
+---------------------+------+---------------------------------------+
| 2022-04-28T10:30:00 | true | Comunicazione assemblea di istituto |
| 2022-04-25T15:45:00 | false| Circolare n. 123 - Uscita anticipata |
+---------------------+------+---------------------------------------+
JSON output:
$ classeviva noticeboards list --format json
[
{
"pubId": 12345,
"cntTitle": "Comunicazione assemblea di istituto",
"readStatus": true,
"pubDT": "2022-04-28T10:30:00",
"evtCode": "CF",
"cntValidInRange": true,
"cntStatus": "active",
"cntCategory": "General",
"cntHasAttach": true,
"attachments": [
{
"fileName": "comunicazione.pdf",
"attachNum": 1
}
]
}
]Download noticeboard attachments:
$ classeviva noticeboards download --publication_id 12345 --output-filename ./downloads
+----------------------------------+
| FILE |
+----------------------------------+
| ./downloads/12345-documento.pdf |
+----------------------------------+