Skip to content

ulams login

Generated from front/cli (ulams schema)

Log in to an instance and save a profile.

Methods: –token-stdin (paste a token), –email with –password-stdin, –demo admin|tutor|student (demo tenants), –device (browser approval, when the server supports it). The token is stored in a 0600 credentials file, never printed.

Kind: local (idempotent). Stability: stable. MCP tool: login (not exposed). Scopes: none.

Endpoints: POST /api/auth/login, POST /api/demo/login, POST /api/auth/device/code, POST /api/auth/device/token.

Flag Type Required Description
--url string Instance origin, e.g. http://coffee.localhost. Defaults to –url or ULAMS_URL.
--email string Email for a password login (use with –password-stdin).
--password-stdin boolean Read the password from stdin (one line).
--demo string Log in as a demo user (demo tenants only).
--device boolean Browser login with a device code (needs server support).
--scopes array Scopes to request with –device: comma-separated or repeated, scopes (courses:write) or presets (@author, @admin, @read-only, @ci). Default: @author,tokens:write.
--make-default boolean Make this the default profile (default true).
Terminal window
# Demo admin on the local coffee tenant
ulams login --url http://coffee.localhost --demo admin
# Pasted token
ulams login --url https://school.example.com --token-stdin < token.txt
# Password
ulams login --url https://school.example.com --email me@example.com --password-stdin
Input JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"url": {
"description": "Instance origin, e.g. http://coffee.localhost. Defaults to --url or ULAMS_URL.",
"type": "string"
},
"email": {
"description": "Email for a password login (use with --password-stdin).",
"type": "string"
},
"passwordStdin": {
"description": "Read the password from stdin (one line).",
"type": "boolean"
},
"demo": {
"description": "Log in as a demo user (demo tenants only).",
"type": "string",
"enum": [
"admin",
"tutor",
"student"
]
},
"device": {
"description": "Browser login with a device code (needs server support).",
"type": "boolean"
},
"scopes": {
"description": "Scopes to request with --device: comma-separated or repeated, scopes (courses:write) or presets (@author, @admin, @read-only, @ci). Default: @author,tokens:write.",
"type": "array",
"items": {
"type": "string"
}
},
"makeDefault": {
"description": "Make this the default profile (default true).",
"type": "boolean"
}
}
}