Prompting AIs can be hard. While they sometimes do exactly what you want, they often get it wrong. Even when you do get what you want, it's far too easy to lose track of what what worked and why. It's even harder when you want to work with multiple AIs.
Metaphor is a simple, open-source, prompt creation language that lets you create consistent, reusable prompts that work across a variety of AI platforms. It lets you capture the what you need your AI to understand so it has a clear idea what you want it to do, without needing to guess (hallcinate) any details.
Metaphor solves three key problems that plague direct prompting: inconsistency across different AI models, difficulty maintaining prompt history, and challenges in collaboration. By structuring prompts with clear rules, Metaphor creates a standardized approach that works reliably across different AI platforms while making prompts reusable and shareable with team members.
Metaphor is AI agnostic. It works the same way with large language models from all major AI vendors, including Anthropic, DeepSeek, Google, Mistral, OpenAI, and xAI, making it easy to switch between them and find the right one for your needs.
The Metaphor language is easy to learn. It has only a few keywords and takes only a few minutes to get started.
Metaphor for software development
Traditional software development often sees islands of disconnected information. Product requirements, engineering implementation details, testing, security, and deployment are often captured in different ways. A human team can make sense of this, but AIs need you to bring this all together for them, otherwise they're left guessing.
Metaphor lets you collect these important elements alongside your source code so you have confidence your AI can build and maintain your code. You can check your AI has all the information it needs before asking it to do anything.
Like conventional programming languages, Metaphor lets you build up a library of reusable components. This makes it easy to set up standard rules that you can apply across all your projects. Metaphor also lets you embed source code, requirements documents, design specifications, etc., so you can capture knowledge and expertise from across your team.
Using Metaphor makes it easy to:
- Compare results from different LLMs. You can have several to do the same thing and see which results you like best.
- Have AIs take on different roles to provide different perspectives. For example, you can have one AI act as a product manager, another as a software engineer, and a third as a security expert. This lets you get a more complete picture of your project.
- Have one AI review the work of another to ensure it did what you wanted.
- Onboard and train new team members by giving them an expert assistant to work with.

Iterate quickly
As AI can do your implementation work rapidly, trying new ideas and discarding ones you don't like is easy. You can afford to try a few different approaches if you're unsure which one might work best rather than settling for the first one you develop.
Like conventional software development, Metaphor encourages teams to use version control and careful review before accepting changes. This also helps keep everyone aligned and dramatically improves time to value creation.
Getting started with Metaphor
Find out more about how to get started with Metaphor, and how to use it to help you structure your prompts, by reading our "Getting started with Metaphor" guide.
Try Humbug and Metaphor now
Download the latest version of Humbug, which includes Metaphor, for free:
- MacOS - Apple silicon Macs (M series)
- MacOS - Intel Macs
- We will be adding more packaged versions soon.
For all other platforms, and for source code, head to: github.com/m6r-ai/humbug
You can also find the standalone Metaphor tools on GitHub: github.com/m6r-ai/m6rc and github.com/m6r-ai/m6rclib
Frequently asked questions
Have questions about Metaphor? Visit our FAQ page to find answers to common questions about the language, its features, and how to use it effectively.
Examples
Here are some examples using Metaphor:
- Introducing Metaphor commands - a blog post looking at using Metaphor to review code and to revise the work of another AI.
- github.com/m6r-ai/commit-critic - a source code reviewing application written using m6rc and that also uses m6rclib. Read more about this at: commit-critic: An AI-powered, AI-built code review tool
- github.com/m6r-ai/demo-blog-editor - an example of using m6rc to convert a markdown file (a blog post) into TypeScript code that uses a custom HTML format.
- github.com/m6r-ai/demo-code-review - an example of using m6rc to set up a review of Python or TypeScript source code. Read more about this at: Code reviews using Metaphor
View our YouTube channel
Find out more on our YouTube channel.
Connect with us
Join us on Discord, or follow us on LinkedIn, to find out more about how Metaphor can help you.