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.
Metadata
Release files for brainlift 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| brainlift-0.2.0.tar.gz | 12.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| brainlift-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.5 kB
Release files / brainlift-0.2.0.tar.gz
| Download URL | brainlift-0.2.0.tar.gz |
|---|---|
| Size | 12.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
181875e94d87a8bddbd4b87c52d0a234a0685278ba58f834a8dd0281e75772ee
|
|
BLAKE2b-256 checksum How to use checksums |
221881973e18a831b472c481d7c8b0e83ed0918d6c99bd32c7b7a87314559512
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.15
|
Release files / brainlift-0.2.0-py3-none-any.whl
| Download URL | brainlift-0.2.0-py3-none-any.whl |
|---|---|
| Size | 14.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3cb9a98377864fb87195be9e3c4809d343c279095d92a9077ab2c9ec81672810
|
|
BLAKE2b-256 checksum How to use checksums |
287d168504424fcbadd76d1e1b823cba5b738b4d308fedb0f5c84e62e8c829b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.15
|