14 Command-Line Interface

Asymptote code may be sent to the https://asymptote.ualberta.ca server directly from the command line. The public endpoint is

https://asymptote.ualberta.ca/cli

Send your .asy source as the POST body (for example with curl --data-binary) and choose the output format with the f (or outformat) query argument; additional asy command-line options are passed as further query arguments. A GET to the endpoint returns the server’s asy -version string.

The same requests are also accepted over plain HTTP directly on port 10007 (for example curl --data-binary 'import venn;' 'http://asymptote.ualberta.ca:10007?f=svg'). The HTTPS endpoint above is preferred; the direct port will eventually be discontinued.

The source code for the command-line interface is available at https://github.com/vectorgraphics/asymptote-http-server.