Browse the documentation

Preview documentation for AEL Beta 0.0.1 — launching soon

Creating a project

In AEL, the Agent Engineering Language, one command will create a ready-to-build project: ael init (command names may change before launch).

Status

Planned for AEL Beta 0.0.1. AEL is not available yet.

Usage

Preview syntax — may change before launch
ael init <name>
ael init <name> --template <template>
Argument or optionMeaning
<name>The project's name. It will become the name of the new folder and be recorded in metadata.ael.
--template <template>Start from a template instead of the minimal project. Template names are to be announced.
--jsonA machine-readable report of what was created.

What it creates

ael init support will create a folder named support in the current folder, holding the three files every project has at its root:

Preview syntax — may change before launch
support/
  main.ael        # main main(): the program's entry point
  pack.ael        # the packages the project uses; none yet
  metadata.ael    # the project's name and settings
  • main.ael will declare a main that does nothing yet, so the new project checks, builds and runs as it is.
  • pack.ael will declare no packages. It will stay in the project even while it is empty:
Preview syntax — may change before launch
pack { schema = 1; dependencies = []; }
  • metadata.ael will record the name you gave:
Preview syntax — may change before launch
metadata {
    schema = 1;
    name = "support";
}

The new project will be a console program. It will open no network port and add no server; you will add the HTTP package and declare routes only when you want it to serve an API, as Services and APIs shows. There will be no pack.lock and no .package folder yet: they will appear beside pack.ael when you add the first package with ael pack add.

Every other folder and file will be your choice. Project layout shows a larger project.

Names

A project name will be an AEL identifier:

  • letters, digits and _, not starting with a digit;
  • at most 64 characters;
  • not a keyword, not _ on its own and not the reserved name print.

Names will be case-sensitive, but ael init will refuse a folder name that differs only in letter case from one already beside it, and names that some operating systems reserve for devices, so the new folder means the same thing on every operating system.

It will never overwrite

  • If a file or folder with the project's name already exists, ael init will stop and change nothing.
  • The files will be prepared beside the new folder, and the folder will appear only when all three are complete. You will never find a project with one of its root files missing.
  • If it is interrupted, it will report anything it left behind, so you can remove it.

A project for a package

The same project layout will serve a package. To build one with ael package, the name in metadata.ael will have to be a package name, such as acme/billing: lower case and slash-separated. Building a package describes the rules.

Next