BrainLift Manager (BLM) - A command-line interface for the BrainLift knowledge management system
Project description
BrainLift CLI
A command-line interface for the BrainLift knowledge management system. This CLI tool allows you to interact with the BrainLift serverless backend to manage, search, and generate structured knowledge content.
Installation
# Install from source
pip install -e .
Environment Setup
Create a .env file in your home directory at ~/.brain-lift/.env with the following variables:
BRAINLIFT_FUNCTION_URL=your_lambda_function_url
BRAINLIFT_API_KEY=your_api_key
Alternatively, you can use the configure-serverless command to set these values:
blm configure-serverless --function-url https://your-lambda-function-url.lambda-url.region.on.aws/ --api-key your-api-key
Commands
List Content
# List all products
blm list
# List topics in a product
blm list --product <product>
# List sections in a topic
blm list --product <product> --topic <topic>
Search Content
# Search for content
blm search "your search query"
# Search within a specific product
blm search "your search query" --product <product>
# Limit search results
blm search "your search query" --limit 5
Get Content
# Get content by path
blm get --product <product> --topic <topic>
# Get specific section
blm get --product <product> --topic <topic> --section <section>
Import Content
# Import content from a markdown file
blm import <file.md> --product <product> --topic <topic>
Update Content
# Update content
blm update --product <product> --topic <topic> --file <file.md>
Delete Content
# Delete content
blm delete --product <product> --topic <topic>
Generate Content
# Generate structured content from raw input
blm generate --product <product> --topic <topic> --file <file.md>
# Specify template version
blm generate --product <product> --topic <topic> --file <file.md> -v v3
Content Generation Guidelines
When using the generate command, the system follows these principles:
-
Factual Accuracy: The system prioritizes factual accuracy over filling every template section. All content must be derived from the source material.
-
DOK Structure:
- DOK1 and DOK2: Function as context packs containing factual information and foundational knowledge directly from the source material.
- DOK3 and DOK4: Higher-level insights are only included when they can be genuinely derived from the content, not invented.
-
Experts Section: Only includes people or sources that are explicitly mentioned in the original content. If no experts are explicitly mentioned, this section should remain empty or be omitted.
-
Purpose Section: Clearly defines what the content is about - the core objective or focus of the material.
-
Template Flexibility: The template structure respects what's actually in the content rather than forcing information into categories where it doesn't exist in the source material.
Verbose Mode
Add the --verbose flag to get more detailed output:
blm --verbose INFO list
blm --verbose DEBUG generate --product <product> --topic <topic> --file <file.md>
Development
This CLI is a thin wrapper around the BrainLift serverless backend. It handles:
- Command-line argument parsing
- File I/O for content import/export
- API calls to the serverless backend
- Formatting and displaying results
All business logic, content processing, and storage operations are handled by the serverless backend.
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 brainlift-0.1.0.tar.gz.
File metadata
- Download URL: brainlift-0.1.0.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5f4203a6b2eae5ed30cbad578d21f291b56168d181b9819330b514e84160d28
|
|
| MD5 |
b7c43cafbd43d257539f75aa6c3ed47d
|
|
| BLAKE2b-256 |
263f123d51b6040cf036dc39e8868f394d8b35225f1aff78ccda762c86d39f97
|
File details
Details for the file brainlift-0.1.0-py3-none-any.whl.
File metadata
- Download URL: brainlift-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4721ccc5e46142e1d5d4a71e9a5dadb9167198963b6614d310d904b7e233442b
|
|
| MD5 |
d0b4c900267bc9f2b2fa9e8d81e9d199
|
|
| BLAKE2b-256 |
a5300ac809fe2472583456f445fe287833ef9ac4d6d521426e2ee6b35f23b0fb
|