Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mongodb-axi

Agent-facing MongoDB operations AXI for discovering, creating, inspecting, querying, exporting, importing, maintaining, diagnosing, provisioning, and safely operating MongoDB and MongoDB Atlas through token-efficient CLI workflows.

The project follows the AXI creation guidelines installed with npx skills add kunchenguid/axi.

Goals

  • Show useful live MongoDB context with mongodb-axi, not help text.
  • Use compact TOON-style stdout for agent parsing.
  • Keep every command non-interactive.
  • Fail loudly on unknown flags before side effects.
  • Default to read-only discovery, inspection, query, planning, or dry-run behavior.
  • Require --execute for mutations.
  • Require --confirm <exact-value> for destructive operations.
  • Truncate long query, inspect, export, import, Atlas, and log output by default.
  • Redact MongoDB URIs, passwords, Atlas tokens, API keys, certificates, private keys, secret-like env vars, and secret-like document fields.

Usage

npm test
./bin/mongodb-axi.js
./bin/mongodb-axi.js doctor
./bin/mongodb-axi.js services
./bin/mongodb-axi.js discover
./bin/mongodb-axi.js recommend --goal inspect
./bin/mongodb-axi.js list --kind collections --database app
./bin/mongodb-axi.js inspect --kind collection --database app --collection users --name users
./bin/mongodb-axi.js query --database app --collection users --filter '{"active":true}'
./bin/mongodb-axi.js create --kind collection --database app --name users
./bin/mongodb-axi.js export --database app --collection users --file users.json --format json
./bin/mongodb-axi.js atlas create --kind cluster --name app-dev --project-id <id> --provider AWS --region US_EAST_1

Mutating operations are dry-run by default. Add --execute only after reviewing the generated JavaScript or command. Destructive operations also require --confirm <exact-value>.

MongoDB Domains

  • Connection: MongoDB URI, SRV records, auth database, TLS, certificates, env vars
  • Databases and collections: databases, collections, views, capped collections
  • Documents and querying: capped reads, explain plans, projections, filters, aggregation pipelines
  • Indexes: list, inspect, create, drop, index stats, rebuild guidance
  • Aggregation: safe read pipelines by default and guarded write stages
  • Users and security: users, roles, privileges, auth mechanisms, recursive redaction
  • Data movement: mongodump, mongorestore, mongoexport, mongoimport
  • Storage: database and collection sizes, collection stats, index sizes
  • Operations: current operations, slow operations, locks, server status
  • Maintenance: validate, compact, reindex planning, plan cache clearing, profiler controls
  • Performance: serverStatus, collStats, indexStats, currentOp, profiler hints
  • Local dev: Docker Compose MongoDB services, migrations, seeds, ODM configs
  • Atlas: projects, clusters, database users, access lists, readiness, guarded provisioning, guarded deletion

Atlas Guards

Atlas lifecycle operations use the official atlas CLI. They are dry-run by default, delete operations pass Atlas --force only after exact confirmation and --execute, and cluster creation enables termination protection unless --allow-atlas-delete-ready is passed.

Custom Targets

mongodb-axi.config.json can define project-specific targets:

{
  "targets": [
    {
      "id": "atlas-dev",
      "type": "custom-atlas",
      "detail": "development Atlas project workflow",
      "provider": "atlas",
      "projectId": "64f000000000000000000000"
    }
  ]
}

Hooks and Skill

Install ambient session context hooks after explicit opt-in:

mongodb-axi hooks install --agent all --scope project --execute

Generate or verify installable skill guidance:

mongodb-axi skill generate
mongodb-axi skill generate --check

AXI Catalog Entry

The upstream kunchenguid/axi community catalog entry should be:

  • AXI: mongodb-axi
  • Author: thatdudealso
  • Domain: MongoDB
  • Description: Discover, create, inspect, query, export, import, maintain, and diagnose MongoDB databases through safe token-efficient CLI workflows.
  • Link: https://github.com/thatdudealso/mongodb-axi

About

Agent-facing MongoDB operations AXI for safe token-efficient CLI workflows.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages