The npm package aoc-cli
is a command line program that assists you with tasks related to automatic code generation.
To install the latest version of aoc-cli run this command line:
npm install -g @atlantis-of-code/aoc-cli
Command / Arguments | Alias | Description | Default |
---|---|---|---|
generate entities | g e | Generates models, entities, and model configurations, and writes the resulting files | |
--baseDir | -b | * Path (folder) where the configuration files are located | current path |
--config | -c | * List of configuration json files that are merged from the last to the first. Can use absolute or relative paths. | aoc-entities-config.json, aoc-entities-secrets.json |
generate database | g db | Runs sql scripts found in the sql directory or a specified path | |
--name | -n | * Name of the database (should match the application name, if it's a single tenant) | |
--path | -p | * Path of the directory containing sql files that will be executed in ascending alphanumeric order | |
--config | -c | * Path of a json file that has an object with a "db" property, with fields "host", "port", "user", "password", "database" (do not use the database name you want to create, use postgres or any other admin user). | db-secrets.json |
--noConfirm | * Do not ask for confirmation | false | |
--connectionString | -s | * Connection string to Postgresql in the form of "postgresql://user:pass@localhost:5432/postgres". Use postgres as the database or any existing database to execute commands (takes precedence over --config) | |
--dropDb | * Drop the target database if it exists before executing the sql commands | false | |
--skipDbCreation | * Skip the creation of the database | false | |
new app | n a | Creates a new application (client, server, common and database) | |
--name | -n | * Name of the application in kebab-case (lowercase words separated by a hyphen) | app-template |
--noConfirm | * Do not ask for confirmation | false | |
--companionAocSrc | * If true, the application will reference the aoc source code instead of using the aoc modules from node_modules | false | |
--connectionString | -s | * Connection string to Postgresql in the form of "postgresql://user:pass@localhost:5432/postgres". Use postgres as the database or any existing database to execute commands | |
--dropDb | * Drop the target database if it exists before executing the sql commands | false | |
--skipNpmInstalls | * Skip the automatic installation of node_modules packages after creating the application | false | |
--skipDb | * Skip the creation of the database and any related database operations | false |
You can see full descriptions by adding --help
at the end of each command.
aoc-cli --help
aoc-cli generate --help
aoc-cli generate entities --help
Please note, browse Issues and Discussions in Github for more information