Repository navigation
Releases
v1.0.0
Overview
CaptainCore CLI 1.0 runs on SQLite and no longer needs an embedded WordPress. Through 0.13 the CLI kept every site, environment, account and provider record inside a private local WordPress install and reached them by shelling out to WP-CLI and a folder of PHP scripts, so standing up the CLI meant standing up PHP, WP-CLI and a throwaway WordPress site first. Version 1.0 stores all of that in a local SQLite database at ~/.captaincore/data/captaincore.db (GORM on the pure-Go glebarez/sqlite driver, so no cgo and no system SQLite), reads its settings through a native Go config package, and talks to the CaptainCore Manager over a plain Go HTTP client. The CaptainCore Manager plugin remains the source of truth the CLI syncs from; what went away is the local WordPress underneath the CLI.
Installation is now one static binary. curl -fsSL https://raw.githubusercontent.com/CaptainCore/captaincore/master/install.sh | bash puts it in place, captaincore connect points it at your Manager with a WordPress application password and pulls down every site, environment, account, domain and provider, and captaincore upgrade keeps it current from GitHub releases. The bash and remote scripts the CLI still uses at runtime ship embedded in the binary and unpack themselves on first run.
Along the way the CLI grew a full restic operations toolkit, fleet-wide version drift reporting, a git-backed quicksave malware scanner, long-term log archival, and 38 new remote scripts, most of them security detection.
Breaking Changes
- The private local WordPress install and WP-CLI are no longer read or supported. Data lives in
~/.captaincore/data/captaincore.db. Existing installs must runcaptaincore connect(or the one-timecaptaincore migrate wp-to-sqlite) before any data command works. Commands that need data exit withError: Database not available. Run 'captaincore connect'. captaincore monitor <site|target>is nowcaptaincore monitor run <site|target>, andcaptaincore capture <site|target>is nowcaptaincore capture generate <site|target>. Update cron entries.fetch-site-dataemitskey:valuepairs instead of positional lines. Anything parsing the old output breaks.- Backups now include WordPress core files. Every core-file exclusion (
wp-admin/,wp-includes/,index.php,wp-login.php,xmlrpc.phpand friends) was removed fromlib/excludesandlib/restic-excludes. Expect larger first backups after upgrading. - 45 of the 51 PHP scripts in
lib/local-scripts/were deleted and 57 files were removed fromapp/(thedns/,key/,cli/,get/andutils/trees,monitor,copy,configs,scan-errors,regenerate-thumbnails,manifest-generateand the*-generate/*-listvariants). Custom automation that called those files by path will break; the replacements are Cobra commands. - The
configs.phpconfig layer is retired.config.jsonis read and written by Go and rewritten with mode0600. Bash callers usecaptaincore config fetchinstead. - On a binary install the CLI owns
~/.captaincore/appand~/.captaincore/liband rewrites them whenever the binary version changes (stamped in.assets-version). Local edits there do not survive an upgrade. A git checkout at that path is detected and left alone. backup downloadtakes the payload as--payload=<token>(the third positional argument still works).
New Features
Install, connect, upgrade
install.sh. Detects Linux or macOS on x86_64, arm64 or armv7, downloads the release archive andchecksums.txt, verifies the sha256 and installs to/usr/local/bin(INSTALL_DIR,CAPTAINCORE_VERSION=vX.Y.Zand--forceare supported).captaincore connect [--url=] [--username=] [--password=] [--server-url=] [--skip-ssl]. Authenticates with a WordPress application password against/wp-json/captaincore/v1/cli/connect, upserts sites, environments, accounts, domains, junction rows, providers, configurations and defaults into SQLite, then writes the token, API URL, GUI URL and site list intoconfig.jsonand the token intodata/config.jsonforcaptaincore server.--server-urlregisters this server's public address with the Manager for job dispatch, so pairing both directions is one command and no wp-config constant is required (needs captaincore-manager newer than 1.1.0). A Manager still on plain permalinks is handled by falling back to the?rest_route=form, and a freshly connected Manager with zero sites counts as connected. A re-run shows an add/update/remove preview and asks before applying, then warns about a missingrclone,resticorgit.captaincore connect --syncdoes the same non-interactively for cron.captaincore upgrade [--check] [--yes] [--force] [--version=vX.Y.Z]. Follows the GitHubreleases/latestredirect (no API token), downloads the archive for this OS and CPU, verifies it against the release checksums, sanity-runs the new binary and swaps it in place, with asudo mvfallback.--checkexits 1 when behind. A source checkout is refused unless--force.- Embedded runtime scripts.
app/andlib/ship inside the binary (go:embed) and unpack into~/.captaincore/on the first run of each version.config.jsonanddata/are never touched. - Release builds for Linux and macOS on x86_64, arm64 and armv7 (
CGO_ENABLED=0, static), with stable asset names underreleases/latest/download/. captaincore migrate wp-to-sqlite [<site-id>...]. One-time backfill from a Manager for pre-1.0 installs.
Local data layer
- SQLite with GORM. Fourteen auto-migrated tables (
captaincore_sites,_environments,_accounts,_domains,_account_site,_account_domain,_account_user,_captures,_snapshots,_keys,_configurations,_recipes,_connections,_providers), plusdata/monitor_stats.dbfor monitor runs. Both database files are chmod0600. Tuned for parallel bulk runs: WAL journal,busy_timeout=30000,synchronous=NORMAL, one pooled connection so writes queue instead of racing, and a WAL checkpoint after bulk runs. - Native Go API client (
apiclient/) for every Manager call. captaincore config fetch [<section>] [<key>],config fetch-captain-ids,config from-api [--field=], andcaptaincore configuration get [--field=] [--bash]/configuration sync.captaincore cronprints the stored scheduled tasks as JSON.captaincore info [--json]. Version, platform, Manager and API URLs, and site, account, environment and domain counts.
Hosting providers
- Provider framework (
providers/) with a registry. Ships Kinsta (api_key,company_id) and GridPane (api_key), each able to list remote sites and enrich a site with SSH user, host, port, password, home directory, home URL, WordPress version and monthly visits. captaincore provider add <name> <slug> --credentials='[{"name":"api_key","value":"..."}]',provider list,provider update <id> [--credentials=] [--status=],provider delete <id>,provider sync,provider remote-sites <id>,provider import <id> [--site-ids=] [--account-id=] [--update-extras].captaincore connection add <domain> <domain-token> <captaincore-token>andconnection listfor CaptainCore-to-CaptainCore links.captaincore site ssh-refresh <site>pulls fresh SSH credentials from the provider;captaincore ssh-detect <user> <address> <port>andcaptaincore ssh-verify <conn>probe a connection.
Backups and restic operations (native Go)
- Direct backup mode is the default.
backup generatepipes thevaultscript plus a temporary secrets payload over SSH and the managed host runs restic straight to B2; the old pull-to-local flow survives only asbackup_mode="local". The remote run hands the snapshot list back inline, sobackup list-generateandbackup verifynever run restic locally. Flags:--parallel=3,--skip-db,--skip-remote,--skip-if-recent=24h,--dry-run. - Self-healing connections. When rclone cannot reach a site,
backup generateregenerates its rclone config, retries, then callssite ssh-refreshto pull fresh SSH credentials from the hosting provider. A brokenvault.txt(missing bucket) is detected and its keys regenerated. - Repository maintenance:
backup check <site> [--init] [--read-data],backup verify <site>,backup snapshots <site> [id] [--sizes] [--format=json],backup repo-info <site> [--stats],backup find <site> <pattern>,backup forget <site> <snapshot-id> [--confirm] [--prune],backup prune <site> [--dry-run] [--repack-uncompressed],backup repair <site> [--packs] [--snapshots] [--forget],backup unlock <site> [--remove-all]. - Restic v2 migration:
backup upgrade <site>andbackup migrate-v2 <site> [--force] [--skip-repack] [--skip-cache-cleanup]move repositories to the v2 format with compression. - Key safety:
backup key-backup <site> [--type=backup|quicksave]andbackup key-restore <site>guard against losing the B2 repository key. - Housekeeping:
backup cleanup <site> [--dry-run]removes localbackup/folders on remote-backup sites;backup storage-cleanup [--confirm]removes orphaned site folders from B2 (dry-run by default);backup show <site> <backup-id> <file-id>,backup runtime <site>,backup fetch-link. - Per-site PID locks.
backup generate,pruneandmigrate-v2take abackup.lockholding the PID (stale locks from dead processes are cleared silently) and pass--retry-lock 30mso concurrent runs wait or skip instead of colliding. Quicksaves use the samequicksave.lockmechanism.
Quicksaves
quicksave malware-scan <site|@target> [--full] [--format=json]runs the signature set inlib/malware-signatures.jsonover the git history;--fullruns Wordfence CLI across the whole quicksave directory.- **Remote fi...
v0.13.0
Changelog
315decf π FIX: Backup download
2a5a0fc π FIX: Captain ID
4198507 π FIX: Edge case
f9c1274 π FIX: Monitor cache purge
8d38bcb π FIX: SSH arguments
ff7fbe3 π FIX: Staging updates
76de2cb π FIX: Stat total
82b1372 π FIX: Stat totals
9924957 π FIX: Sync data after quicksave
67a95e7 π FIX: Typo
8dca7bc π FIX: Upload command
6bc9ef6 π IMPROVE: Account sync
1bdf1df π IMPROVE: Background jobs
89ad049 π IMPROVE: Backup commands
e861610 π IMPROVE: Backup list generate
c61c1c5 π IMPROVE: Deactivate
77de857 π IMPROVE: Fetch token
13e312b π IMPROVE: Generate if missing
34cfad9 π IMPROVE: Migrate
83b6a59 π IMPROVE: Quicksave
b851ddc π IMPROVE: Quicksave output
b8da7eb π IMPROVE: Quicksave performance
0bd51d6 π IMPROVE: Self references
bb6a2c1 π IMPROVE: Stat calculation
23926e8 π IMPROVE: Theme update
68a61cb π IMPROVE: Update script
d84a673 π IMPROVE: recipe command
ac666d3 π¦ NEW: Command backup list-missing
4ddcc04 π¦ NEW: Debug flag
41027a1 π¦ NEW: Version flag
433af89 π RELEASE: Version 0.13.0
v0.12.0
Changelog
40f34e8 π FIX: Backup command
eeed19e π FIX: CLI process tracking
9fc5df4 π FIX: Captain ID
7e93c2a π FIX: Deploy to production
1f1de09 π FIX: Deploy to production
daca9da π FIX: File restore
10aa2d7 π FIX: File rollback
bb2af74 π FIX: Prevent backup from running in bulk
5e21369 π FIX: Quicksave
31d7f44 π FIX: Show changes
18be521 π FIX: Stacked site wp-content
60d1ff2 π FIX: Stats generate
49a6297 π FIX: Typo
2f5fbc8 π FIX: Upload with SSH keys
8de9a1f π FIX: WP Engine support
519e2ca π IMPROVE: Adjust bulk
4eee03d π IMPROVE: Bulk handling
3c5da3c π IMPROVE: Bulk selection
2f11867 π IMPROVE: Bulk support
129499a π IMPROVE: Bulk targeting
c311d64 π IMPROVE: Code format
3d1503f π IMPROVE: Compatibility
92f21a4 π IMPROVE: Configuration sync
628ddf5 π IMPROVE: Database selection
98a10d7 π IMPROVE: Deploy to staging with snapshots
151bf23 π IMPROVE: File handling
36cd886 π IMPROVE: Final snapshot
ec943de π IMPROVE: Handle non WordPress sites
8fc8c15 π IMPROVE: Improve sync data
9beba7f π IMPROVE: Lower cache time
0cf2e6c π IMPROVE: Plugin updates
430068f π IMPROVE: Prepare
9db1339 π IMPROVE: Running processes tracking
4bf23e9 π IMPROVE: SSH error handling
18b16c4 π IMPROVE: SSH key selection
40f8e7a π IMPROVE: SSH script logic
973fa97 π IMPROVE: Site add and delete
e2bca53 π IMPROVE: Site selection
d19b62c π IMPROVE: Site selection
79b5edd π IMPROVE: Snapshots and deployments
bd7fcf2 π IMPROVE: Support default key
9d22c65 π IMPROVE: Tracking commands
8b2e91a π IMPROVE: Update command
183483f π DOC: Update license
453ab90 π¦ NEW: Command account delete
23783e7 π¦ NEW: Command configuration get
2043303 π¦ NEW: Command configuration-sync
4682977 π¦ NEW: Fathom tracker.js
825b540 π¦ NEW: Go CLI
a88453c π¦ NEW: GoReleaser
b95e310 π¦ NEW: SSH fail command
e2cdd10 π¦ NEW: Seperate API for stats
4a4d40d π¦ NEW: iThemes Security compatibility
9b70e75 π RELEASE: Version 0.12.0