Skip to content

Commit f050c32

Browse files
committed
Add installation docs, make CLI version dynamic, and update packaging metadata
- Add Installation (end-user & development) section to README and simplify Quick Start/Usage examples (remove uv prefix for end-user commands; note to use `uv run` when developing). - Make CLI version output dynamic using importlib.metadata with a PackageNotFoundError fallback instead of a hardcoded string. - Add project metadata (authors, license, keywords, classifiers, URLs) and sdist include list to pyproject.toml for improved packaging.
1 parent c21a3b3 commit f050c32

File tree

3 files changed

+111
-30
lines changed

3 files changed

+111
-30
lines changed

README.md

Lines changed: 72 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,51 @@
55

66
AI-powered personal knowledge system with daily planning, reflective journaling, semantic backlinks, and intelligent book notes search.
77

8+
## Installation
9+
10+
### For End Users
11+
12+
Install directly from GitHub:
13+
14+
```bash
15+
# Using uv (recommended - fastest)
16+
uv tool install git+https://github.com/madebygps/second-brain.git
17+
18+
# Or using pipx (isolated environment)
19+
pipx install git+https://github.com/madebygps/second-brain.git
20+
21+
# Or using pip (system-wide)
22+
pip install git+https://github.com/madebygps/second-brain.git
23+
```
24+
25+
After installation, the `brain` command will be available globally:
26+
```bash
27+
brain --help
28+
brain plan create today
29+
brain diary create today
30+
```
31+
32+
### For Development
33+
34+
```bash
35+
# Clone the repository
36+
git clone https://github.com/madebygps/second-brain.git
37+
cd second-brain
38+
39+
# Install with uv
40+
uv sync
41+
42+
# Set up pre-commit hooks
43+
uv run pre-commit install
44+
45+
# Configure environment
46+
cp .env.example .env
47+
# Edit .env with your paths and Azure credentials
48+
49+
# Run in development mode
50+
uv run brain --help
51+
```
52+
853
## Features
954

1055
**Planning** (`brain plan`)
@@ -29,60 +74,58 @@ AI-powered personal knowledge system with daily planning, reflective journaling,
2974

3075
## Quick Start
3176

32-
```bash
33-
# Install dependencies
34-
uv sync
77+
After installing (see [Installation](#installation)):
3578

36-
# Set up pre-commit hooks (optional but recommended)
37-
uv run pre-commit install
38-
39-
# Configure
79+
```bash
80+
# Configure (first time only)
4081
cp .env.example .env
4182
# Edit .env with your paths and Azure credentials
4283

4384
# Morning: Create your planning entry (saves to PLANNER_PATH)
44-
uv run brain plan create today
85+
brain plan create today
4586

4687
# Evening: Create your reflection entry (saves to DIARY_PATH)
47-
uv run brain diary create today
88+
brain diary create today
4889

4990
# Search your book notes
50-
uv run brain notes search "discipline"
91+
brain notes search "discipline"
5192
```
5293

94+
> **Note:** If developing locally, prefix commands with `uv run` (e.g., `uv run brain plan create today`)
95+
5396
## Usage
5497

5598
```bash
5699
# Planning
57-
uv run brain plan create today # Create daily plan with LLM task extraction
58-
uv run brain plan create tomorrow # Plan for tomorrow
100+
brain plan create today # Create daily plan with LLM task extraction
101+
brain plan create tomorrow # Plan for tomorrow
59102

60103
# Diary management
61-
uv run brain diary create today # Create reflection entry
62-
uv run brain diary link today # Generate semantic backlinks
63-
uv run brain diary refresh 30 # Bulk refresh past 30 days
64-
uv run brain diary list 7 # List recent entries
104+
brain diary create today # Create reflection entry
105+
brain diary link today # Generate semantic backlinks
106+
brain diary refresh 30 # Bulk refresh past 30 days
107+
brain diary list 7 # List recent entries
65108

66109
# Analysis
67-
uv run brain diary report 30 # Memory trace report (activities & connections)
68-
uv run brain diary patterns 7 # Emotional & psychological patterns
110+
brain diary report 30 # Memory trace report (activities & connections)
111+
brain diary patterns 7 # Emotional & psychological patterns
69112

