lama2

command module
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2022 License: AGPL-3.0 Imports: 1 Imported by: 0

README

Lama2: Plain-text Powered REST API Client

About

Lama2 is a plain-text powered REST API client & manager built for serious engineering teams. Lama2 specifies the .l2 syntax for describing APIs, and implements a CLI to execute .l2 files. Engineers can collaborate on .l2 files using version control. Lama2 integrates nicely with IDEs and text-editors as well. Think of Lama2 as markdown for APIs.

Benefits

  1. Plain-text files: Store APIs in the plain-text .l2 API files. Simple and human-friendly syntax. Learn basics within minutes!
  2. Simple CLI: Launch the CLI tool l2 on API files to make REST API requests.
  3. Editor support: Invoke Lama2 from your favorite text editor or IDE. Helpful documentation and tool support to build editor extensions included.
  4. Longevity & track-ability: Commit .l2 files to git or other version control for long life & change tracking.
  5. Collaboration: Share API repo with teammates and colleagues to collaborate
  6. Documentation: Explore examples, how-tos, explanations, references, FAQ/RAQs, and diagrams. Documentation is a priority, so that you never have to get lost.
  7. Extensibility: .l2 syntax is implemented as a recursive descent parser, based on a formal grammar. Dig into details and implement new syntax (ex: to support websockets)

Terminal Demo: A POST request

VSCode Demo: The same POST request

Installation/Update

For Linux/MacOS systems, run the following command to either install or update Lama2:

curl -s https://raw.githubusercontent.com/HexmosTech/Lama2/main/install.sh | bash -s

Learn more about other installation methods from our docs.

VSCode Extension

Find Lama2 for VSCode at the VSCode Marketplace. The extension requires the l2 command available (usually at /usr/local/bin/l2).

Design Philosophy

  1. Delegate subtasks to open and mature tools:
    1. API Collaboration - git
    2. API Organization - OS file system + IDEs
    3. API Editing - VSCode/IDEs
    4. API Requests - HTTPie
  2. Start a language formalization effort from the beginning (learning from Markdown history)
  3. Keep language syntax simple
  4. Invest into good documentation
  5. Strive to keep components decoupled

Community and Support

  1. Full documentation @hexmos.com/lama2
  2. Report issues and propose improvements at Github issues
  3. Discuss with the community at Discord

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package `cmdexec` provides a facility to execute l2 commands, stream output to stdout, while also providing ability to retrieve the command output as a string.
Package `cmdexec` provides a facility to execute l2 commands, stream output to stdout, while also providing ability to retrieve the command output as a string.
Package `cmdgen` provides an API to generate API request commands (by default based on HTTPie) based on the parsed API file contents and the `l2` command invocation parameters
Package `cmdgen` provides an API to generate API request commands (by default based on HTTPie) based on the parsed API file contents and the `l2` command invocation parameters
Package controller coordinates all the other components in the `Lama2` project.
Package controller coordinates all the other components in the `Lama2` project.
Package `lama2cmd` provides CLI argument parsing facilities.
Package `lama2cmd` provides CLI argument parsing facilities.
Package `outputmanager` provides facilities for controlling the logging library as well as capabilities to post-process API execution results (such as store results as a JSON file)
Package `outputmanager` provides facilities for controlling the logging library as well as capabilities to post-process API execution results (such as store results as a JSON file)
The `parser` package provides primitives that help with writing recursive descent parsers.
The `parser` package provides primitives that help with writing recursive descent parsers.
Package preprocess provides facilities to expand environment variables in `.l2` API files and return the contents
Package preprocess provides facilities to expand environment variables in `.l2` API files and return the contents
Package `utils` provides useful functions for simplifying various programming tasks
Package `utils` provides useful functions for simplifying various programming tasks

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL