Catalog npm
PACKAGE EXPLORERView in registry

1panel-skill

npm

Comprehensive 1Panel API skill for AI agents - 580+ endpoints

1panelaiapi-clientdockerlinuxmcpserver-managementskill
Versions collected1
Direct dependencies2From release 1.0.0
Last observed20 Oct, 18:34 UTC

README

Current package documentation

1Panel Skill

npm version License: MIT

A comprehensive TypeScript skill for managing 1Panel servers through AI agents.

Features

  • TypeScript - Type-safe implementation
  • Modular Design - 38 organized API modules
  • Promise-based - Modern async/await API
  • Full API Coverage - 580+ 1Panel API endpoints
  • XPack Support - Professional version features included

Installation

npm install 1panel-skill

Quick Start

import { OnePanelClient } from '1panel-skill';

const client = new OnePanelClient({
  host: 'localhost',
  port: 8080,
  apiKey: 'your-api-key',
  protocol: 'http'
});

// List containers
const containers = await client.container.list();

// Create website
const website = await client.website.create({
  primaryDomain: 'example.com',
  type: 'deployment'
});

Configuration

Environment Variables

ONEPANEL_HOST=localhost      # 1Panel host
ONEPANEL_PORT=8080           # 1Panel port
ONEPANEL_API_KEY=xxx         # API key (required)
ONEPANEL_PROTOCOL=http       # http or https

Getting API Key

  1. Login to 1Panel web interface
  2. Go to Profile → API
  3. Generate or copy your API key

API Modules

Container & Docker

// List containers
const containers = await client.container.list();

// Create container
const container = await client.container.create({
  name: 'my-app',
  image: 'nginx:latest'
});

// Start/Stop/Restart
await client.container.start(container.id);
await client.container.stop(container.id);
await client.container.restart(container.id);

// Get logs
const logs = await client.container.getLogs(container.id, 100);

// Docker Compose
const composes = await client.compose.list();
await client.compose.create('my-app', dockerComposeContent);

// Images
const images = await client.image.list();
await client.image.pull('nginx:latest');

// Networks
const networks = await client.network.list();
await client.network.create('my-network');

// Volumes
const volumes = await client.volume.list();
await client.volume.create('my-volume');

Website Management

// List websites
const websites = await client.website.list();

// Create website
const website = await client.website.create({
  primaryDomain: 'example.com',
  type: 'deployment'
});

// Manage domains
await client.websiteDomain.create({
  websiteId: website.id,
  domain: 'www.example.com'
});

// SSL certificates
await client.websiteSSL.create({
  websiteId: website.id,
  type: 'auto'
});

// Renew SSL
await client.websiteSSL.renew(sslId);

Database Management

// MySQL
const databases = await client.databaseMysql.list();
await client.databaseMysql.create({
  name: 'mydb',
  username: 'dbuser',
  password: 'secure-password'
});

// PostgreSQL
await client.database.create('postgresql', {
  name: 'mydb',
  username: 'dbuser'
});

// Redis
const conf = await client.databaseRedis.getConf(redisId);
await client.databaseRedis.changePassword(redisId, 'new-password');

File Operations

// List files
const files = await client.file.list('/opt');

// Get file content
const content = await client.file.getContent('/opt/config.json');

// Save file
await client.file.save('/opt/config.json', fileContent);

// Compress
await client.file.compress({
  files: ['/opt/app1', '/opt/app2'],
  dst: '/opt/backups',
  name: 'backup.tar.gz',
  type: 'tar.gz'
});

// Decompress
await client.file.decompress({
  path: '/opt/backups/backup.tar.gz',
  dst: '/opt/restore',
  type: 'tar.gz'
});

// File permissions
await client.file.chmod({ path: '/opt/app', mode: '755' });
await client.file.chown({ path: '/opt/app', user: 'root', group: 'root' });

System Management

// System info
const info = await client.system.getInfo();

// Dashboard
const baseInfo = await client.dashboard.getBaseInfo();
const currentInfo = await client.dashboard.getCurrentInfo();

// Settings
const settings = await client.settings.getAll();
await client.settings.update({ key: 'value' });

