A CLI knowledge base for commands, code snippets, and SQL queries
Project description
Metis
A terminal knowledge base for commands, code snippets, and SQL queries. Organize entries into knowledge bases (e.g. aws, terraform, snowflake), search with keywords or semantic similarity, and copy results straight to your clipboard.
Features
- Organize snippets into named knowledge bases
- Interactive TUI browser with arrow-key navigation (fzf-style)
- Keyword search and semantic/vector search (ChromaDB)
- Copy to clipboard or print to terminal with a single keypress
- Rich terminal output with colors and tables
- All data stored locally under
~/.metis
Installation
pip install -e .
Requires Python 3.9+.
Quick start
# Create knowledge bases
metis --kb aws
metis --kb terraform
metis --kb snowflake
# Add entries
metis add --kb aws -t "List VPC subnets" \
-c "aws ec2 describe-subnets --filters Name=vpc-id,Values=vpc-xxx" \
-d "Get all subnets in a VPC" --tags "ec2,vpc,networking"
metis add --kb terraform -t "Plan and apply" \
-c "terraform plan -out=tfplan && terraform apply tfplan" \
--tags "iac,deploy"
metis add --kb snowflake -t "Get task history" \
-c "SELECT * FROM TABLE(INFORMATION_SCHEMA.TASK_HISTORY()) ORDER BY SCHEDULED_TIME DESC LIMIT 20;" \
--tags "tasks,monitoring"
Usage
metis [OPTIONS] COMMAND [ARGS]
Global options
| Option | Description |
|---|---|
metis -V |
Show version |
metis -l / metis --list |
List all knowledge bases |
metis --kb <name> |
Create a new knowledge base |
Commands
| Command | Description |
|---|---|
metis add |
Add an entry (prompts for title and command) |
metis find [query] |
Search entries; no query opens interactive browser |
metis find -s <query> |
Semantic / vector search |
metis find -p <query> |
Search then pick an entry to copy or print |
metis ls |
List all entries |
metis ls --kb aws |
List entries in a specific knowledge base |
metis ls -p |
List then pick an entry to copy or print |
metis rm <id> |
Delete an entry by ID |
metis reindex |
Rebuild the vector search index |
Interactive browser (metis find)
Running metis find with no arguments opens a full-screen TUI:
- Knowledge base selector — pick a KB or "all"
- Entry browser — type to filter, arrows to navigate,
cto copy,pto print
| Key | Action |
|---|---|
↑ / ↓ |
Navigate entries |
→ / Enter |
Open knowledge base |
← / Backspace |
Go back to KB list |
Ctrl+K |
Toggle search mode (type to filter) |
Esc / Enter |
Exit search mode |
c |
Copy highlighted command to clipboard |
p |
Print highlighted command and exit |
q / Ctrl-C |
Quit |
Type any characters to filter entries by keyword.
Data storage
All data lives in ~/.metis/:
~/.metis/
├── metis.json # knowledge bases and entries
└── vectorstore/ # ChromaDB vector index
Development
# Install in editable mode
pip install -e .
# Lint
pip install ruff
ruff check src/
ruff format src/
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file metis_kb-0.1.0.tar.gz.
File metadata
- Download URL: metis_kb-0.1.0.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0d4442662d4d2e84e7de41bb0126e04fbfc297aa5dd47837ed742774fb77a05
|
|
| MD5 |
cf30d2dcf200ceb665a8956309bca71d
|
|
| BLAKE2b-256 |
a190f69422086e5e5905f42bf4137aaa0eaf42e9f06da22e0a8f605b4eb6b5b5
|
Provenance
The following attestation bundles were made for metis_kb-0.1.0.tar.gz:
Publisher:
release.yml on abyssnlp/metis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
metis_kb-0.1.0.tar.gz -
Subject digest:
d0d4442662d4d2e84e7de41bb0126e04fbfc297aa5dd47837ed742774fb77a05 - Sigstore transparency entry: 1592098469
- Sigstore integration time:
-
Permalink:
abyssnlp/metis@3c1dfa6d34475a87c1492f85e82fd616aee83f57 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/abyssnlp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3c1dfa6d34475a87c1492f85e82fd616aee83f57 -
Trigger Event:
push
-
Statement type:
File details
Details for the file metis_kb-0.1.0-py3-none-any.whl.
File metadata
- Download URL: metis_kb-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1caa927a277a77006c070632b208badee2368f1ef4bd58330f767fb51c3b519
|
|
| MD5 |
c89713b2f9c0b14d062f8c7f29b49637
|
|
| BLAKE2b-256 |
12056e0d6b5c72a0241971953e1e6f7cf0a1ebb3e906b56a587ff429107e9d4f
|
Provenance
The following attestation bundles were made for metis_kb-0.1.0-py3-none-any.whl:
Publisher:
release.yml on abyssnlp/metis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
metis_kb-0.1.0-py3-none-any.whl -
Subject digest:
c1caa927a277a77006c070632b208badee2368f1ef4bd58330f767fb51c3b519 - Sigstore transparency entry: 1592098490
- Sigstore integration time:
-
Permalink:
abyssnlp/metis@3c1dfa6d34475a87c1492f85e82fd616aee83f57 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/abyssnlp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3c1dfa6d34475a87c1492f85e82fd616aee83f57 -
Trigger Event:
push
-
Statement type: