Skip to content

jacamo-lang/jacamo-cli

Repository files navigation

Command Line Interface (CLI) for JaCaMo

The JaCaMo CLI is a command-line interface tool that you use to initialize, develop, and maintain JaCaMo applications directly from a command shell at design and run time.

New applications can be created with:

jacamo app create app1 --console
cd app1

This command creates an application identified by app1 with one agent, one artifact and one organisation.

├── app1.jcm           // JaCaMo project file
├── build.gradle
├── doc                // folder for documentation
├── log                // folder for log
├── logging.properties // log configuration
└── src
    ├── agt            // agent code
    │   └── sample_agent.asl
    ├── env            // environment code
    │   └── example
    │       └── Counter.java
    ├── org            // organisation code
    │   └── org.xml
    └── test           // test code

Then you execute the MAS with

jacamo app1.jcm

The output:

Agent mind inspector is running at http://127.0.0.1:3272
CArtAgO Http Server running on http://127.0.0.1:3273
Moise Http Server running on http://127.0.0.1:3271
[Moise] OrgBoard o created.
[Moise] group created: g1: group1 using artifact ora4mas.nopl.GroupBoard
[Cartago] Workspace w created.
[Cartago] artifact c1: example.Counter(3) at w created.
[bob] join workspace /main/o: done
[bob] join workspace /main/w: done
[bob] focusing on artifact c1 (at workspace /main/w) using namespace default
[bob] focus on c1: done
[bob] focusing on artifact g1 (at workspace /main/o) using namespace default
[bob] focus on g1: done
[bob] focusing on artifact o (at workspace /main/o) using namespace default
[bob] focus on o: done

[bob] hello world.

Another usual option is to create an uber jar that allows you to run the application with only java:

jacamo app create app2 --console
cd app2
jacamo app compile
java -jar build/libs/jacamo-app2-1.0-all.jar

Building

You can build this project from sources with

./gradlew createBin

About

Command Line Interface for JaCaMo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published