MCP cover image
See in Github
2025-04-14

Markdown AI - Verwenden Sie LLMs über eine Markdown -Datei mit Ihrem bevorzugten Editor

1

Github Watches

0

Github Forks

1

Github Stars

‼️ This is still work in progress

TODO:

  • Allow picking a model via CLI flag
  • Enable / Disable tools via flags

Markdown AI

A command-line tool and library for working with AI using markdown in your own $EDITOR.

Features

  • CLI or Library - Library allows you to provide a custom model and custom tools.
  • The entire Chat is Markdown, including tool calls.
  • Opens your $EDITOR for editing the chat - you can edit everything with your preferred editor.
  • Tool calling.
  • Custom system prompt.
  • Streams responses from AI models to the console while they are generated.

How does this work?

At the core the chat is serialized into markdown after each AI invocation. You can read and edit the markdown and it will be parsed into messages before sent to the AI.

Example:

## User

call the tool for me

## Assistant

will do!

\`\`\`tool-call
{
  "toolCallId": "1234",
  "toolName": "myTool",
  "args": {
    "msg": "hello tool"
  }
}
\`\`\`

## Tool


\`\`\`tool-result
{
  "toolCallId": "1234",
  "toolName": "myTool",
  "result": {
    "response": "hello agent"
  }
}
\`\`\`

Will be parsed into

import type { CoreMessage } from "ai";

let messages: Array<CoreMessage> = [
  {
    role: "user",
    content: "call the tool for me",
  },
  {
    role: "assistant",
    content: [
      { type: "text", text: "will do!\n" },
      {
        type: "tool-call",
        toolCallId: "1234",
        toolName: "myTool",
        args: { msg: "hello tool" },
      },
    ],
  },
  {
    role: "tool",
    content: [
      {
        type: "tool-result",
        toolCallId: "1234",
        toolName: "myTool",
        result: { response: "hello agent" },
      },
    ],
  },
];

Command-line Usage

export GOOGLE_GENERATIVE_AI_API_KEY=blablabla # uses gemini-2.0-pro-exp-02-05 by default
export EDITOR="hx +99999" # defaults to vi
# or
export EDITOR="code --wait"

node lib/cli.js chat.md --system=system.md --max-steps=5

Library Usage

The package can also be used as a library in your own script. By using MarkdownAI this way, you can provide your own tools and model:

import { MarkdownAI, tools } from "md-ai";

const chat = new MarkdownAI({
  path: "./my-chat.md",
  editor: "code --wait",
  ai: {
    // these are forwarded to the "ai" `steamText` call
    model: google("gemini-2.0-pro-exp-02-05"), // Example model, align with CLI default
    system: "You are a helpful assistant.",
    maxSteps: 5,
    tools: {
      readFiles: tools.createReadFilesTool(),
      listFiles: tools.createListFilesTool(),
      writeFiles: tools.createWriteFilesTool(),
      // your custom tools
    },
  },
});

await chat.run();

Why does this exist?

My opinions:

  • LLM Chat Editing experience is bad
  • Editing experience in my editor is good
  • LLMs respond in markdown anyway
  • Markdown in editors comes with syntax highlighting for free
  • Lives on my machine, uses my API keys, can use my tools

License

MIT

相关推荐

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

  • Aurity Ltd
  • Create and Publish Business Websites in seconds. AI will gather all the details about your website and generate link to your website.

  • Convincible Ltd
  • You're in a stone cell – can you get out? A classic choose-your-adventure interactive fiction game, based on a meticulously-crafted playbook. With a medieval fantasy setting, infinite choices and outcomes, and dice!

  • John Rafferty
  • Text your favorite pet, after answering 10 questions about their everyday lives!

  • Ian O'Connell
  • Provide players' names or enter Quickstart to start the game!

  • analogchat.com
  • Efficient Spotify assistant for personalized music data.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的 llm 资料总结(数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Zusammenfassung der weltbesten LLM -Ressourcen.

  • langgenius
  • alibaba
  • av
  • Führen Sie mühelos LLM -Backends, APIs, Frontends und Dienste mit einem Befehl aus.

  • 1Panel-dev
  • 🔥 1Panel bietet eine intuitive Weboberfläche und einen MCP -Server, um Websites, Dateien, Container, Datenbanken und LLMs auf einem Linux -Server zu verwalten.

  • Byaidu
  • PDF wissenschaftliche Papierübersetzung mit erhaltenen Formaten - 基于 ai 完整保留排版的 pdf 文档全文双语翻译 , 支持 支持 支持 支持 google/deeptl/ollama/openai 等服务 提供 cli/gui/mcp/docker/zotero

  • microsoft
  • Python tool for converting files and office documents to Markdown.

  • mindsdb
  • AI's query engine - Platform for building AI that can answer questions over large scale federated data. - The only MCP Server you'll ever need

  • caio-moliveira
  • Dieses Projekt wurde erstellt, um zu demonstrieren, wie wir uns mit verschiedenen Modellkontextprotokollen (MCPs) verbinden können.

  • rulego
  • ⛓️Rugele ist ein leichter, leistungsstarker, leistungsstarker, eingebetteter Komponenten-Orchestrierungsregel-Motor-Rahmen für GO.

  • AstrBotDevs
  • ✨ 易上手的多平台 llm 聊天机器人及开发框架 ✨ 平台支持 qq 、 qq 频道、 Telegramm 、微信、企微、飞书 | MCP 服务器、 Openai 、 Deepseek 、 Gemini 、硅基流动、月之暗面、 ullama 、 Oneapi 、 Diffy 等。附带 Webui。

  • WangRongsheng
  • Reviews

    3 (13)
    Avatar
    user_yDxfHNiv
    2025-04-26

    I've been using md-ai for a while now and I must say, the experience has been remarkable. Created by ccssmnn, this tool is incredibly user-friendly and efficient. It seamlessly integrates with my workflow and has significantly improved my productivity. I highly recommend md-ai to anyone looking for a reliable AI solution.

    Avatar
    user_Be6oL5Lx
    2025-04-26

    I've been using md-ai from ccssmnn, and it's a fantastic tool for anyone involved in medical data analysis. The interface is user-friendly, and the AI-driven insights are incredibly accurate and helpful. Highly recommend it to professionals looking to streamline their workflows and improve data interpretation.

    Avatar
    user_qIa5caVN
    2025-04-26

    As a dedicated user of MCP applications, I am thoroughly impressed with the MD-AI product by CCSSMNN. It offers seamless integration and outstanding performance, making my work efficient and productive. The user interface is intuitive, and the features are robust and reliable. Highly recommend this to anyone looking for a cutting-edge solution.

    Avatar
    user_V7Je4LUJ
    2025-04-26

    As a dedicated user of mcp applications, I am thrilled with the md-ai product by ccssmnn. This innovative tool has significantly enhanced my workflow, providing seamless integration and powerful features that streamline my tasks. The user-friendly interface and efficient performance make it a must-have for anyone in the AI field. Highly recommended!

    Avatar
    user_S7jp8TAI
    2025-04-26

    "MD-AI by ccssmnn is a game-changer! As an MCP app enthusiast, I find this tool incredibly intuitive and powerful. It's user-friendly and offers accurate medical insights that streamline my daily tasks. The seamless integration and the welcoming interface set it apart from other tools I've used. Highly recommend to anyone in the medical field!"

    Avatar
    user_abOC1Y6s
    2025-04-26

    As a dedicated user of MCP applications, I must say that md-ai by ccssmnn is truly impressive. The seamless integration and user-friendly interface make it a standout product. Its functionality and performance exceed expectations, providing valuable insights and efficient solutions. Highly recommended for anyone looking to enhance their AI capabilities!

    Avatar
    user_H0mZ74h6
    2025-04-26

    As a dedicated user of MCP applications, I must say that md-ai by ccssmnn is truly remarkable. The seamless integration and user-friendly interface make it a standout product. I particularly appreciate the robust functionalities that are tailored to meet diverse AI needs. Highly recommended for anyone looking to enhance their AI capabilities!

    Avatar
    user_fOyJSLIf
    2025-04-26

    As a devoted user of MCP applications, I must say that the "md-ai" by ccssmnn is a remarkable product. Its intuitive interface and powerful functionalities have significantly improved my workflow. The AI-driven features provide precise and reliable results, making it a must-have tool for anyone in need of advanced data analysis. Highly recommended!

    Avatar
    user_9kdis17t
    2025-04-26

    MD-AI by CCSSMNN is an incredible application for anyone interested in medical data analysis. User-friendly and robust, it integrates seamlessly into existing workflows. The welcome information is clear, and the intuitive interface ensures you can get started quickly. Highly recommended for professionals looking to enhance their analytical capabilities with ease!

    Avatar
    user_pgtOBkf6
    2025-04-26

    MD-AI by ccssmnn is a revolutionary tool for medical professionals. Its user-friendly interface and advanced AI functionalities significantly enhance diagnostic accuracy. This product undoubtedly represents the future of medical technology and integrates seamlessly into daily practice. Highly recommended for practitioners looking to stay ahead in the field.

    Avatar
    user_K1fnK8gK
    2025-04-26

    I've been using md-ai by ccssmnn and I'm thoroughly impressed. This application has significantly streamlined my workflow with its intuitive interface and robust features. It's become an indispensable tool for my daily tasks. Highly recommended for anyone looking for a reliable and efficient solution!

    Avatar
    user_vGTIesL9
    2025-04-26

    I've been using md-ai by ccssmnn for a while now, and it has significantly improved my workflow. Its seamless integration and powerful functionalities make data analysis a breeze. Highly recommend to anyone looking for a reliable tool for their data processing needs!

    Avatar
    user_O8b5lbzf
    2025-04-26

    I've been using the md-ai app created by ccssmnn and it has truly transformed my workflow. The intuitive design and efficient features make complex tasks much simpler. The seamless integration and welcome message provide a great user experience from the start. Highly recommended for professionals seeking a reliable tool!