[go: up one dir, main page]

Skip to content

HexmosTech/Lama2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lama2: Free, Lightweight & Collaborative API Client

Note The frontend part of the Lama2 project lives in Lama2Code. The extension tends to be updated along with the Lama2 core in this repo.

The Problem

Most engineering teams have trouble collaborating on APIs or end up paying too much for Postman/Insomnia. Our 100% FOSS product Lama2 helps your team collaborate on APIs for free based on git, so that you can save money and avoid friction.

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 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. Code generation: Convert l2 API definitions into your preferred language/library, be it Python, Javascript, Java or many other options.
  7. Powerful chaining: Chain multiple l2 requests through embedded Javascript blocks
  8. Documentation: Explore examples, how-tos, explanations, references, FAQ/RAQs, and diagrams. Documentation is a priority, so that you never have to get lost.
  9. 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)

💡 Coming from Postman? Let Lama2 help you convert Postman data dumps into a nice Plain-Text Lama2 repo.

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://hexmos.com/lama2/install.sh | bash -s

For Windows systems, run the following command on powershell as an Administrator to either install or update Lama2:

choco install lama2 --version=1.0.0 --force -y

Learn more about other installation methods from our docs.

(Optional) Import your collections from Postman

Follow guide to import your existing Postman collections into a Plain-Text Lama2 repository.

Self update

An easier way to update the binary for Linux/MacOS to latest release is through:

l2 -u

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

Lama2 takes inspiration from Markdown. Think of our approach as Markdown for APIs.

In particular, we strive to:

  1. Delegate subtasks to mature and preferably open tools:
    1. API Collaboration - git
    2. API Organization - OS file system + IDEs
    3. API Editing - VSCode/IDEs
    4. API Requests - HTTPie (httpie-go, to be specific)
    5. Request Chaining - Embedded Javascript
  2. Start a language formalization effort from the beginning (learning from Markdown history)
  3. Keep language syntax simple
  4. Invest into good documentation; however, ensure users can perform competently without referencing documentation as much as possible.
  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 and Github Discussions

Acknowledgements

  1. The excellent VSCode ecosystem helping us develop our VSCode extension
  2. httpie-go: A golang version of httpie which we have forked and integrated with Lama2. Source
  3. httpsnippet: A HAR Request to multi-language converter; we use a custom fork of httpsnippet for code generation from l2 files.
  4. goja: A pure golang based JS interpreter with great, correct implementation of ECMA5. We use goja for JS processor blocks in multi-stage API files.