npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@moltium/cli

v0.1.34

Published

CLI tool for creating and managing Moltium autonomous agents

Readme

@moltium/cli

CLI tool for creating and managing Moltium autonomous AI agents.

Installation

npm install -g @moltium/cli

Quick Start

# Scaffold a new agent (interactive prompts)
moltium init my-agent

# Enter the project directory
cd my-agent

# Install dependencies
npm install

# Add your API keys to .env
# Edit .env with your ANTHROPIC_API_KEY or OPENAI_API_KEY

# Start the agent
npm start

Commands

moltium init [name]

Scaffold a new agent project with interactive prompts.

Prompts:

  • Agent name — directory name and config identifier
  • Agent type — free text (e.g. assistant, trader, moderator)
  • Configuration typecode (TypeScript) or markdown (natural language)
  • LLM provider — Anthropic (Claude) or OpenAI (GPT)
  • Social platforms — Moltbook, Twitter, both, or none
  • Deployment target — Railway, Render, AWS, DigitalOcean, Custom, or None

Code-based output:

my-agent/
  start.ts               # Agent entry point
  agent.config.ts        # Main configuration (TypeScript)
  actions/example.ts     # Starter custom action
  hooks/onInit.ts        # Initialization hook
  hooks/onTick.ts        # Autonomous loop hook
  hooks/onShutdown.ts    # Graceful shutdown hook
  package.json
  tsconfig.json
  .env

Markdown-based output:

my-agent/
  start.ts               # Agent entry point
  agent.md               # Main configuration (Markdown)
  skills/                # Skill definitions (.md files)
  personality/           # Bio and trait definitions
  prompts/system.md      # System prompt template
  memory/context.md      # Long-term context
  package.json
  .env

moltium start

Start the agent locally from the current directory.

moltium start                  # Default port 3000
moltium start --port 8080      # Custom port
moltium start --debug          # Enable debug logging
moltium start --env .env.local # Custom env file

The start command auto-detects whether you're using code-based or markdown-based configuration, loads all hooks/skills/personality files, and starts the Express server.

moltium deploy [platform]

Deploy your agent to a cloud platform.

moltium deploy railway       # Deploy to Railway
moltium deploy render        # Deploy to Render
moltium deploy aws           # Deploy to AWS (ECS/Fargate)
moltium deploy digitalocean  # Deploy to DigitalOcean App Platform
moltium deploy custom        # Deploy using custom config

Each platform has prerequisites (CLI tools, API keys). Run moltium deploy without arguments to see all available platforms.

Deployment configuration is read from deployment.config.ts in your project directory. This file is generated during moltium init if you select a deployment target.

moltium config show

Display the current agent configuration.

moltium config show       # Show parsed config
moltium config validate   # Validate config without starting

moltium migrate

Migrate between configuration types.

# Convert code config to markdown
moltium migrate --from code --to markdown

# Convert markdown config to code
moltium migrate --from markdown --to code

# Keep the original file (don't rename to .bak)
moltium migrate --from code --to markdown --keep

Migration preserves your agent's name, personality, social settings, behaviors, and memory config. Code-to-markdown generates skill files from your actions. Markdown-to-code generates hook stubs and a TypeScript config.

moltium status

Check if your agent is running.

moltium status                       # Check localhost:3000
moltium status --port 8080           # Check custom port
moltium status --remote https://my-agent.up.railway.app  # Check remote

Configuration Types

Code-Based (TypeScript)

For developers who want full type safety and maximum flexibility.

// agent.config.ts
import type { AgentConfig } from '@moltium/core';
import { myCustomAction } from './actions/my-action.js';

export default {
  name: 'my-agent',
  type: 'assistant',
  personality: {
    traits: ['helpful', 'curious'],
    bio: 'A helpful autonomous agent.',
  },
  llm: {
    provider: 'anthropic',
    model: 'claude-sonnet-4-20250514',
    apiKey: process.env.ANTHROPIC_API_KEY!,
  },
  social: {},
  behaviors: {
    autonomous: true,
    decisionMaking: 'llm-driven',
    actionsPerHour: 5,
  },
  memory: { type: 'memory' },
  actions: ['post_social_update'],
  customActions: [myCustomAction],
} satisfies AgentConfig;

Markdown-Based (Natural Language)

For non-developers who prefer simple, readable configuration.

# Agent Configuration

## Identity
name: my-agent
type: assistant
personality: helpful, curious

## Bio
A helpful autonomous agent that assists with daily tasks.

## Behaviors
autonomous: true
decision_making: llm-driven
actions_per_hour: 5

## Skills

### Respond to Messages
Handle incoming messages with helpful, concise responses.

### Post Updates
Share useful tips and insights with the community.

## Memory
type: memory
retention: 30 days

Skills in markdown are interpreted by the LLM at runtime — no code required.

Deployment Targets

| Platform | Method | Prerequisites | |----------|--------|---------------| | Railway | CLI | npm i -g @railway/cli + railway login | | Render | REST API | RENDER_API_KEY in .env | | AWS | ECS/Fargate | AWS CLI configured (aws configure) | | DigitalOcean | App Platform API | DO_API_TOKEN in .env | | Custom | Docker/SSH/CLI/API | Varies by method |

Custom Deployment

The custom deployer supports four methods. Configure in deployment.config.ts:

import type { DeploymentConfig } from '@moltium/core';

export default {
  platform: 'custom',
  customConfig: {
    deploymentMethod: 'docker', // 'docker' | 'ssh' | 'cli' | 'api'
    buildCommand: 'npm run build',
    startCommand: 'npm start',
    docker: {
      registry: 'docker.io',
      imageName: 'my-agent',
      hostUrl: 'localhost',
      containerPort: 3000,
      hostPort: 80,
    },
  },
} satisfies DeploymentConfig;

Environment Variables

Your .env file (generated by moltium init):

# LLM (at least one required)
ANTHROPIC_API_KEY=your-api-key-here
OPENAI_API_KEY=your-api-key-here

# Social (per enabled platform)
MOLTBOOK_API_KEY=your-moltbook-key
TWITTER_API_KEY=your-twitter-api-key
TWITTER_API_SECRET=your-twitter-api-secret
TWITTER_ACCESS_TOKEN=your-twitter-access-token
TWITTER_ACCESS_SECRET=your-twitter-access-secret

# Server
PORT=3000
LOG_LEVEL=info

Running Without Global Install

You can also use npx:

npx @moltium/cli init my-agent
npx @moltium/cli start
npx @moltium/cli deploy railway

License

MIT