"The best way to predict the future is to build it. The fastest way to build it is with Cortex." -> Modern Founder Proverb
Demo Video π
(See Cortex in action: From an empty terminal to a 7-page populated Notion ecosystem with dual databases!)
The Problem: The "Organization Tax" π
Every founder knows the feeling: You have a killer idea at 2 AM, but the thought of manually creating a Notion page, a roadmap, a competitor analysis, and a task list kills the motivation.
You spend 4 hours organizing and 0 hours building. π€―
How Cortex Works
Cortex isn't just a "wrapper." Itβs a sophisticated orchestration of two cutting-edge technologies:
1. Resilient Multi-Model Architecture
Cortex uses a sophisticated hybrid AI stack to ensure maximum uptime even under heavy rate limits:
- Google Gemini Array (Primary): We cycle through 5 different Gemini versions (3.1 Pro, 3 Flash, 2.5 Flash, etc.) in a single session. This auto-scaling ensures that if one free-tier quota is hit, the CLI intelligently pivots to the next model instantly.
- OpenAI GPT-4.1 (Fail-Safe): A high-reasoning fallback for complex competitive logic if all Gemini models reach their daily limits.
2. The Notion MCP (Model Context Protocol)
This is the secret sauce. πͺ
Cortex uses @modelcontextprotocol/sdk/client to manage a live stdio transport connection with the Notion MCP server. This means the AI isn't just "writing text"βit's executing high-level tools via the same protocol used by tools like Claude Desktop and Cursor.
Cortex CLI - Available Commands:
notion login - Authorize your Notion workspace
ai login - Set your OpenAI or Gemini API key
build: [topic] - Build a full 6-page startup workspace
idea: [topic] - Save a quick startup concept page
research: [topic]- Generate a deep market analysis report
brainstorm: [msg]- Generate 20 fresh project ideas
tasks: [project] - Inject 10 MVP tasks into an existing page
stories: [topic] - Generate persona-driven user stories
investor: [topic]- Draft pitch deck points and "Why Now?" insights
status - See recent Notion pages and connection info
help - Show this menu
exit - Shutdown the CLI
How it works under the hood:
// 1. Spawn the Notion MCP server as a subprocess
const transport = new StdioClientTransport({
command: 'npx',
args: ['@notionhq/notion-mcp-server'],
env: {
OPENAPI_MCP_HEADERS: JSON.stringify({
Authorization: `Bearer ${token}`,
'Notion-Version': '2022-06-28',
}),
},
});
const client = new Client(
{ name: 'notion-cortex', version: '1.0.0' },
{ capabilities: {} },
);
try {
await client.connect(transport);
} catch (error: any) {
throw new Error(`Notion Connector Failed: ${error.message}. Please check your internet or if "npx" is available.`);
}
// 2. Write to Notion via MCP tool calls, NOT a direct REST API
await client.callTool({
name: "API-post-page",
arguments: {
parent: { workspace: true },
properties: { title: { title: [{ text: { content: "New Startup" } }] } }
}
});
Cortex changes that. It's a state-of-the-art CLI agent that turns your raw startup concept into a structured, modular empire in Notion.
π Key Features: Not Just Text, but Structure!
Cortex doesn't just "dump text"βit crafts a professional workspace using Native Notion Blocks:
1. π‘ Premium Strategy Briefs (idea:)
The idea: command generates a high-end strategy document using:
- Callouts: For the "Summary" and key takeaways.
- Quotes: Indented blocks for "Moats" and competitive edges.
- Structured Headings: Professional sections (Problem, Solution, Moat).
2. π Jira-Style Roadmap (tasks:)
Generates a Native Notion Database with:
- Status: (
To Do,In Progress,Done). - Priority: AI-calculated (
High,Medium,Low). - Timeline: AI-assigned Deadlines using native Notion Date properties.
3. π User Persona Stories (stories:)
Creates a User Story Database mapping Personas to Actions and Business Value. Perfect for aligning your product and engineering teams.
4. ποΈ Full-Stack Startup Build (build:)
The flagship command. Launches an entire Enterprise Workspace including BOTH databases (Roadmap + Stories) and all 5 strategy pages in one unified hierarchy.
π Full Demo Walkthrough
Step 1: Initialize your Brain
cortex > notion login (Automatically handles the redirect sync)
cortex > ai login (Choose Google Gemini for ultra-fast, free-tier generation)
Step 2: Launch "CEO Mode"
cortex > build: Hyperlocal Green Hydrogen Micro-Grids
Watch the magic happen:
- β Root workspace established.
- π‘ Core Concept: Drafts your unique value proposition.
- π Market Analysis: Estimates market size and trends.
- βοΈ Competitor Landscape: Maps the gaps where you can win.
- β¨ Product Roadmap: Lays out your MVP timeline.
- π Roadmap Database: Populates 10 Jira-style tickets with status and deadlines.
- π Story Database: Maps 10 user stories for your core personas.
ποΈ Technical Deep Dive
- Built with: Node.js, TypeScript, ESM.
-
Bundler:
tsup(Compiles everything into a tiny 20KB binary). -
Markdown-to-Notion Parser: We built a custom "Rich Text Transformer" to convert
###headers,>quotes,[!]callouts, and**bold**into native Notion objects on-the-fly.
π¦ Installation
# Manual Setup (Developer Mode)
git clone https://github.com/RamanSharma100/cortex-notion.git
cd cortex-notion
npm install
npm run build
npm link
π§ββοΈ Final Thoughts
βWhy did the startup founder cross the road?β
βTo find a more sustainable way to disrupt the other side.β π π
Seriously, the goal of Cortex is to eliminate the "organization tax" of starting something new. Stop clicking, start building.
π Links
- GitHub: https://github.com/RamanSharma100/cortex-notion
- Marketplace: COMING SOON after some enhancements and upgrades
Top comments (0)