70113
# Notes search
71-
uv run brain notes search "topic" # Search book notes
72-
uv run brain notes search "topic" --semantic --detailed
73-
uv run brain notes status # Check connection
114+
brain notes search "topic" # Search book notes
115+
brain notes search "topic" --semantic --detailed
116+
brain notes status # Check connection
74117

75118
# Cost tracking and analysis
76-
uv run brain cost summary # Usage summary for last 30 days
77-
uv run brain cost trends 30 # Daily cost trends
78-
uv run brain cost estimate # Monthly cost projection
79-
uv run brain cost breakdown # Per-operation breakdown
80-
uv run brain cost export data.json # Export to JSON
81-
uv run brain cost pricing # Show pricing
119+
brain cost summary # Usage summary for last 30 days
120+
brain cost trends 30 # Daily cost trends
121+
brain cost estimate # Monthly cost projection
122+
brain cost breakdown # Per-operation breakdown
123+
brain cost export data.json # Export to JSON
124+
brain cost pricing # Show pricing
82125

83126
# Logging (Rich-formatted, colored output)
84-
uv run brain --verbose <command> # Show key operations
85-
uv run brain --debug <command> # Full diagnostics with LLM details
127+
brain --verbose <command> # Show key operations
128+
brain --debug <command> # Full diagnostics with LLM details
86129
```
87130

88131
> **Clean UX:** By default, logs are suppressed during operations to avoid interrupting spinners. Use `--verbose` or `--debug` for detailed information with beautiful Rich formatting.

brain_cli/main.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
"""Main CLI entry point for the brain system."""
22

3+
from importlib.metadata import PackageNotFoundError, version
4+
35
import typer
46

57
from brain_cli.cost_commands import app as cost_app
@@ -16,7 +18,11 @@
1618
def version_callback(value: bool):
1719
"""Show version information."""
1820
if value:
19-
typer.echo("Brain CLI v1.0.0")
21+
try:
22+
pkg_version = version("second-brain")
23+
except PackageNotFoundError:
24+
pkg_version = "0.1.0 (dev)"
25+
typer.echo(f"Brain CLI v{pkg_version}")
2026
raise typer.Exit()
2127

2228

pyproject.toml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@ version = "0.1.0"
44
description = "AI-powered journaling with smart prompts and automatic backlinks"
55
readme = "README.md"
66
requires-python = ">=3.13"
7+
authors = [
8+
{ name = "Gwyneth Peña-Siguenza", email = "[email protected]" }
9+
]
10+
license = { text = "MIT" }
11+
keywords = ["journaling", "AI", "productivity", "knowledge-management", "obsidian", "azure-openai"]
12+
classifiers = [
13+
"Development Status :: 4 - Beta",
14+
"Intended Audience :: End Users/Desktop",
15+
"License :: OSI Approved :: MIT License",
16+
"Programming Language :: Python :: 3",
17+
"Programming Language :: Python :: 3.13",
18+
"Topic :: Office/Business",
19+
"Topic :: Utilities",
20+
]
721
dependencies = [
822
"typer>=0.15.1",
923
"rich>=13.9.4",
@@ -13,6 +27,12 @@ dependencies = [
1327
"openai>=1.57.2",
1428
]
1529

30+
[project.urls]
31+
Homepage = "https://github.com/madebygps/second-brain"
32+
"Bug Tracker" = "https://github.com/madebygps/second-brain/issues"
33+
Documentation = "https://github.com/madebygps/second-brain#readme"
34+
"Source Code" = "https://github.com/madebygps/second-brain"
35+
1636
[project.scripts]
1737
brain = "brain_cli.main:app"
1838

@@ -23,6 +43,18 @@ build-backend = "hatchling.build"
2343
[tool.hatch.build.targets.wheel]
2444
packages = ["brain_core", "brain_cli"]
2545

46+
[tool.hatch.build.targets.sdist]
47+
# Only include essential files in source distribution
48+
include = [
49+
"/brain_core",
50+
"/brain_cli",
51+
"/tests",
52+
"/LICENSE",
53+
"/README.md",
54+
"/pyproject.toml",
55+
"/.env.example",
56+
]
57+
2658
[tool.uv]
2759
package = true
2860

0 commit comments

Comments
 (0)