Skip to content

ArcadeAI/cli-agent-template

Repository files navigation

Arcade CLI Agent Template

Prerequisites

This Repo

To install dependencies:

bun install

Then, set up the environment variables you will need:

cp .env.example .env
# fill it out with your information!

To run:

./agent.ts

To Compile as a single-file executable

bun build ./agent.ts --compile --outfile agent

Now you can run the program with ./agent (no .ts) directly.

This project was created using bun init in bun v1.2.9. Bun is a fast all-in-one JavaScript runtime.

Notes

  • Why Bun and TS?: This is a template project for engineers. JS is the most popular programming language, and type-safety is helpful in IDEs when learning. Bun is a bit of a wildcard, because it's new and less popular than node.js, but it solves all of the TS/compiler problems... which I think will make it easier for folks to get started on the demo. Bun also makes it really easy to package and distribute binaries of applications.

Testing

bun test

Testing Notes:

  • We mock all OpenAI API calls, so an API Key is not needed.