0.1.4 • Published 11 months ago

@juliaos/cli v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

JuliaOS CLI

A command-line interface for the JuliaOS framework, providing tools to create, manage, and deploy AI agents and components.

Ways to Use JuliaOS

1. As a CLI Tool User

For developers who want to use the CLI to create and manage AI agents:

# Install the CLI globally
npm install -g @juliaos/cli

# Initialize a new project
julia init my-project
cd my-project

# Set up environment variables
cp .env.example .env
# Edit .env with your configuration

# Create and deploy components
julia create agent my-agent
julia deploy my-agent

2. As a Module User

For developers who want to use JuliaOS modules in their code:

// Install required modules
npm install @juliaos/agents @juliaos/skills

// Using the agents module
import { Agent } from '@juliaos/agents';

const myAgent = new Agent({
    name: 'MyAgent',
    skills: ['reasoning', 'planning']
});

// Using the skills module
import { Skill } from '@juliaos/skills';

class MyCustomSkill extends Skill {
    async execute() {
        // Your skill implementation
    }
}

Available modules:

  • @juliaos/cli: Core CLI functionality
  • @juliaos/agents: Agent creation and management
  • @juliaos/skills: Skill development toolkit
  • @juliaos/connectors: Platform connectors

3. As a Framework Developer

For developers who want to contribute or modify the framework:

# Clone the repository
git clone https://github.com/Juliaoscode/JuliaOSframework.git
cd JuliaOSframework

# Install dependencies
npm install

# Set up environment variables
cp packages/cli/.env.example packages/cli/.env
# Edit .env with development configuration

# Build the CLI
npm run build

# Link it locally
npm link

Installation

npm install -g @juliaos/cli

Configuration

Environment Variables

  1. Copy the example environment file:
cp .env.example .env
  1. Update the .env file with your configuration:
# API Configuration
API_ENDPOINT=http://localhost:3000

# Component Registry
REGISTRY_URL=https://registry.example.com

# Deployment Settings
DEPLOY_ENVIRONMENT=development

Required environment variables:

  • API_ENDPOINT: Your JuliaOS API endpoint
  • REGISTRY_URL: URL of the component registry
  • DEPLOY_ENVIRONMENT: Deployment environment (development/staging/production)

Optional environment variables:

  • AUTH_TOKEN: Authentication token (if required)
  • DEPLOY_KEY: Deployment key for secure deployments
  • ANALYTICS_ENABLED: Enable/disable analytics
  • ANALYTICS_KEY: Analytics service key

Security Considerations

  1. Never commit your .env file
  2. Keep your authentication tokens secure
  3. Use different deployment keys for each environment
  4. Regularly rotate your security keys
  5. Follow the principle of least privilege when setting up permissions

Usage

Initialize a New Project

julia init

This will create a new JuliaOS project with the following structure:

my-julia-project/
├── src/
│   ├── agents/
│   ├── skills/
│   └── tests/
├── package.json
├── tsconfig.json
└── README.md

Create a New Component

julia create <type>

Available component types:

  • agent: Create a new AI agent
  • skill: Create a new agent skill
  • connector: Create a new platform connector

Deploy a Component

julia deploy <n> [options]

Options:

  • -e, --env <environment>: Deployment environment (default: "development")

Run Tests

julia test <n> [options]

Options:

  • -w, --watch: Watch mode for continuous testing

Marketplace Commands

julia marketplace <action> [options]

Actions:

  • list: List available components
  • install: Install a component
  • publish: Publish a component

Options:

  • -t, --type <type>: Filter by component type

Configuration Management

julia config <action> [options]

Actions:

  • list: List all configuration
  • get: Get a specific configuration value
  • set: Set a configuration value

Options:

  • -k, --key <key>: Configuration key
  • -v, --value <value>: Configuration value

Development

Prerequisites

  • Node.js (v14 or later)
  • npm (v6 or later)
  • TypeScript (v4 or later)

Setup

  1. Clone the repository:
git clone https://github.com/juliaos/framework.git
cd framework
  1. Install dependencies:
npm install
  1. Set up environment variables:
cp .env.example .env
# Edit .env with your development configuration
  1. Build the CLI:
npm run build
  1. Link the CLI locally:
npm link

Running Tests

npm test

Building

npm run build

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Security

When contributing, please:

  • Never commit sensitive information
  • Use environment variables for configuration
  • Follow security best practices
  • Report security vulnerabilities responsibly

License

This project is licensed under the MIT License - see the LICENSE file for details.

0.1.4

11 months ago

0.1.3

11 months ago

0.1.2

11 months ago

0.1.1

11 months ago

0.1.0

11 months ago