0.1.4 • Published 11 months ago
@juliaos/cli v0.1.4
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-agent2. 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 linkInstallation
npm install -g @juliaos/cliConfiguration
Environment Variables
- Copy the example environment file:
cp .env.example .env- Update the
.envfile with your configuration:
# API Configuration
API_ENDPOINT=http://localhost:3000
# Component Registry
REGISTRY_URL=https://registry.example.com
# Deployment Settings
DEPLOY_ENVIRONMENT=developmentRequired environment variables:
API_ENDPOINT: Your JuliaOS API endpointREGISTRY_URL: URL of the component registryDEPLOY_ENVIRONMENT: Deployment environment (development/staging/production)
Optional environment variables:
AUTH_TOKEN: Authentication token (if required)DEPLOY_KEY: Deployment key for secure deploymentsANALYTICS_ENABLED: Enable/disable analyticsANALYTICS_KEY: Analytics service key
Security Considerations
- Never commit your
.envfile - Keep your authentication tokens secure
- Use different deployment keys for each environment
- Regularly rotate your security keys
- Follow the principle of least privilege when setting up permissions
Usage
Initialize a New Project
julia initThis will create a new JuliaOS project with the following structure:
my-julia-project/
├── src/
│ ├── agents/
│ ├── skills/
│ └── tests/
├── package.json
├── tsconfig.json
└── README.mdCreate a New Component
julia create <type>Available component types:
agent: Create a new AI agentskill: Create a new agent skillconnector: 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 componentsinstall: Install a componentpublish: Publish a component
Options:
-t, --type <type>: Filter by component type
Configuration Management
julia config <action> [options]Actions:
list: List all configurationget: Get a specific configuration valueset: 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
- Clone the repository:
git clone https://github.com/juliaos/framework.git
cd framework- Install dependencies:
npm install- Set up environment variables:
cp .env.example .env
# Edit .env with your development configuration- Build the CLI:
npm run build- Link the CLI locally:
npm linkRunning Tests
npm testBuilding
npm run buildContributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - 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.