maxmark
v1.2.0
Published
Official Maxmark Host CLI — Deploy Next.js, PHP, WordPress, Python, and static websites directly to cloud cPanel hosting
Maintainers
Readme
Maxmark CLI (maxmark)
The official command-line interface for Maxmark Host — Deploy PHP, WordPress, Python, Next.js, and static websites directly to managed cPanel cloud hosting in seconds.
Features
- Direct cPanel Deployment: Push local code directly to your cPanel hosting directory without opening cPanel File Manager or configuring complex FTP clients.
- Fast Packaging: Automatically packages your build output or directory into an optimized deployment archive with intelligent ignore rules (
.gitignore,.git,node_modules,.env). - Database Management & Push: Inspect live connection details, synchronize
DATABASE_URLdirectly into your local.env, rotate passwords, and push SQL schema/migration files in 1 command. - Instant Rollbacks: Every upload creates an immutable server-side snapshot. Revert any faulty deployment with a single command.
- Project Linking: Link local workspace folders to your Maxmark site IDs with
.maxmark.json. - Zero Configuration: Works seamlessly with static HTML, PHP, Next.js/Vite builds (
dist,out,build), Python WSGI apps, and WordPress themes.
Installation
Option 1: Install Globally via npm
npm install -g maxmarkOption 2: Run On-The-Fly with npx (No install needed)
npx maxmark deployQuickstart
1. Authenticate
Generate a Personal Access Token (PAT) from your Maxmark Dashboard → Profile → Personal Access Tokens:
maxmark loginPaste your token (e.g., mm_pat_...) when prompted.
Verify your session:
maxmark whoami2. Link your local project
In your project directory, list your sites or link directly:
# List your sites and their IDs
maxmark sites
# Link directory to a specific site ID
maxmark link <siteId>(This writes a lightweight .maxmark.json file to your directory).
3. Database Sync & Schema Push
Configure and connect your database effortlessly:
# View database credentials, host, and remote access status
maxmark db info
# Automatically pull DATABASE_URL into your local .env file
maxmark db env
# Push a local SQL schema or migration file directly to your database
maxmark db push ./schema.sql4. Deploy
Deploy your local files or build output directly to cPanel:
# Deploy current directory
maxmark deploy
# Deploy a specific build output folder (e.g. dist, out, build)
maxmark deploy --dir dist --message "Production release"Command Reference
| Command | Description |
| :--- | :--- |
| maxmark login | Authenticate using a Personal Access Token (PAT) |
| maxmark whoami | View currently authenticated account & token details |
| maxmark logout | Clear saved credentials from local storage |
| maxmark sites | List your sites with their domain, site ID, type, and status |
| maxmark link [siteId] | Link current workspace directory to a Maxmark site |
| maxmark deploy [options] | Archive and deploy local project files to cPanel |
| maxmark history [options] | View past deployment snapshots with status and timestamps |
| maxmark rollback [deployId] | Restore a previous deployment snapshot |
| maxmark logs [options] | Inspect recent deployment events and execution logs |
| maxmark env <subcommand> | Manage environment variables (ls, set, unset, pull) |
| maxmark db <subcommand> | Database operations (info, env, password, push) |
| maxmark open [options] | Open live site or web console dashboard in browser |
| maxmark domains [options] | View assigned domains, DNS status & SSL certificates |
| maxmark help | Show help and usage instructions |
Global Options
--token <pat>: Pass token inline (ideal for CI/CD runners).--site <siteId>: Override the site ID without.maxmark.json.--dir <path>: Directory path to deploy (default:.).--message <text>: Description or commit summary for deployment history.--api-url <url>: Override the API endpoint URL.
Database Management (maxmark db)
Maxmark automatically provisions a MariaDB/MySQL database for your site and configures remote port 3306 SSL access.
1. Synchronize to .env for Prisma / Drizzle / TypeORM
# Pull live credentials directly into your project's .env file:
maxmark db env
# Now run your favorite ORM migrations without copying credentials:
npx prisma db push
# or
npx drizzle-kit push2. Push SQL Schema & Migrations
# Upload and execute a SQL file directly against your remote database:
maxmark db push ./database/schema.sql3. Reset or Set Database Password
# Generate a new secure password and sync it across cPanel and local .env:
maxmark db password
# Or specify a custom password:
maxmark db password --password "MySecretPass_2026!"CI/CD Pipeline Integration (GitHub Actions)
Deploy automatically on every Git push to main using GitHub Actions:
name: Deploy to Maxmark Host
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Dependencies & Build
run: |
npm ci
npm run build
- name: Deploy to Maxmark Host
env:
MAXMARK_TOKEN: ${{ secrets.MAXMARK_TOKEN }}
run: |
npx maxmark deploy --dir dist --site YOUR_SITE_ID --token $MAXMARK_TOKEN --message "GitHub Actions Build $GITHUB_SHA"Configuration (.maxmark.json)
When you run maxmark link, a .maxmark.json file is generated:
{
"siteId": "00000000-0000-0000-0000-000000000000",
"name": "my-awesome-site"
}Add .maxmark.json to your repository so your teammates or CI runners automatically know which site to deploy to.
Security & Privacy
- Personal Access Tokens (
mm_pat_...) are hashed using cryptographic SHA-256 before storage in our PostgreSQL database. - Deployments travel over TLS/HTTPS directly to your hosting node.
- Sensitive files (
.env,.git,node_modules,.DS_Store) are excluded from archive creation by default.
Publishing to npm (Maintainers)
To publish a new version of the Maxmark CLI to the npm registry:
- Log into your npm account:
npm login - Ensure tests pass and the bundle builds:
npm test cd cli && npm run build - Publish to npm:
npm publish --access public
Resources
- Website: https://maxmark.com.ng
- Documentation: https://maxmark.com.ng/docs
- System Status: https://maxmark.com.ng/status
- Support: [email protected]
