Install
sh
curl -fsSL https://ant-lang.org/install.sh | shThe script downloads ant into /usr/local/bin, or ~/bin under Git Bash.
On Windows, in PowerShell:
powershell
irm https://ant-lang.org/install.ps1 | iexThe script downloads ant.exe into ~\bin and adds that directory to your PATH.
Or build it from source:
sh
go install github.com/ant-src/ant/cmd/ant@latestRun a program
sh
ant check main.ant
ant run main.antWithout a file, ant opens the REPL. ant fmt formats sources, ant test runs the test files beside them, and ant doc prints the documentation of a name:
sh
ant fmt .
ant test
ant doc Array.mapShell completion
Complete commands, flags, and files in the shell:
sh
source <(ant --comp zsh) # in ~/.zshrc, after compinit
source <(ant --comp bash) # in ~/.bashrc
ant --comp fish | source # in ~/.config/fish/config.fishOpen a new shell, or source its startup file, for the line to take effect. zsh ships a completion named _ant for Apache Ant; source Ant's script after compinit so it replaces that one.
