From ad7c5630d35f7548b1b2b4403091ff2f73e9bdaf Mon Sep 17 00:00:00 2001 From: Jarrod Overson Date: Mon, 23 Jan 2023 10:14:09 -0500 Subject: [PATCH] Added `--list` option for `apex run` and updated readme/descriptions (#21) * added --list for apex run, unified ui tables, updated readme, replaced justfile with apex.yaml, centralized some dependencies, updated cliffy * updated descriptions * Adding version column to template list * updated git url Co-authored-by: Phil Kedy --- .github/workflows/test.yml | 5 ++- README.md | 66 +++++++++++++++++++++++++++----------- apex | 3 ++ apex.ts | 15 +++------ apex.yaml | 10 ++++++ justfile | 7 ---- src/commands/describe.ts | 15 +++------ src/commands/generate.ts | 4 +-- src/commands/init.ts | 2 +- src/commands/install.ts | 2 +- src/commands/list.ts | 24 ++++++++++---- src/commands/new.ts | 2 +- src/commands/run.ts | 63 ++++++++++++++++++------------------ src/commands/utils.ts | 4 +-- src/commands/watch.ts | 4 +-- src/config.ts | 22 ++++++++++++- src/deps/cliffy.ts | 1 + src/deps/log.ts | 1 + src/init.ts | 2 +- src/task.ts | 2 ++ src/ui.ts | 51 +++++++++++++++++++++++++++++ src/utils.ts | 35 ++++++++++++++++---- 22 files changed, 234 insertions(+), 106 deletions(-) create mode 100755 apex create mode 100644 apex.yaml delete mode 100644 justfile create mode 100644 src/deps/cliffy.ts create mode 100644 src/deps/log.ts create mode 100644 src/ui.ts diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5463cb9..d785add 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Test Deno Module +name: Apex tests on: push: @@ -11,8 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: extractions/setup-just@v1 - uses: actions/checkout@v2 - uses: denolib/setup-deno@v2 - name: Run tests - run: just test + run: ./apex test diff --git a/README.md b/README.md index 6be206d..caaeb5e 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,43 @@ -# Apex CLI +# Apexlang CLI -Apex is an interface definition language (IDL) for modeling software. Generate -source code, documentation, integration, everything automatically. +The `apex` CLI is a one-stop shop for all projects across all languages. -### Goals: +It's a -- Approachable - Apex was designed from the ground up to be succinct. - Interfaces and data types are described using familiar syntax that won't slow - you down. -- Protocol agnostic - Regardless of the architecture, your data and - interfaces are fundamentally the same. Use Apex to generate code for any - serialization format or protocol. -- Extensible - Generators are written in TypeScript. Easily add - custom generators that satisfy your unique needs and publish them for everyone - to use. +- Project templating and scaffolding tool +- Extensible code generation tool +- Task runner For more information, visit [https://apexlang.io](https://apexlang.io). -## Installation +## Prerequisites + +The `apex` CLI depends on Deno. -First, install [Deno](https://github.com/denoland/deno_install). +Install `deno` with instructions +[here](https://github.com/denoland/deno_install). -Then run the command below from a terminal. +## Installation + +To install a release version of the `apex` CLI, run the command below: ``` deno install -A --unstable -f -n apex https://deno.land/x/apex_cli/apex.ts ``` +To install from source, clone this repository and run `./apex run install` + +```sh +git clone https://github.com/apexlang/apex.git +cd apex +./apex install # or deno install -A --unstable ./apex.ts +``` + +## Usage + +Visit [https://apexlang.io](https://apexlang.io) for official documentation and +usage. + ```shell apex --help ``` @@ -39,7 +50,7 @@ Output: Description: - A code generation tool using Apex, an interface definition language (IDL) for modeling software. + A code generation tool using Apexlang, an interface definition language (IDL) for modeling software. Options: @@ -51,16 +62,33 @@ Output: install - Install templates locally. new