Create Application
The EigenX CLI provides templates for creating EigenCompute application projects with all required configuration files. Create applications using the templates to:
- Start building immediately with working examples for quick prototyping.
- Understand TEE patterns through template code.
- Follow best practices for deployment by using template code.
Templates are available in:
- Typescript
- Python
- Go
- Rust.
The EigenX CLI works with existing Docker projects and images. If you are working with an existing project or image, skip this step and refer to deploying an application for next steps.
Create an application from a template
To create an Typescript application:
eigenx app create my-trading-bot typescript
Output:
Cloning template: https://github.com/Layr-Labs/eigenx-templates → extracting templates/minimal/typescript
[====================] 100% eigenx-templates (Cloning from ref: main)
Template extraction complete: templates/minimal/typescript
The project files and structure are created:
my-trading-bot/
├── src/ # Application source code
├── Dockerfile # Pre-configured for TEE deployment
├── .env.example # Example environment variables
├── .gitignore # Git ignore file
├── package.json # Dependencies (TypeScript/Node.js)
├── tsconfig.json # TypeScript config (TypeScript)
└── README.md # Project documentation
Update template files for your application
Templates include:
-
TEE-Ready Dockerfile. Pre-configured to:
- Target
linux/amd64architecture. - Run as root user (required for TEE).
- Include necessary system dependencies.
- Target
-
Environment Variable Handling. Access to:
MNEMONIC- Auto-generated wallet mnemonic.- Custom environment variables from
.env.
-
Example Code. Demonstrates:
- Accessing the TEE mnemonic.
- Creating wallet accounts.
- Making onchain transactions.
- Environment variable usage.
-
Development Setup. Includes:
- Local development instructions.
- Testing guidelines.
- Deployment best practices.
Name application
Use the --name option for eigenx deploy to configure a name when deploying an application. Or use
eigenx profile set to set or update a name for a previously deployed application.
Configuring an application display name provides the following benefits:
- Displayed on Verifiability Dashboard for Mainnet or Sepolia testnet.
- Easier to remember - Use descriptive names instead of IDs
- Better organization - Distinguish between multiple apps
- Simplified commands - Type less when managing apps
- Team collaboration - Share meaningful app names with team members
Use cases include:
- Multiple environments -
api-dev,api-staging,api-prod - Multiple apps -
trading-bot,monitoring-service,data-processor - Version tracking -
api-v1,api-v2 - Team clarity - Meaningful names for team members
Naming Best Practices
Good names:
production-apistaging-web-appdiscord-bot-v2ml-inference-service
Avoid:
- Generic names:
app1,test,new - Special characters:
my@app,app#123 - Spaces:
my app(use hyphens:my-app)