// Monitor
const monitorData = await client.monitor.getData();
await client.monitor.updateStatus(true);

// Device
const deviceInfo = await client.device.getInfo();
await client.device.updateHostname('new-hostname');

Security

// Firewall
const rules = await client.firewall.listRules();
await client.firewall.createRule({
  protocol: 'tcp',
  port: '8080',
  strategy: 'accept'
});

// Fail2Ban
const status = await client.fail2ban.getStatus();
await client.fail2ban.updateStatus(true);
const bannedIPs = await client.fail2ban.getBannedIPs();

// SSH
const sshInfo = await client.ssh.getInfo();
await client.ssh.updateStatus(true);

Backup & Recovery

// Backups
const backups = await client.backup.list();
await client.backup.create({ name: 'daily-backup' });
await client.backup.restore(backupId);

// Snapshots
const snapshots = await client.snapshot.list();
await client.snapshot.create({ name: 'system-snapshot' });

// Recycle Bin
const items = await client.recycleBin.list();
await client.recycleBin.restore(itemId);

Applications

// App Store
const apps = await client.app.listStore();
const installed = await client.app.listInstalled();

// Install app
await client.app.install({
  key: 'wordpress',
  name: 'my-wordpress'
});

// Runtimes
const runtimes = await client.runtime.list();
await client.php.create({ version: '8.2' });
await client.node.create({ version: '18' });

XPack Features (Professional)

// OpenResty
const status = await client.openresty.getStatus();
await client.openresty.reload();

// GPU
const gpuInfo = await client.gpu.getInfo();

// AI Agent
const agents = await client.ai.list();
await client.ai.create({ name: 'my-agent' });

// MCP Server
const servers = await client.ai.listMCPServers();

// Ollama
const models = await client.ollama.listModels();
await client.ollama.pullModel('llama2');

Available Modules

Core Modules (38 total)

ModuleDescription
client.containerDocker container management
client.imageDocker image management
client.networkDocker network management
client.volumeDocker volume management
client.composeDocker Compose management
client.appApp Store management
client.runtimeRuntime environments
client.phpPHP management
client.nodeNode.js management
client.websiteWebsite management
client.websiteDomainDomain management
client.websiteSSLSSL certificate management
client.databaseGeneric database operations
client.databaseMysqlMySQL specific
client.databaseRedisRedis specific
client.fileFile system operations
client.recycleBinRecycle bin
client.systemSystem information
client.systemSettingSystem settings
client.dashboardDashboard data
client.settingsGlobal settings
client.logsSystem logs
client.monitorSystem monitor
client.deviceDevice management
client.backupBackup operations
client.backupAccountBackup account management
client.snapshotSystem snapshots
client.firewallFirewall management
client.fail2banFail2Ban management
client.sshSSH management
client.cronjobCronjob management
client.processProcess management
client.terminalTerminal sessions
client.taskTask management
client.diskDisk management
client.ftpFTP management
client.clamClamAV antivirus
client.hostRemote host management
client.sshKeySSH key management
client.openrestyOpenResty management
client.gpuGPU management
client.aiAI Agent management
client.ollamaOllama management

Error Handling

try {
  await client.container.create(config);
} catch (error) {
  if (error.message.includes('UNAUTHORIZED')) {
    console.error('Invalid API key');
  } else {
    console.error('API Error:', error.message);
  }
}

TypeScript Support

All modules include full TypeScript type definitions:

import { OnePanelClient, OnePanelConfig } from '1panel-skill';

const config: OnePanelConfig = {
  host: 'localhost',
  port: 8080,
  apiKey: 'your-api-key',
  protocol: 'http'
};

const client = new OnePanelClient(config);

API Coverage

CategoryModulesEndpoints
Container & Docker5~80
Applications4~60
Website3~50
Database3~40
File Management2~30
System7~100
Backup & Recovery3~40
Security3~50
Tools6~80
Host Management2~30
XPack Features4~40
Total38~580+

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.0Registry latest19 Mar 20262

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
eaveluo/1panel-skill

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:34 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:686f964d9d16987468c6d531866a2090073d5ad1ad451ab58657c8642d69124e