QuakeC Studio

Command line

Two programs come with the app. quakec-ide builds, checks and tests a mod, serves the IDE's tools to other agents, and runs any command of the IDE by its id. quakec-lsp is a language server that gives other editors QuakeC Studio's understanding of QuakeC. Install says where each package puts them.

quakec-ide

quakec-ide new <id1|rerelease> <folder> [--from <dir>]
quakec-ide build [<project>] [--dialect <vanilla|fteqcc>]
quakec-ide check [<project>] [--dialect <vanilla|fteqcc>]
quakec-ide test [<project>] [--dialect <vanilla|fteqcc>] [--filter <text>] [--game <folder>]
quakec-ide mcp [<project>] [--dialect <vanilla|fteqcc>] [--read <dir>]... [--write <dir>]...
               [--read-only] [--game <folder> | --connect [<socket>]]
quakec-ide run <command> [<json>] [--project <project> [--dialect <vanilla|fteqcc>]]
quakec-ide commands
quakec-ide doctor [--check <games|host|keychain>]... [--game <folder>] [--require-game]
SubcommandWhat it does
newMakes a mod in a new or empty folder from a starter: id1, id's QuakeC 1.01, or rerelease, the 2021 rerelease's QuakeC. The files come from GitHub at a pinned version; --from reads a local copy instead.
buildCompiles each module and writes its progs.dat under build/, printing each error and warning as <path>:<line>:<column>: <error|warning> <code>: <message>
checkPrints every error and warning the same way, and the counts, writing nothing
testBuilds the mod and runs its test_ functions and tests/*.scenario files, printing each as passed, FAILED or skipped
mcpServes the agent's tools over MCP on stdin and stdout (MCP)
runRuns any command by its id with JSON parameters and prints its answer as JSON
commandsLists every command with its id, summary and parameters, as JSON
doctorChecks the install: which games it finds, whether the game engine starts, and whether the system keychain works; a line each, ok or FAIL

The project is the current folder when none is named. It needs a quakec.toml or a progs.src. A project with no quakec.toml is read as vanilla QuakeC unless --dialect fteqcc says otherwise, so the rerelease's code builds with:

quakec-ide build path/to/rerelease --dialect fteqcc

The exit status is 0 when everything worked, 1 when the build or the check found errors or a test failed, and 2 for a wrong command line, a folder with no project, or a command that failed. That makes quakec-ide test a CI step as it is.

Running any command

Every command in the palette is a command with an id, and run runs it with the same parameters the palette, the agent and MCP give it. For example, to export a mod packed into a pak0.pak:

quakec-ide run project.export '{"pak": true}' --project path/to/your/mod

quakec-ide commands lists each command's parameters, and the commands reference describes every one.

quakec-lsp

quakec-lsp speaks the Language Server Protocol over stdin and stdout. Any editor with an LSP client gets diagnostics, go to definition, references, rename, hover, completion, semantic highlighting, parameter hints, quick fixes and formatting, from the same code as the IDE.

A project's quakec.toml gives each module its dialect and engine. For a project without one, the client can say so in its initialization options:

{ "dialect": "fteqcc", "target": "rerelease", "autoproto": false }

Neovim

Neovim 0.11 or later, in init.lua:

vim.filetype.add({ extension = { qc = "quakec" } })
vim.lsp.config("quakec", {
  cmd = { "quakec-lsp" },
  filetypes = { "quakec" },
  root_markers = { "quakec.toml", "progs.src" },
})
vim.lsp.enable("quakec")

VS Code and Zed

There is no QuakeC Studio extension for VS Code or Zed yet (issue #72). Until there is, a generic LSP client extension can start quakec-lsp for .qc files.