orbitalmcp-cli
v1.0.4
Published
CLI tool for syncing codebases with OrbitalMCP
Downloads
512
Maintainers
Readme
OrbitalMCP CLI
Command-line tool for syncing your codebase with OrbitalMCP - the headless RAG service for AI agents.
Installation
npm install -g orbitalmcp-cliOr use npx:
npx orbitalmcp-cli initQuick Start
1. Initialize in your project
cd your-project
orbitalmcp initThis will:
- Ask for your API key (get one from https://www.orbitalmcp.com/dashboard)
- Let you select or create a project
- Create a
.orbitalmcp.jsonconfiguration file
2. Sync your codebase
orbitalmcp syncThis uploads your code files to OrbitalMCP, where they're chunked and embedded for semantic search.
3. Query your knowledge base
orbitalmcp query "How does authentication work?"Commands
orbitalmcp init
Initialize OrbitalMCP in the current directory.
orbitalmcp init [options]
Options:
-k, --api-key <key> Your OrbitalMCP API key
-p, --project <id> Project ID to sync with
-u, --url <url> API URL (default: https://www.orbitalmcp.com)orbitalmcp sync
Sync your codebase with OrbitalMCP.
orbitalmcp sync [options]
Options:
-c, --clear Clear existing documents before syncing
-d, --dry-run Show what would be synced without uploadingorbitalmcp query <question>
Query your project's knowledge base.
orbitalmcp query "your question" [options]
Options:
-l, --limit <number> Maximum results (default: 5)orbitalmcp projects
List and manage your projects.
orbitalmcp projects [options]
Options:
-c, --create <name> Create a new project
-d, --delete <id> Delete a projectConfiguration
The .orbitalmcp.json file stores your configuration:
{
"apiKey": "orbital_xxx...",
"projectId": "uuid-of-your-project",
"apiUrl": "https://www.orbitalmcp.com",
"include": [
"**/*.ts",
"**/*.tsx",
"**/*.js",
"**/*.jsx",
"**/*.py",
"**/*.md"
],
"exclude": [
"**/node_modules/**",
"**/dist/**",
"**/.git/**"
]
}Include/Exclude Patterns
include: Glob patterns for files to sync (default: common code files)exclude: Glob patterns for files to ignore (default: node_modules, dist, .git, etc.)
The CLI also respects your .gitignore file.
Security
⚠️ Important: Add .orbitalmcp.json to your .gitignore as it contains your API key.
echo ".orbitalmcp.json" >> .gitignoreExamples
Sync a TypeScript project
cd my-typescript-app
orbitalmcp init
orbitalmcp syncQuery with more results
orbitalmcp query "How do I handle errors?" --limit 10Create a new project
orbitalmcp projects --create "My New Project"Clear and re-sync
orbitalmcp sync --clearPreview what would be synced
orbitalmcp sync --dry-runUsing with AI Agents
Once your codebase is synced, AI agents can query it via:
- REST API:
POST /v1/projects/{projectId}/query - MCP Protocol: Connect via SSE at
/sse?project={projectId}
See the OrbitalMCP documentation for more details.
